diff --git a/frontend/node_modules/.bin/arrow2csv b/frontend/node_modules/.bin/arrow2csv new file mode 100644 index 0000000000000000000000000000000000000000..5c0057329ff9f3cfd238308c9c9c5ed7a46c0768 --- /dev/null +++ b/frontend/node_modules/.bin/arrow2csv @@ -0,0 +1,12 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../apache-arrow/bin/arrow2csv.js" "$@" +else + exec node "$basedir/../apache-arrow/bin/arrow2csv.js" "$@" +fi diff --git a/frontend/node_modules/.bin/arrow2csv.cmd b/frontend/node_modules/.bin/arrow2csv.cmd new file mode 100644 index 0000000000000000000000000000000000000000..9572709767de1b67d9e681e5e3fb6ebc008e0e00 --- /dev/null +++ b/frontend/node_modules/.bin/arrow2csv.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\apache-arrow\bin\arrow2csv.js" %* diff --git a/frontend/node_modules/.bin/arrow2csv.ps1 b/frontend/node_modules/.bin/arrow2csv.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..5411f0bf29a4e665e02a4ec310d4ed78fe7b8235 --- /dev/null +++ b/frontend/node_modules/.bin/arrow2csv.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../apache-arrow/bin/arrow2csv.js" $args + } else { + & "$basedir/node$exe" "$basedir/../apache-arrow/bin/arrow2csv.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../apache-arrow/bin/arrow2csv.js" $args + } else { + & "node$exe" "$basedir/../apache-arrow/bin/arrow2csv.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/frontend/node_modules/.bin/livereload b/frontend/node_modules/.bin/livereload new file mode 100644 index 0000000000000000000000000000000000000000..eacb37dbbc433e0a098d248876707bbd2696b8ec --- /dev/null +++ b/frontend/node_modules/.bin/livereload @@ -0,0 +1,12 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../livereload/bin/livereload.js" "$@" +else + exec node "$basedir/../livereload/bin/livereload.js" "$@" +fi diff --git a/frontend/node_modules/.bin/livereload.cmd b/frontend/node_modules/.bin/livereload.cmd new file mode 100644 index 0000000000000000000000000000000000000000..c9e27cd4bd13dc2082132029e43231e9937749c2 --- /dev/null +++ b/frontend/node_modules/.bin/livereload.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\livereload\bin\livereload.js" %* diff --git a/frontend/node_modules/.bin/livereload.ps1 b/frontend/node_modules/.bin/livereload.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..97e1776e013796352ca0f1041b7624f101ed51a8 --- /dev/null +++ b/frontend/node_modules/.bin/livereload.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../livereload/bin/livereload.js" $args + } else { + & "$basedir/node$exe" "$basedir/../livereload/bin/livereload.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../livereload/bin/livereload.js" $args + } else { + & "node$exe" "$basedir/../livereload/bin/livereload.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/frontend/node_modules/.bin/mime b/frontend/node_modules/.bin/mime new file mode 100644 index 0000000000000000000000000000000000000000..0a62a1b13b965546f7aab56bbcb07d37e1cb6087 --- /dev/null +++ b/frontend/node_modules/.bin/mime @@ -0,0 +1,12 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../mime/cli.js" "$@" +else + exec node "$basedir/../mime/cli.js" "$@" +fi diff --git a/frontend/node_modules/.bin/mime.cmd b/frontend/node_modules/.bin/mime.cmd new file mode 100644 index 0000000000000000000000000000000000000000..54491f12e08014083099d3a46bf7b99f0ec22b56 --- /dev/null +++ b/frontend/node_modules/.bin/mime.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mime\cli.js" %* diff --git a/frontend/node_modules/.bin/mime.ps1 b/frontend/node_modules/.bin/mime.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..2222f40bcf2aca56c70178225cfe21cc31e2773f --- /dev/null +++ b/frontend/node_modules/.bin/mime.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../mime/cli.js" $args + } else { + & "$basedir/node$exe" "$basedir/../mime/cli.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../mime/cli.js" $args + } else { + & "node$exe" "$basedir/../mime/cli.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/frontend/node_modules/.bin/mkdirp b/frontend/node_modules/.bin/mkdirp new file mode 100644 index 0000000000000000000000000000000000000000..6ba5765a8cd217d8965731b917977e786e4d97b7 --- /dev/null +++ b/frontend/node_modules/.bin/mkdirp @@ -0,0 +1,12 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../mkdirp/bin/cmd.js" "$@" +else + exec node "$basedir/../mkdirp/bin/cmd.js" "$@" +fi diff --git a/frontend/node_modules/.bin/mkdirp.cmd b/frontend/node_modules/.bin/mkdirp.cmd new file mode 100644 index 0000000000000000000000000000000000000000..a865dd9f3a2ef7c26f9cb350ee12041578808e79 --- /dev/null +++ b/frontend/node_modules/.bin/mkdirp.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mkdirp\bin\cmd.js" %* diff --git a/frontend/node_modules/.bin/mkdirp.ps1 b/frontend/node_modules/.bin/mkdirp.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..911e85466417449a40e584cce49fa18f1c513c3d --- /dev/null +++ b/frontend/node_modules/.bin/mkdirp.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args + } else { + & "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args + } else { + & "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/frontend/node_modules/.bin/rimraf b/frontend/node_modules/.bin/rimraf new file mode 100644 index 0000000000000000000000000000000000000000..b816825501681cb0eb7a06021ceaf06669977fd1 --- /dev/null +++ b/frontend/node_modules/.bin/rimraf @@ -0,0 +1,12 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../rimraf/bin.js" "$@" +else + exec node "$basedir/../rimraf/bin.js" "$@" +fi diff --git a/frontend/node_modules/.bin/rimraf.cmd b/frontend/node_modules/.bin/rimraf.cmd new file mode 100644 index 0000000000000000000000000000000000000000..13f45eca337b1e901d40623f7270a4b687913b7c --- /dev/null +++ b/frontend/node_modules/.bin/rimraf.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\rimraf\bin.js" %* diff --git a/frontend/node_modules/.bin/rimraf.ps1 b/frontend/node_modules/.bin/rimraf.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..17167914ff79eef0e1cf7ed4e94c5933073d9cd4 --- /dev/null +++ b/frontend/node_modules/.bin/rimraf.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../rimraf/bin.js" $args + } else { + & "$basedir/node$exe" "$basedir/../rimraf/bin.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../rimraf/bin.js" $args + } else { + & "node$exe" "$basedir/../rimraf/bin.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/frontend/node_modules/.bin/rollup b/frontend/node_modules/.bin/rollup new file mode 100644 index 0000000000000000000000000000000000000000..11bd86d0796e66a0d2e023aac4a984ba4957bf64 --- /dev/null +++ b/frontend/node_modules/.bin/rollup @@ -0,0 +1,12 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../rollup/dist/bin/rollup" "$@" +else + exec node "$basedir/../rollup/dist/bin/rollup" "$@" +fi diff --git a/frontend/node_modules/.bin/rollup.cmd b/frontend/node_modules/.bin/rollup.cmd new file mode 100644 index 0000000000000000000000000000000000000000..b3f110b3e345e7fe6ffe12293fe47cc062aecc26 --- /dev/null +++ b/frontend/node_modules/.bin/rollup.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\rollup\dist\bin\rollup" %* diff --git a/frontend/node_modules/.bin/rollup.ps1 b/frontend/node_modules/.bin/rollup.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..10f657d7269a6d3b0b24d5c1f7195c6d24e1f9a8 --- /dev/null +++ b/frontend/node_modules/.bin/rollup.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../rollup/dist/bin/rollup" $args + } else { + & "$basedir/node$exe" "$basedir/../rollup/dist/bin/rollup" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../rollup/dist/bin/rollup" $args + } else { + & "node$exe" "$basedir/../rollup/dist/bin/rollup" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/frontend/node_modules/.bin/sirv b/frontend/node_modules/.bin/sirv new file mode 100644 index 0000000000000000000000000000000000000000..ee714d01ae8f898b19466180dc38fbc8b9e24f7d --- /dev/null +++ b/frontend/node_modules/.bin/sirv @@ -0,0 +1,12 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../sirv-cli/bin.js" "$@" +else + exec node "$basedir/../sirv-cli/bin.js" "$@" +fi diff --git a/frontend/node_modules/.bin/sirv.cmd b/frontend/node_modules/.bin/sirv.cmd new file mode 100644 index 0000000000000000000000000000000000000000..bca08a984d093b06de2a43a442da14512558120b --- /dev/null +++ b/frontend/node_modules/.bin/sirv.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\sirv-cli\bin.js" %* diff --git a/frontend/node_modules/.bin/sirv.ps1 b/frontend/node_modules/.bin/sirv.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..2cb2b29ed60f05afcf0662d8c3f4bc998852ab62 --- /dev/null +++ b/frontend/node_modules/.bin/sirv.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../sirv-cli/bin.js" $args + } else { + & "$basedir/node$exe" "$basedir/../sirv-cli/bin.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../sirv-cli/bin.js" $args + } else { + & "node$exe" "$basedir/../sirv-cli/bin.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/frontend/node_modules/.bin/sorcery b/frontend/node_modules/.bin/sorcery new file mode 100644 index 0000000000000000000000000000000000000000..74ab1fe00fe709dc3426f66aea236d91a3e74b7c --- /dev/null +++ b/frontend/node_modules/.bin/sorcery @@ -0,0 +1,12 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../sorcery/bin/index.js" "$@" +else + exec node "$basedir/../sorcery/bin/index.js" "$@" +fi diff --git a/frontend/node_modules/.bin/sorcery.cmd b/frontend/node_modules/.bin/sorcery.cmd new file mode 100644 index 0000000000000000000000000000000000000000..a006c2d2a542118d0013ee7b74bcf0b1332ec353 --- /dev/null +++ b/frontend/node_modules/.bin/sorcery.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\sorcery\bin\index.js" %* diff --git a/frontend/node_modules/.bin/sorcery.ps1 b/frontend/node_modules/.bin/sorcery.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..ab4b8e835a6f0389ac3fdc9fe5e9ca7549e92400 --- /dev/null +++ b/frontend/node_modules/.bin/sorcery.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../sorcery/bin/index.js" $args + } else { + & "$basedir/node$exe" "$basedir/../sorcery/bin/index.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../sorcery/bin/index.js" $args + } else { + & "node$exe" "$basedir/../sorcery/bin/index.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/frontend/node_modules/.bin/svelte-check b/frontend/node_modules/.bin/svelte-check new file mode 100644 index 0000000000000000000000000000000000000000..3c55d2d9c4684b0d0317feb84d1fd359a602c84d --- /dev/null +++ b/frontend/node_modules/.bin/svelte-check @@ -0,0 +1,12 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../svelte-check/bin/svelte-check" "$@" +else + exec node "$basedir/../svelte-check/bin/svelte-check" "$@" +fi diff --git a/frontend/node_modules/.bin/svelte-check.cmd b/frontend/node_modules/.bin/svelte-check.cmd new file mode 100644 index 0000000000000000000000000000000000000000..f08f2f6f956e9dd73f62b76b28f70d96056dc0fa --- /dev/null +++ b/frontend/node_modules/.bin/svelte-check.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\svelte-check\bin\svelte-check" %* diff --git a/frontend/node_modules/.bin/svelte-check.ps1 b/frontend/node_modules/.bin/svelte-check.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..3fcdf81c7d12b05a23c7b58444282def2948a5d6 --- /dev/null +++ b/frontend/node_modules/.bin/svelte-check.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../svelte-check/bin/svelte-check" $args + } else { + & "$basedir/node$exe" "$basedir/../svelte-check/bin/svelte-check" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../svelte-check/bin/svelte-check" $args + } else { + & "node$exe" "$basedir/../svelte-check/bin/svelte-check" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/frontend/node_modules/.bin/terser b/frontend/node_modules/.bin/terser new file mode 100644 index 0000000000000000000000000000000000000000..2d3fa890a629e92909cef0e2cc8b7e8f8e97c67b --- /dev/null +++ b/frontend/node_modules/.bin/terser @@ -0,0 +1,12 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../terser/bin/terser" "$@" +else + exec node "$basedir/../terser/bin/terser" "$@" +fi diff --git a/frontend/node_modules/.bin/terser.cmd b/frontend/node_modules/.bin/terser.cmd new file mode 100644 index 0000000000000000000000000000000000000000..abf66a827f5f191a622e2e2329585e58cd55fa72 --- /dev/null +++ b/frontend/node_modules/.bin/terser.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\terser\bin\terser" %* diff --git a/frontend/node_modules/.bin/terser.ps1 b/frontend/node_modules/.bin/terser.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..0bbfff61b989171d91bfb5e954d6a3a6e1379fa8 --- /dev/null +++ b/frontend/node_modules/.bin/terser.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../terser/bin/terser" $args + } else { + & "$basedir/node$exe" "$basedir/../terser/bin/terser" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../terser/bin/terser" $args + } else { + & "node$exe" "$basedir/../terser/bin/terser" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/frontend/node_modules/.bin/tsc b/frontend/node_modules/.bin/tsc new file mode 100644 index 0000000000000000000000000000000000000000..49798517b1460f2a6ebc3044d2e7b09518c1d1c3 --- /dev/null +++ b/frontend/node_modules/.bin/tsc @@ -0,0 +1,12 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@" +else + exec node "$basedir/../typescript/bin/tsc" "$@" +fi diff --git a/frontend/node_modules/.bin/tsc.cmd b/frontend/node_modules/.bin/tsc.cmd new file mode 100644 index 0000000000000000000000000000000000000000..40bf1284554c31563142dfbf913d5e2d9ddf2c44 --- /dev/null +++ b/frontend/node_modules/.bin/tsc.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\typescript\bin\tsc" %* diff --git a/frontend/node_modules/.bin/tsc.ps1 b/frontend/node_modules/.bin/tsc.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..112413b584126ebe668f6f58ea14e0d83b6fe1fe --- /dev/null +++ b/frontend/node_modules/.bin/tsc.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../typescript/bin/tsc" $args + } else { + & "$basedir/node$exe" "$basedir/../typescript/bin/tsc" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../typescript/bin/tsc" $args + } else { + & "node$exe" "$basedir/../typescript/bin/tsc" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/frontend/node_modules/.bin/tsserver b/frontend/node_modules/.bin/tsserver new file mode 100644 index 0000000000000000000000000000000000000000..cc53aac9ebd8252f048b1015b77c950d5297ad96 --- /dev/null +++ b/frontend/node_modules/.bin/tsserver @@ -0,0 +1,12 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@" +else + exec node "$basedir/../typescript/bin/tsserver" "$@" +fi diff --git a/frontend/node_modules/.bin/tsserver.cmd b/frontend/node_modules/.bin/tsserver.cmd new file mode 100644 index 0000000000000000000000000000000000000000..57f851fd7f4a0cdd0e155b002007b6acb8a4c4a9 --- /dev/null +++ b/frontend/node_modules/.bin/tsserver.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\typescript\bin\tsserver" %* diff --git a/frontend/node_modules/.bin/tsserver.ps1 b/frontend/node_modules/.bin/tsserver.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..249f417d2703e27c453ed15e1e0ff60aff80811f --- /dev/null +++ b/frontend/node_modules/.bin/tsserver.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../typescript/bin/tsserver" $args + } else { + & "$basedir/node$exe" "$basedir/../typescript/bin/tsserver" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../typescript/bin/tsserver" $args + } else { + & "node$exe" "$basedir/../typescript/bin/tsserver" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/frontend/node_modules/.package-lock.json b/frontend/node_modules/.package-lock.json new file mode 100644 index 0000000000000000000000000000000000000000..c22e6fc1aee965cbb45b39af58351fdda0e65890 --- /dev/null +++ b/frontend/node_modules/.package-lock.json @@ -0,0 +1,1565 @@ +{ + "name": "streamlit_component_svelte_template", + "version": "2.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/@babel/code-frame": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.0.tgz", + "integrity": "sha512-IF4EOMEV+bfYwOmNxGzSnjR2EmQod7f1UXOpZM3l4i4o4QNwzjtJAu/HxdjHq0aYBvdqMuQEY1eg0nqW9ZPORA==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.16.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.15.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", + "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.0.tgz", + "integrity": "sha512-t8MH41kUQylBtu2+4IQA3atqevA2lRgqA2wyVB/YiWmsDSuylZZuXOUy9ric30hfzauEFfdsuk/eXTRrGrfd0g==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.15.7", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@polka/url": { + "version": "1.0.0-next.21", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz", + "integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==" + }, + "node_modules/@rollup/plugin-commonjs": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-12.0.0.tgz", + "integrity": "sha512-8+mDQt1QUmN+4Y9D3yCG8AJNewuTSLYPJVzKKUZ+lGeQrI+bV12Tc5HCyt2WdlnG6ihIL/DPbKRJlB40DX40mw==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^3.0.8", + "commondir": "^1.0.1", + "estree-walker": "^1.0.1", + "glob": "^7.1.2", + "is-reference": "^1.1.2", + "magic-string": "^0.25.2", + "resolve": "^1.11.0" + }, + "engines": { + "node": ">= 8.0.0" + }, + "peerDependencies": { + "rollup": "^2.3.4" + } + }, + "node_modules/@rollup/plugin-node-resolve": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-8.4.0.tgz", + "integrity": "sha512-LFqKdRLn0ShtQyf6SBYO69bGE1upV6wUhBX0vFOUnLAyzx5cwp8svA0eHUnu8+YU57XOkrMtfG63QOpQx25pHQ==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^3.1.0", + "@types/resolve": "1.17.1", + "builtin-modules": "^3.1.0", + "deep-freeze": "^0.0.1", + "deepmerge": "^4.2.2", + "is-module": "^1.0.0", + "resolve": "^1.17.0" + }, + "engines": { + "node": ">= 8.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0" + } + }, + "node_modules/@rollup/plugin-typescript": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-4.1.2.tgz", + "integrity": "sha512-+7UlGat/99e2JbmGNnIauxwEhYLwrL7adO/tSJxUN57xrrS3Ps+ZzYpLCDGPZJ57j+ZJTZLLN89KXW9JMEB+jg==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^3.0.1", + "resolve": "^1.14.1" + }, + "engines": { + "node": ">=8.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0", + "tslib": "*", + "typescript": ">=2.1.0" + } + }, + "node_modules/@rollup/pluginutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "dev": true, + "dependencies": { + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" + }, + "engines": { + "node": ">= 8.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0" + } + }, + "node_modules/@tsconfig/svelte": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@tsconfig/svelte/-/svelte-1.0.13.tgz", + "integrity": "sha512-5lYJP45Xllo4yE/RUBccBT32eBlRDbqN8r1/MIvQbKxW3aFqaYPCNgm8D5V20X4ShHcwvYWNlKg3liDh1MlBoA==", + "dev": true + }, + "node_modules/@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "dev": true + }, + "node_modules/@types/flatbuffers": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@types/flatbuffers/-/flatbuffers-1.10.0.tgz", + "integrity": "sha512-7btbphLrKvo5yl/5CC2OCxUSMx1wV1wvGT1qDXkSt7yi00/YW7E8k6qzXqJHsp+WU0eoG7r6MTQQXI9lIvd0qA==" + }, + "node_modules/@types/node": { + "version": "16.11.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.6.tgz", + "integrity": "sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==", + "dev": true + }, + "node_modules/@types/pug": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@types/pug/-/pug-2.0.5.tgz", + "integrity": "sha512-LOnASQoeNZMkzexRuyqcBBDZ6rS+rQxUMkmj5A0PkhhiSZivLIuz6Hxyr1mkGoEZEkk66faROmpMi4fFkrKsBA==", + "dev": true + }, + "node_modules/@types/resolve": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", + "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/sass": { + "version": "1.43.0", + "resolved": "https://registry.npmjs.org/@types/sass/-/sass-1.43.0.tgz", + "integrity": "sha512-DPSXNJ1rYLo88GyF9tuB4bsYGfpKI1a4+wOQmc+LI1SUoocm9QLRSpz0GxxuyjmJsYFIQo/dDlRSSpIXngff+w==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/text-encoding-utf-8": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@types/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz", + "integrity": "sha512-AQ6zewa0ucLJvtUi5HsErbOFKAcQfRLt9zFLlUOvcXBy2G36a+ZDpCHSGdzJVUD8aNURtIjh9aSjCStNMRCcRQ==" + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/apache-arrow": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/apache-arrow/-/apache-arrow-0.17.0.tgz", + "integrity": "sha512-cbgSx/tzGgnC1qeUySXnAsSsoxhDykNINqr1D3U5pRwf0/Q0ztVccV3/VRW6gUR+lcOFawk6FtyYwmU+KjglbQ==", + "dependencies": { + "@types/flatbuffers": "^1.9.1", + "@types/node": "^12.0.4", + "@types/text-encoding-utf-8": "^1.0.1", + "command-line-args": "5.0.2", + "command-line-usage": "5.0.5", + "flatbuffers": "1.11.0", + "json-bignum": "^0.0.3", + "pad-left": "^2.1.0", + "text-encoding-utf-8": "^1.0.2", + "tslib": "^1.9.3" + }, + "bin": { + "arrow2csv": "bin/arrow2csv.js" + } + }, + "node_modules/apache-arrow/node_modules/@types/node": { + "version": "12.20.36", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.36.tgz", + "integrity": "sha512-+5haRZ9uzI7rYqzDznXgkuacqb6LJhAti8mzZKWxIXn/WEtvB+GHVJ7AuMwcN1HMvXOSJcrvA6PPoYHYOYYebA==" + }, + "node_modules/apache-arrow/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/argv-tools": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/argv-tools/-/argv-tools-0.1.2.tgz", + "integrity": "sha512-wxqoymY0BEu9NblZVQiOTOAiJUjPhaa/kbNMjC2h6bnrmUSgnxKgWJo3lzXvi3bHJRwXyqK/dHzMlZVRT89Cxg==", + "dependencies": { + "array-back": "^2.0.0", + "find-replace": "^2.0.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/array-back": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-2.0.0.tgz", + "integrity": "sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw==", + "dependencies": { + "typical": "^2.6.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/builtin-modules": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz", + "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chokidar": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", + "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", + "dev": true, + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "node_modules/command-line-args": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.0.2.tgz", + "integrity": "sha512-/qPcbL8zpqg53x4rAaqMFlRV4opN3pbla7I7k9x8kyOBMQoGT6WltjN6sXZuxOXw6DgdK7Ad+ijYS5gjcr7vlA==", + "dependencies": { + "argv-tools": "^0.1.1", + "array-back": "^2.0.0", + "find-replace": "^2.0.1", + "lodash.camelcase": "^4.3.0", + "typical": "^2.6.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/command-line-usage": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-5.0.5.tgz", + "integrity": "sha512-d8NrGylA5oCXSbGoKz05FkehDAzSmIm4K03S5VDh4d5lZAtTWfc3D1RuETtuQCn8129nYfJfDdF7P/lwcz1BlA==", + "dependencies": { + "array-back": "^2.0.0", + "chalk": "^2.4.1", + "table-layout": "^0.4.3", + "typical": "^2.6.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/console-clear": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/console-clear/-/console-clear-1.1.1.tgz", + "integrity": "sha512-pMD+MVR538ipqkG5JXeOEbKWS5um1H4LUUccUQG68qpeqBYbzYy79Gh55jkd2TtPdRfUaLWdv6LPP//5Zt0aPQ==", + "engines": { + "node": ">=4" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/deep-freeze": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/deep-freeze/-/deep-freeze-0.0.1.tgz", + "integrity": "sha1-OgsABd4YZygZ39OM0x+RF5yJPoQ=", + "dev": true + }, + "node_modules/deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/detect-indent": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", + "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/es6-promise": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", + "integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=", + "dev": true + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "dev": true + }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-replace": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-2.0.1.tgz", + "integrity": "sha512-LzDo3Fpa30FLIBsh6DCDnMN1KW2g4QKkqKmejlImgWY67dDFPX/x9Kh/op/GK522DchQXEvDi/wD48HKW49XOQ==", + "dependencies": { + "array-back": "^2.0.0", + "test-value": "^3.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/flatbuffers": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/flatbuffers/-/flatbuffers-1.11.0.tgz", + "integrity": "sha512-0PqFKtXI4MjxomI7jO4g5XfLPm/15g2R+5WGCHBGYGh0ihQiypnHlJ6bMmkkrAe0GzZ4d7PDAfCONKIPUxNF+A==" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/get-port": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", + "integrity": "sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw=", + "engines": { + "node": ">=4" + } + }, + "node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", + "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", + "dev": true + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "engines": { + "node": ">=4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz", + "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", + "dev": true + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-reference": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", + "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", + "dev": true, + "dependencies": { + "@types/estree": "*" + } + }, + "node_modules/jest-worker": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.9.0.tgz", + "integrity": "sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw==", + "dev": true, + "dependencies": { + "merge-stream": "^2.0.0", + "supports-color": "^6.1.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/json-bignum": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/json-bignum/-/json-bignum-0.0.3.tgz", + "integrity": "sha1-QRY7UENsdz2CQk28IO1w23YEuNc=", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "engines": { + "node": ">=6" + } + }, + "node_modules/livereload": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/livereload/-/livereload-0.9.3.tgz", + "integrity": "sha512-q7Z71n3i4X0R9xthAryBdNGVGAO2R5X+/xXpmKeuPMrteg+W2U8VusTKV3YiJbXZwKsOlFlHe+go6uSNjfxrZw==", + "dev": true, + "dependencies": { + "chokidar": "^3.5.0", + "livereload-js": "^3.3.1", + "opts": ">= 1.2.0", + "ws": "^7.4.3" + }, + "bin": { + "livereload": "bin/livereload.js" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/livereload-js": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-3.3.2.tgz", + "integrity": "sha512-w677WnINxFkuixAoUEXOStewzLYGI76XVag+0JWMMEyjJQKs0ibWZMxkTlB96Lm3EjZ7IeOxVziBEbtxVQqQZA==", + "dev": true + }, + "node_modules/local-access": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/local-access/-/local-access-1.1.0.tgz", + "integrity": "sha512-XfegD5pyTAfb+GY6chk283Ox5z8WexG56OvM06RWLpAc/UHozO8X6xAxEkIitZOtsSMM1Yr3DkHgW5W+onLhCw==", + "engines": { + "node": ">=6" + } + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" + }, + "node_modules/lodash.padend": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/lodash.padend/-/lodash.padend-4.6.1.tgz", + "integrity": "sha1-U8y6BH0G4VjTEfRdpiX05J5vFm4=" + }, + "node_modules/magic-string": { + "version": "0.25.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", + "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", + "dev": true, + "dependencies": { + "sourcemap-codec": "^1.4.4" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/mime": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz", + "integrity": "sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "node_modules/mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mri": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", + "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/opts": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/opts/-/opts-2.0.2.tgz", + "integrity": "sha512-k41FwbcLnlgnFh69f4qdUfvDQ+5vaSDnVPFI/y5XuhKRq97EnVVneO9F1ESVCdiVu4fCS2L8usX3mU331hB7pg==", + "dev": true + }, + "node_modules/pad-left": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pad-left/-/pad-left-2.1.0.tgz", + "integrity": "sha1-FuajstRKjhOMsIOMx8tAOk/J6ZQ=", + "dependencies": { + "repeat-string": "^1.5.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/reduce-flatten": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-1.0.1.tgz", + "integrity": "sha1-JYx479FT3fk8tWEjf2EYTzaW4yc=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/require-relative": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz", + "integrity": "sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4=", + "dev": true + }, + "node_modules/resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "dev": true, + "dependencies": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/rollup": { + "version": "2.59.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.59.0.tgz", + "integrity": "sha512-l7s90JQhCQ6JyZjKgo7Lq1dKh2RxatOM+Jr6a9F7WbS9WgKbocyUSeLmZl8evAse7y96Ae98L2k1cBOwWD8nHw==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=10.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/rollup-plugin-livereload": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-livereload/-/rollup-plugin-livereload-1.3.0.tgz", + "integrity": "sha512-abyqXaB21+nFHo+vJULBqfzNx6zXABC19UyvqgDfdoxR/8pFAd041GO+GIUe8ZYC2DbuMUmioh1Lvbk14YLZgw==", + "dev": true, + "dependencies": { + "livereload": "^0.9.1" + } + }, + "node_modules/rollup-plugin-svelte": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-svelte/-/rollup-plugin-svelte-6.1.1.tgz", + "integrity": "sha512-ijnm0pH1ScrY4uxwaNXBpNVejVzpL2769hIEbAlnqNUWZrffLspu5/k9/l/Wsj3NrEHLQ6wCKGagVJonyfN7ow==", + "dev": true, + "dependencies": { + "require-relative": "^0.8.7", + "rollup-pluginutils": "^2.8.2", + "sourcemap-codec": "^1.4.8" + }, + "peerDependencies": { + "rollup": ">=1.19.2", + "svelte": "*" + } + }, + "node_modules/rollup-plugin-terser": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-5.3.1.tgz", + "integrity": "sha512-1pkwkervMJQGFYvM9nscrUoncPwiKR/K+bHdjv6PFgRo3cgPHoRT83y2Aa3GvINj4539S15t/tpFPb775TDs6w==", + "deprecated": "This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.5.5", + "jest-worker": "^24.9.0", + "rollup-pluginutils": "^2.8.2", + "serialize-javascript": "^4.0.0", + "terser": "^4.6.2" + }, + "peerDependencies": { + "rollup": ">=0.66.0 <3" + } + }, + "node_modules/rollup-pluginutils": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", + "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", + "dev": true, + "dependencies": { + "estree-walker": "^0.6.1" + } + }, + "node_modules/rollup-pluginutils/node_modules/estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true + }, + "node_modules/sade": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/sade/-/sade-1.7.4.tgz", + "integrity": "sha512-y5yauMD93rX840MwUJr7C1ysLFBgMspsdTo4UVrDg3fXDvtwOyIqykhVAAm6fk/3au77773itJStObgK+LKaiA==", + "dependencies": { + "mri": "^1.1.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/sander": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/sander/-/sander-0.5.1.tgz", + "integrity": "sha1-dB4kXiMfB8r7b98PEzrfohalAq0=", + "dev": true, + "dependencies": { + "es6-promise": "^3.1.2", + "graceful-fs": "^4.1.3", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.2" + } + }, + "node_modules/semiver": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/semiver/-/semiver-1.1.0.tgz", + "integrity": "sha512-QNI2ChmuioGC1/xjyYwyZYADILWyW6AmS1UH6gDj/SFUUUS4MBAWs/7mxnkRPc/F4iHezDP+O8t0dO8WHiEOdg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/serialize-javascript": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/sirv": { + "version": "1.0.18", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-1.0.18.tgz", + "integrity": "sha512-f2AOPogZmXgJ9Ma2M22ZEhc1dNtRIzcEkiflMFeVTRq+OViOZMvH1IPMVOwrKaxpSaHioBJiDR0SluRqGa7atA==", + "dependencies": { + "@polka/url": "^1.0.0-next.20", + "mime": "^2.3.1", + "totalist": "^1.0.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/sirv-cli": { + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/sirv-cli/-/sirv-cli-1.0.14.tgz", + "integrity": "sha512-yyUTNr984ANKDloqepkYbBSqvx3buwYg2sQKPWjSU+IBia5loaoka2If8N9CMwt8AfP179cdEl7kYJ//iWJHjQ==", + "dependencies": { + "console-clear": "^1.1.0", + "get-port": "^3.2.0", + "kleur": "^3.0.0", + "local-access": "^1.0.1", + "sade": "^1.6.0", + "semiver": "^1.0.0", + "sirv": "^1.0.13", + "tinydate": "^1.0.0" + }, + "bin": { + "sirv": "bin.js" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/sorcery": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.10.0.tgz", + "integrity": "sha1-iukK19fLBfxZ8asMY3hF1cFaUrc=", + "dev": true, + "dependencies": { + "buffer-crc32": "^0.2.5", + "minimist": "^1.2.0", + "sander": "^0.5.0", + "sourcemap-codec": "^1.3.0" + }, + "bin": { + "sorcery": "bin/index.js" + } + }, + "node_modules/source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/source-map-support": { + "version": "0.5.20", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz", + "integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "deprecated": "Please use @jridgewell/sourcemap-codec instead", + "dev": true + }, + "node_modules/strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "dependencies": { + "min-indent": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/svelte": { + "version": "3.44.1", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.44.1.tgz", + "integrity": "sha512-4DrCEJoBvdR689efHNSxIQn2pnFwB7E7j2yLEJtHE/P8hxwZWIphCtJ8are7bjl/iVMlcEf5uh5pJ68IwR09vQ==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/svelte-check": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-1.6.0.tgz", + "integrity": "sha512-nQTlbFJWhwoeLY5rkhgbjzGQSwk5F1pRdEXait0EFaQSrE/iJF+PIjrQlk0BjL/ogk9HaR9ZI0DQSYrl7jl3IQ==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "chokidar": "^3.4.1", + "glob": "^7.1.6", + "import-fresh": "^3.2.1", + "minimist": "^1.2.5", + "sade": "^1.7.4", + "source-map": "^0.7.3", + "svelte-preprocess": "^4.0.0", + "typescript": "*" + }, + "bin": { + "svelte-check": "bin/svelte-check" + }, + "peerDependencies": { + "svelte": "^3.24.0" + } + }, + "node_modules/svelte-check/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/svelte-check/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/svelte-check/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/svelte-check/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/svelte-check/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/svelte-check/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/svelte-preprocess": { + "version": "4.9.8", + "resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-4.9.8.tgz", + "integrity": "sha512-EQS/oRZzMtYdAprppZxY3HcysKh11w54MgA63ybtL+TAZ4hVqYOnhw41JVJjWN9dhPnNjjLzvbZ2tMhTsla1Og==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@types/pug": "^2.0.4", + "@types/sass": "^1.16.0", + "detect-indent": "^6.0.0", + "magic-string": "^0.25.7", + "sorcery": "^0.10.0", + "strip-indent": "^3.0.0" + }, + "engines": { + "node": ">= 9.11.2" + }, + "peerDependencies": { + "@babel/core": "^7.10.2", + "coffeescript": "^2.5.1", + "less": "^3.11.3", + "postcss": "^7 || ^8", + "postcss-load-config": "^2.1.0 || ^3.0.0", + "pug": "^3.0.0", + "sass": "^1.26.8", + "stylus": "^0.54.7", + "sugarss": "^2.0.0", + "svelte": "^3.23.0", + "typescript": "^3.9.5 || ^4.0.0" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "coffeescript": { + "optional": true + }, + "less": { + "optional": true + }, + "node-sass": { + "optional": true + }, + "postcss": { + "optional": true + }, + "postcss-load-config": { + "optional": true + }, + "pug": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/table-layout": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-0.4.5.tgz", + "integrity": "sha512-zTvf0mcggrGeTe/2jJ6ECkJHAQPIYEwDoqsiqBjI24mvRmQbInK5jq33fyypaCBxX08hMkfmdOqj6haT33EqWw==", + "dependencies": { + "array-back": "^2.0.0", + "deep-extend": "~0.6.0", + "lodash.padend": "^4.6.1", + "typical": "^2.6.1", + "wordwrapjs": "^3.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/terser": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz", + "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==", + "dev": true, + "dependencies": { + "commander": "^2.20.0", + "source-map": "~0.6.1", + "source-map-support": "~0.5.12" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/terser/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/test-value": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/test-value/-/test-value-3.0.0.tgz", + "integrity": "sha512-sVACdAWcZkSU9x7AOmJo5TqE+GyNJknHaHsMrR6ZnhjVlVN9Yx6FjHrsKZ3BjIpPCT68zYesPWkakrNupwfOTQ==", + "dependencies": { + "array-back": "^2.0.0", + "typical": "^2.6.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/text-encoding-utf-8": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz", + "integrity": "sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg==" + }, + "node_modules/tinydate": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/tinydate/-/tinydate-1.3.0.tgz", + "integrity": "sha512-7cR8rLy2QhYHpsBDBVYnnWXm8uRTr38RoZakFSW7Bs7PzfMPNZthuMLkwqZv7MTu8lhQ91cOFYS5a7iFj2oR3w==", + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/totalist": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-1.1.0.tgz", + "integrity": "sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g==", + "engines": { + "node": ">=6" + } + }, + "node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + }, + "node_modules/typescript": { + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", + "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/typical": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/typical/-/typical-2.6.1.tgz", + "integrity": "sha1-XAgOXWYcu+OCWdLnCjxyU+hziB0=" + }, + "node_modules/wordwrapjs": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-3.0.0.tgz", + "integrity": "sha512-mO8XtqyPvykVCsrwj5MlOVWvSnCdT+C+QVbm6blradR7JExAhbkZ7hZ9A+9NUtwzSqrlUo9a67ws0EiILrvRpw==", + "dependencies": { + "reduce-flatten": "^1.0.1", + "typical": "^2.6.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "node_modules/ws": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.5.tgz", + "integrity": "sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w==", + "dev": true, + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + } + } +} diff --git a/frontend/node_modules/@babel/code-frame/LICENSE b/frontend/node_modules/@babel/code-frame/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..f31575ec773bb199aeb7c0d0f1612cfe1c7038f1 --- /dev/null +++ b/frontend/node_modules/@babel/code-frame/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/frontend/node_modules/@babel/code-frame/README.md b/frontend/node_modules/@babel/code-frame/README.md new file mode 100644 index 0000000000000000000000000000000000000000..08cacb0477fb94a0a1948270ef7346993d2bf053 --- /dev/null +++ b/frontend/node_modules/@babel/code-frame/README.md @@ -0,0 +1,19 @@ +# @babel/code-frame + +> Generate errors that contain a code frame that point to source locations. + +See our website [@babel/code-frame](https://babeljs.io/docs/en/babel-code-frame) for more information. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/code-frame +``` + +or using yarn: + +```sh +yarn add @babel/code-frame --dev +``` diff --git a/frontend/node_modules/@babel/code-frame/lib/index.js b/frontend/node_modules/@babel/code-frame/lib/index.js new file mode 100644 index 0000000000000000000000000000000000000000..cba3f83792c73cabd4be0d33b2c5a3f8f863fe5e --- /dev/null +++ b/frontend/node_modules/@babel/code-frame/lib/index.js @@ -0,0 +1,163 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.codeFrameColumns = codeFrameColumns; +exports.default = _default; + +var _highlight = require("@babel/highlight"); + +let deprecationWarningShown = false; + +function getDefs(chalk) { + return { + gutter: chalk.grey, + marker: chalk.red.bold, + message: chalk.red.bold + }; +} + +const NEWLINE = /\r\n|[\n\r\u2028\u2029]/; + +function getMarkerLines(loc, source, opts) { + const startLoc = Object.assign({ + column: 0, + line: -1 + }, loc.start); + const endLoc = Object.assign({}, startLoc, loc.end); + const { + linesAbove = 2, + linesBelow = 3 + } = opts || {}; + const startLine = startLoc.line; + const startColumn = startLoc.column; + const endLine = endLoc.line; + const endColumn = endLoc.column; + let start = Math.max(startLine - (linesAbove + 1), 0); + let end = Math.min(source.length, endLine + linesBelow); + + if (startLine === -1) { + start = 0; + } + + if (endLine === -1) { + end = source.length; + } + + const lineDiff = endLine - startLine; + const markerLines = {}; + + if (lineDiff) { + for (let i = 0; i <= lineDiff; i++) { + const lineNumber = i + startLine; + + if (!startColumn) { + markerLines[lineNumber] = true; + } else if (i === 0) { + const sourceLength = source[lineNumber - 1].length; + markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1]; + } else if (i === lineDiff) { + markerLines[lineNumber] = [0, endColumn]; + } else { + const sourceLength = source[lineNumber - i].length; + markerLines[lineNumber] = [0, sourceLength]; + } + } + } else { + if (startColumn === endColumn) { + if (startColumn) { + markerLines[startLine] = [startColumn, 0]; + } else { + markerLines[startLine] = true; + } + } else { + markerLines[startLine] = [startColumn, endColumn - startColumn]; + } + } + + return { + start, + end, + markerLines + }; +} + +function codeFrameColumns(rawLines, loc, opts = {}) { + const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts); + const chalk = (0, _highlight.getChalk)(opts); + const defs = getDefs(chalk); + + const maybeHighlight = (chalkFn, string) => { + return highlighted ? chalkFn(string) : string; + }; + + const lines = rawLines.split(NEWLINE); + const { + start, + end, + markerLines + } = getMarkerLines(loc, lines, opts); + const hasColumns = loc.start && typeof loc.start.column === "number"; + const numberMaxWidth = String(end).length; + const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines; + let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index) => { + const number = start + 1 + index; + const paddedNumber = ` ${number}`.slice(-numberMaxWidth); + const gutter = ` ${paddedNumber} |`; + const hasMarker = markerLines[number]; + const lastMarkerLine = !markerLines[number + 1]; + + if (hasMarker) { + let markerLine = ""; + + if (Array.isArray(hasMarker)) { + const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " "); + const numberOfMarkers = hasMarker[1] || 1; + markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), " ", markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join(""); + + if (lastMarkerLine && opts.message) { + markerLine += " " + maybeHighlight(defs.message, opts.message); + } + } + + return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? ` ${line}` : "", markerLine].join(""); + } else { + return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${line}` : ""}`; + } + }).join("\n"); + + if (opts.message && !hasColumns) { + frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}\n${frame}`; + } + + if (highlighted) { + return chalk.reset(frame); + } else { + return frame; + } +} + +function _default(rawLines, lineNumber, colNumber, opts = {}) { + if (!deprecationWarningShown) { + deprecationWarningShown = true; + const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."; + + if (process.emitWarning) { + process.emitWarning(message, "DeprecationWarning"); + } else { + const deprecationError = new Error(message); + deprecationError.name = "DeprecationWarning"; + console.warn(new Error(message)); + } + } + + colNumber = Math.max(colNumber, 0); + const location = { + start: { + column: colNumber, + line: lineNumber + } + }; + return codeFrameColumns(rawLines, location, opts); +} \ No newline at end of file diff --git a/frontend/node_modules/@babel/code-frame/package.json b/frontend/node_modules/@babel/code-frame/package.json new file mode 100644 index 0000000000000000000000000000000000000000..fddb2759647da42cd399516f472ffb48987fa244 --- /dev/null +++ b/frontend/node_modules/@babel/code-frame/package.json @@ -0,0 +1,29 @@ +{ + "name": "@babel/code-frame", + "version": "7.16.0", + "description": "Generate errors that contain a code frame that point to source locations.", + "author": "The Babel Team (https://babel.dev/team)", + "homepage": "https://babel.dev/docs/en/next/babel-code-frame", + "bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "https://github.com/babel/babel.git", + "directory": "packages/babel-code-frame" + }, + "main": "./lib/index.js", + "dependencies": { + "@babel/highlight": "^7.16.0" + }, + "devDependencies": { + "@types/chalk": "^2.0.0", + "chalk": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } +} \ No newline at end of file diff --git a/frontend/node_modules/@babel/helper-validator-identifier/LICENSE b/frontend/node_modules/@babel/helper-validator-identifier/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..f31575ec773bb199aeb7c0d0f1612cfe1c7038f1 --- /dev/null +++ b/frontend/node_modules/@babel/helper-validator-identifier/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/frontend/node_modules/@babel/helper-validator-identifier/README.md b/frontend/node_modules/@babel/helper-validator-identifier/README.md new file mode 100644 index 0000000000000000000000000000000000000000..6733576a8ce76b5f2a8a766884487c608e838aad --- /dev/null +++ b/frontend/node_modules/@babel/helper-validator-identifier/README.md @@ -0,0 +1,19 @@ +# @babel/helper-validator-identifier + +> Validate identifier/keywords name + +See our website [@babel/helper-validator-identifier](https://babeljs.io/docs/en/babel-helper-validator-identifier) for more information. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/helper-validator-identifier +``` + +or using yarn: + +```sh +yarn add @babel/helper-validator-identifier --dev +``` diff --git a/frontend/node_modules/@babel/helper-validator-identifier/lib/identifier.js b/frontend/node_modules/@babel/helper-validator-identifier/lib/identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..b8a5d9a67f740841499eacdef7e05094bd4a0833 --- /dev/null +++ b/frontend/node_modules/@babel/helper-validator-identifier/lib/identifier.js @@ -0,0 +1,84 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isIdentifierStart = isIdentifierStart; +exports.isIdentifierChar = isIdentifierChar; +exports.isIdentifierName = isIdentifierName; +let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ca\ua7d0\ua7d1\ua7d3\ua7d5-\ua7d9\ua7f2-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; +let nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0898-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"; +const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); +const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); +nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; +const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1070, 4050, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 46, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 482, 44, 11, 6, 17, 0, 322, 29, 19, 43, 1269, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4152, 8, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938]; +const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 357, 0, 62, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; + +function isInAstralSet(code, set) { + let pos = 0x10000; + + for (let i = 0, length = set.length; i < length; i += 2) { + pos += set[i]; + if (pos > code) return false; + pos += set[i + 1]; + if (pos >= code) return true; + } + + return false; +} + +function isIdentifierStart(code) { + if (code < 65) return code === 36; + if (code <= 90) return true; + if (code < 97) return code === 95; + if (code <= 122) return true; + + if (code <= 0xffff) { + return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); + } + + return isInAstralSet(code, astralIdentifierStartCodes); +} + +function isIdentifierChar(code) { + if (code < 48) return code === 36; + if (code < 58) return true; + if (code < 65) return false; + if (code <= 90) return true; + if (code < 97) return code === 95; + if (code <= 122) return true; + + if (code <= 0xffff) { + return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); + } + + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); +} + +function isIdentifierName(name) { + let isFirst = true; + + for (let i = 0; i < name.length; i++) { + let cp = name.charCodeAt(i); + + if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) { + const trail = name.charCodeAt(++i); + + if ((trail & 0xfc00) === 0xdc00) { + cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff); + } + } + + if (isFirst) { + isFirst = false; + + if (!isIdentifierStart(cp)) { + return false; + } + } else if (!isIdentifierChar(cp)) { + return false; + } + } + + return !isFirst; +} \ No newline at end of file diff --git a/frontend/node_modules/@babel/helper-validator-identifier/lib/index.js b/frontend/node_modules/@babel/helper-validator-identifier/lib/index.js new file mode 100644 index 0000000000000000000000000000000000000000..7b623c90a6e164c669cedff262de4048c2290857 --- /dev/null +++ b/frontend/node_modules/@babel/helper-validator-identifier/lib/index.js @@ -0,0 +1,57 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "isIdentifierName", { + enumerable: true, + get: function () { + return _identifier.isIdentifierName; + } +}); +Object.defineProperty(exports, "isIdentifierChar", { + enumerable: true, + get: function () { + return _identifier.isIdentifierChar; + } +}); +Object.defineProperty(exports, "isIdentifierStart", { + enumerable: true, + get: function () { + return _identifier.isIdentifierStart; + } +}); +Object.defineProperty(exports, "isReservedWord", { + enumerable: true, + get: function () { + return _keyword.isReservedWord; + } +}); +Object.defineProperty(exports, "isStrictBindOnlyReservedWord", { + enumerable: true, + get: function () { + return _keyword.isStrictBindOnlyReservedWord; + } +}); +Object.defineProperty(exports, "isStrictBindReservedWord", { + enumerable: true, + get: function () { + return _keyword.isStrictBindReservedWord; + } +}); +Object.defineProperty(exports, "isStrictReservedWord", { + enumerable: true, + get: function () { + return _keyword.isStrictReservedWord; + } +}); +Object.defineProperty(exports, "isKeyword", { + enumerable: true, + get: function () { + return _keyword.isKeyword; + } +}); + +var _identifier = require("./identifier"); + +var _keyword = require("./keyword"); \ No newline at end of file diff --git a/frontend/node_modules/@babel/helper-validator-identifier/lib/keyword.js b/frontend/node_modules/@babel/helper-validator-identifier/lib/keyword.js new file mode 100644 index 0000000000000000000000000000000000000000..110cee4002896b7024e15c0e92f505eb40b9afa6 --- /dev/null +++ b/frontend/node_modules/@babel/helper-validator-identifier/lib/keyword.js @@ -0,0 +1,38 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isReservedWord = isReservedWord; +exports.isStrictReservedWord = isStrictReservedWord; +exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord; +exports.isStrictBindReservedWord = isStrictBindReservedWord; +exports.isKeyword = isKeyword; +const reservedWords = { + keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"], + strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"], + strictBind: ["eval", "arguments"] +}; +const keywords = new Set(reservedWords.keyword); +const reservedWordsStrictSet = new Set(reservedWords.strict); +const reservedWordsStrictBindSet = new Set(reservedWords.strictBind); + +function isReservedWord(word, inModule) { + return inModule && word === "await" || word === "enum"; +} + +function isStrictReservedWord(word, inModule) { + return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); +} + +function isStrictBindOnlyReservedWord(word) { + return reservedWordsStrictBindSet.has(word); +} + +function isStrictBindReservedWord(word, inModule) { + return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word); +} + +function isKeyword(word) { + return keywords.has(word); +} \ No newline at end of file diff --git a/frontend/node_modules/@babel/helper-validator-identifier/package.json b/frontend/node_modules/@babel/helper-validator-identifier/package.json new file mode 100644 index 0000000000000000000000000000000000000000..0efb119c4b51652563b9fcf009c88120123e3b58 --- /dev/null +++ b/frontend/node_modules/@babel/helper-validator-identifier/package.json @@ -0,0 +1,24 @@ +{ + "name": "@babel/helper-validator-identifier", + "version": "7.15.7", + "description": "Validate identifier/keywords name", + "repository": { + "type": "git", + "url": "https://github.com/babel/babel.git", + "directory": "packages/babel-helper-validator-identifier" + }, + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "main": "./lib/index.js", + "exports": "./lib/index.js", + "devDependencies": { + "@unicode/unicode-14.0.0": "^1.2.1", + "charcodes": "^0.2.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "author": "The Babel Team (https://babel.dev/team)" +} \ No newline at end of file diff --git a/frontend/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js b/frontend/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js new file mode 100644 index 0000000000000000000000000000000000000000..f644d77df9f124be316a87baeac03d16ab31fac6 --- /dev/null +++ b/frontend/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js @@ -0,0 +1,75 @@ +"use strict"; + +// Always use the latest available version of Unicode! +// https://tc39.github.io/ecma262/#sec-conformance +const version = "14.0.0"; + +const start = require("@unicode/unicode-" + + version + + "/Binary_Property/ID_Start/code-points.js").filter(function (ch) { + return ch > 0x7f; +}); +let last = -1; +const cont = [0x200c, 0x200d].concat( + require("@unicode/unicode-" + + version + + "/Binary_Property/ID_Continue/code-points.js").filter(function (ch) { + return ch > 0x7f && search(start, ch, last + 1) == -1; + }) +); + +function search(arr, ch, starting) { + for (let i = starting; arr[i] <= ch && i < arr.length; last = i++) { + if (arr[i] === ch) return i; + } + return -1; +} + +function pad(str, width) { + while (str.length < width) str = "0" + str; + return str; +} + +function esc(code) { + const hex = code.toString(16); + if (hex.length <= 2) return "\\x" + pad(hex, 2); + else return "\\u" + pad(hex, 4); +} + +function generate(chars) { + const astral = []; + let re = ""; + for (let i = 0, at = 0x10000; i < chars.length; i++) { + const from = chars[i]; + let to = from; + while (i < chars.length - 1 && chars[i + 1] == to + 1) { + i++; + to++; + } + if (to <= 0xffff) { + if (from == to) re += esc(from); + else if (from + 1 == to) re += esc(from) + esc(to); + else re += esc(from) + "-" + esc(to); + } else { + astral.push(from - at, to - from); + at = to; + } + } + return { nonASCII: re, astral: astral }; +} + +const startData = generate(start); +const contData = generate(cont); + +console.log("/* prettier-ignore */"); +console.log('let nonASCIIidentifierStartChars = "' + startData.nonASCII + '";'); +console.log("/* prettier-ignore */"); +console.log('let nonASCIIidentifierChars = "' + contData.nonASCII + '";'); +console.log("/* prettier-ignore */"); +console.log( + "const astralIdentifierStartCodes = " + JSON.stringify(startData.astral) + ";" +); +console.log("/* prettier-ignore */"); +console.log( + "const astralIdentifierCodes = " + JSON.stringify(contData.astral) + ";" +); diff --git a/frontend/node_modules/@babel/highlight/LICENSE b/frontend/node_modules/@babel/highlight/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..f31575ec773bb199aeb7c0d0f1612cfe1c7038f1 --- /dev/null +++ b/frontend/node_modules/@babel/highlight/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/frontend/node_modules/@babel/highlight/README.md b/frontend/node_modules/@babel/highlight/README.md new file mode 100644 index 0000000000000000000000000000000000000000..f8887ad2ca470c6202b1738436055b1fa3028846 --- /dev/null +++ b/frontend/node_modules/@babel/highlight/README.md @@ -0,0 +1,19 @@ +# @babel/highlight + +> Syntax highlight JavaScript strings for output in terminals. + +See our website [@babel/highlight](https://babeljs.io/docs/en/babel-highlight) for more information. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/highlight +``` + +or using yarn: + +```sh +yarn add @babel/highlight --dev +``` diff --git a/frontend/node_modules/@babel/highlight/lib/index.js b/frontend/node_modules/@babel/highlight/lib/index.js new file mode 100644 index 0000000000000000000000000000000000000000..b8537b26f6ba13df21a6a835eb62d1909a19e1d2 --- /dev/null +++ b/frontend/node_modules/@babel/highlight/lib/index.js @@ -0,0 +1,116 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = highlight; +exports.getChalk = getChalk; +exports.shouldHighlight = shouldHighlight; + +var _jsTokens = require("js-tokens"); + +var _helperValidatorIdentifier = require("@babel/helper-validator-identifier"); + +var _chalk = require("chalk"); + +const sometimesKeywords = new Set(["as", "async", "from", "get", "of", "set"]); + +function getDefs(chalk) { + return { + keyword: chalk.cyan, + capitalized: chalk.yellow, + jsxIdentifier: chalk.yellow, + punctuator: chalk.yellow, + number: chalk.magenta, + string: chalk.green, + regex: chalk.magenta, + comment: chalk.grey, + invalid: chalk.white.bgRed.bold + }; +} + +const NEWLINE = /\r\n|[\n\r\u2028\u2029]/; +const BRACKET = /^[()[\]{}]$/; +let tokenize; +{ + const JSX_TAG = /^[a-z][\w-]*$/i; + + const getTokenType = function (token, offset, text) { + if (token.type === "name") { + if ((0, _helperValidatorIdentifier.isKeyword)(token.value) || (0, _helperValidatorIdentifier.isStrictReservedWord)(token.value, true) || sometimesKeywords.has(token.value)) { + return "keyword"; + } + + if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == " colorize(str)).join("\n"); + } else { + highlighted += value; + } + } + + return highlighted; +} + +function shouldHighlight(options) { + return !!_chalk.supportsColor || options.forceColor; +} + +function getChalk(options) { + return options.forceColor ? new _chalk.constructor({ + enabled: true, + level: 1 + }) : _chalk; +} + +function highlight(code, options = {}) { + if (shouldHighlight(options)) { + const chalk = getChalk(options); + const defs = getDefs(chalk); + return highlightTokens(defs, code); + } else { + return code; + } +} \ No newline at end of file diff --git a/frontend/node_modules/@babel/highlight/package.json b/frontend/node_modules/@babel/highlight/package.json new file mode 100644 index 0000000000000000000000000000000000000000..a18f453f116bbe0985b9005f8c934c4bbc181f0f --- /dev/null +++ b/frontend/node_modules/@babel/highlight/package.json @@ -0,0 +1,29 @@ +{ + "name": "@babel/highlight", + "version": "7.16.0", + "description": "Syntax highlight JavaScript strings for output in terminals.", + "author": "The Babel Team (https://babel.dev/team)", + "homepage": "https://babel.dev/docs/en/next/babel-highlight", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "https://github.com/babel/babel.git", + "directory": "packages/babel-highlight" + }, + "main": "./lib/index.js", + "dependencies": { + "@babel/helper-validator-identifier": "^7.15.7", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "devDependencies": { + "@types/chalk": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } +} \ No newline at end of file diff --git a/frontend/node_modules/@polka/url/build.js b/frontend/node_modules/@polka/url/build.js new file mode 100644 index 0000000000000000000000000000000000000000..33dfc56cc3581d838d452b005cc89bd05380dd20 --- /dev/null +++ b/frontend/node_modules/@polka/url/build.js @@ -0,0 +1,42 @@ +const qs = require('querystring'); + +/** + * @typedef ParsedURL + * @type {import('.').ParsedURL} + */ + +/** + * @typedef Request + * @property {string} url + * @property {ParsedURL} _parsedUrl + */ + +/** + * @param {Request} req + * @returns {ParsedURL|void} + */ +function parse(req) { + let raw = req.url; + if (raw == null) return; + + let prev = req._parsedUrl; + if (prev && prev.raw === raw) return prev; + + let pathname=raw, search='', query; + + if (raw.length > 1) { + let idx = raw.indexOf('?', 1); + + if (idx !== -1) { + search = raw.substring(idx); + pathname = raw.substring(0, idx); + if (search.length > 1) { + query = qs.parse(search.substring(1)); + } + } + } + + return req._parsedUrl = { pathname, search, query, raw }; +} + +exports.parse = parse; \ No newline at end of file diff --git a/frontend/node_modules/@polka/url/build.mjs b/frontend/node_modules/@polka/url/build.mjs new file mode 100644 index 0000000000000000000000000000000000000000..9d5e7b91132ce31a4096284160ad00c4e3164922 --- /dev/null +++ b/frontend/node_modules/@polka/url/build.mjs @@ -0,0 +1,40 @@ +import * as qs from 'querystring'; + +/** + * @typedef ParsedURL + * @type {import('.').ParsedURL} + */ + +/** + * @typedef Request + * @property {string} url + * @property {ParsedURL} _parsedUrl + */ + +/** + * @param {Request} req + * @returns {ParsedURL|void} + */ +export function parse(req) { + let raw = req.url; + if (raw == null) return; + + let prev = req._parsedUrl; + if (prev && prev.raw === raw) return prev; + + let pathname=raw, search='', query; + + if (raw.length > 1) { + let idx = raw.indexOf('?', 1); + + if (idx !== -1) { + search = raw.substring(idx); + pathname = raw.substring(0, idx); + if (search.length > 1) { + query = qs.parse(search.substring(1)); + } + } + } + + return req._parsedUrl = { pathname, search, query, raw }; +} diff --git a/frontend/node_modules/@polka/url/index.d.ts b/frontend/node_modules/@polka/url/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9b27c042e4689444de12b45c6486ce8ae50f41d3 --- /dev/null +++ b/frontend/node_modules/@polka/url/index.d.ts @@ -0,0 +1,10 @@ +import type { IncomingMessage } from 'http'; + +export interface ParsedURL { + pathname: string; + search: string; + query: Record | void; + raw: string; +} + +export function parse(req: IncomingMessage): ParsedURL; diff --git a/frontend/node_modules/@polka/url/license b/frontend/node_modules/@polka/url/license new file mode 100644 index 0000000000000000000000000000000000000000..d46889ae35762abe2fc2f33a4b2ef0825fd1a6dc --- /dev/null +++ b/frontend/node_modules/@polka/url/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Luke Edwards (https://lukeed.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/frontend/node_modules/@polka/url/package.json b/frontend/node_modules/@polka/url/package.json new file mode 100644 index 0000000000000000000000000000000000000000..2d36518dd095e2d3ad4ceed6482c17befd99534f --- /dev/null +++ b/frontend/node_modules/@polka/url/package.json @@ -0,0 +1,30 @@ +{ + "version": "1.0.0-next.21", + "name": "@polka/url", + "repository": "lukeed/polka", + "description": "Super fast, memoized `req.url` parser", + "module": "build.mjs", + "types": "index.d.ts", + "main": "build.js", + "license": "MIT", + "exports": { + ".": { + "import": "./build.mjs", + "require": "./build.js" + }, + "./package.json": "./package.json" + }, + "files": [ + "*.d.ts", + "build.*" + ], + "author": { + "name": "Luke Edwards", + "email": "luke@lukeed.com", + "url": "https://lukeed.com" + }, + "publishConfig": { + "access": "public" + }, + "gitHead": "8d6e31871225f4449e645ecba13de7014f772b34" +} diff --git a/frontend/node_modules/@polka/url/readme.md b/frontend/node_modules/@polka/url/readme.md new file mode 100644 index 0000000000000000000000000000000000000000..69947a7ac859d42393c0d8d21ca38b7cdb030911 --- /dev/null +++ b/frontend/node_modules/@polka/url/readme.md @@ -0,0 +1,68 @@ +# @polka/url [![npm](https://badgen.now.sh/npm/v/@polka/url)](https://npmjs.org/package/@polka/url) + +> Super fast, memoized `req.url` parser; _not_ limited to [Polka][polka]! + +Parses the `url` from a [`IncomingMessage`](https://nodejs.org/api/http.html#http_class_http_incomingmessage) request. The returned object will always only contain the following keys: `search`, `query`, `pathname`, and `raw`. + +> **Note:** This library does not process `protocol`, `hostname`, `port`, etc.
This is because the incoming `req.url` value only begins with the path information. + +Parsed requests will be mutated with a `_parsedUrl` key, containing the returned output. This is used for future memoization, avoiding the need to fully parse the same `url` value multiple times. + +## Install + +``` +$ npm install --save @polka/url +``` + +## Usage + +```js +const parse = require('@polka/url'); + +let req = { + url: '/foo/bar?fizz=buzz' +}; +let output = parse(req); +//=> { +//=> pathname: '/foo/bar', +//=> raw: '/foo/bar?fizz=buzz', +//=> search: '?fizz=buzz', +//=> query: { +//=> fizz: 'buzz' +//=> }, +//=> } + +// Attaches result for future memoization +assert.deepEqual(output, req._parsedUrl); //=> true +``` + +## API + +### url(req) +Returns: `Object` or `undefined` + +> **Important:** The `req` must have a `url` key, otherwise `undefined` will be returned.
If no input is provided at all, a `TypeError` will be thrown. + +#### req +Type: `IncomingMessage` or `{ url: string }` + +The incoming HTTP request (`req`) or a plain `Object` with a `url` key. + +> **Note:** In Node.js servers, the [`req.url`](https://nodejs.org/api/http.html#http_message_url) begins with a pathname & does not include a `hash`. + + +## Benchmarks + +Check out the [`bench`](/bench) directory for in-depth benchmark results and comparisons. + + +## Support + +Any issues or questions can be sent to the [Polka][polka] repository.
However, please specify that your inquiry is about `@polka/url` specifically. + + +## License + +MIT © [Luke Edwards](https://lukeed.com) + +[polka]: https://github.com/lukeed/polka diff --git a/frontend/node_modules/@rollup/plugin-commonjs/CHANGELOG.md b/frontend/node_modules/@rollup/plugin-commonjs/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..e63f84f712267de790fd54f53093868cf42d1081 --- /dev/null +++ b/frontend/node_modules/@rollup/plugin-commonjs/CHANGELOG.md @@ -0,0 +1,410 @@ +# @rollup/plugin-commonjs ChangeLog + +## v12.0.0 + +_2020-05-20_ + +### Breaking Changes + +- feat: add kill-switch for mixed es-cjs modules (#358) +- feat: set syntheticNamedExports for commonjs modules (#149) + +### Bugfixes + +- fix: expose the virtual `require` function on mock `module`. fixes #307 (#326) +- fix: improved shouldWrap logic. fixes #304 (#355) + +### Features + +- feat: support for explicit module.require calls. fixes #310 (#325) + +## v11.1.0 + +_2020-04-12_ + +### Bugfixes + +- fix: produce legal variable names from filenames containing hyphens. (#201) + +### Features + +- feat: support dynamic require (#206) +- feat: export properties defined using Object.defineProperty(exports, ..) (#222) + +### Updates + +- chore: snapshot mismatch running tests before publish (d6bbfdd) +- test: add snapshots to all "function" tests (#218) + +## v11.0.2 + +_2020-02-01_ + +### Updates + +- docs: fix link for plugin-node-resolve (#170) +- chore: update dependencies (5405eea) +- chore: remove jsnext:main (#152) + +## v11.0.1 + +_2020-01-04_ + +### Bugfixes + +- fix: module.exports object spread (#121) + +## 11.0.0 + +_2019-12-13_ + +- **Breaking:** Minimum compatible Rollup version is 1.20.0 +- **Breaking:** Minimum supported Node version is 8.0.0 +- Published as @rollup/plugin-commonjs + +## 10.1.0 + +_2019-08-27_ + +- Normalize ids before looking up in named export map ([#406](https://github.com/rollup/rollup-plugin-commonjs/issues/406)) +- Update README.md with note on symlinks ([#405](https://github.com/rollup/rollup-plugin-commonjs/issues/405)) + +## 10.0.2 + +_2019-08-03_ + +- Support preserveSymlinks: false ([#401](https://github.com/rollup/rollup-plugin-commonjs/issues/401)) + +## 10.0.1 + +_2019-06-27_ + +- Make tests run with Node 6 again and update dependencies ([#389](https://github.com/rollup/rollup-plugin-commonjs/issues/389)) +- Handle builtins appropriately for resolve 1.11.0 ([#395](https://github.com/rollup/rollup-plugin-commonjs/issues/395)) + +## 10.0.0 + +_2019-05-15_ + +- Use new Rollup@1.12 context functions, fix issue when resolveId returns an object ([#387](https://github.com/rollup/rollup-plugin-commonjs/issues/387)) + +## 9.3.4 + +_2019-04-04_ + +- Make "extensions" optional ([#384](https://github.com/rollup/rollup-plugin-commonjs/issues/384)) +- Use same typing for include and exclude properties ([#385](https://github.com/rollup/rollup-plugin-commonjs/issues/385)) + +## 9.3.3 + +_2019-04-04_ + +- Remove colon from module prefixes ([#371](https://github.com/rollup/rollup-plugin-commonjs/issues/371)) + +## 9.3.2 + +_2019-04-04_ + +- Use shared extractAssignedNames, fix destructuring issue ([#303](https://github.com/rollup/rollup-plugin-commonjs/issues/303)) + +## 9.3.1 + +_2019-04-04_ + +- Include typings in release ([#382](https://github.com/rollup/rollup-plugin-commonjs/issues/382)) + +## 9.3.0 + +_2019-04-03_ + +- Add TypeScript types ([#363](https://github.com/rollup/rollup-plugin-commonjs/issues/363)) + +## 9.2.3 + +_2019-04-02_ + +- Improve support for ES3 browsers ([#364](https://github.com/rollup/rollup-plugin-commonjs/issues/364)) +- Add note about monorepo usage to readme ([#372](https://github.com/rollup/rollup-plugin-commonjs/issues/372)) +- Add .js extension to generated helper file ([#373](https://github.com/rollup/rollup-plugin-commonjs/issues/373)) + +## 9.2.2 + +_2019-03-25_ + +- Handle array destructuring assignment ([#379](https://github.com/rollup/rollup-plugin-commonjs/issues/379)) + +## 9.2.1 + +_2019-02-23_ + +- Use correct context when manually resolving ids ([#370](https://github.com/rollup/rollup-plugin-commonjs/issues/370)) + +## 9.2.0 + +_2018-10-10_ + +- Fix missing default warning, produce better code when importing known ESM default exports ([#349](https://github.com/rollup/rollup-plugin-commonjs/issues/349)) +- Refactor code and add prettier ([#346](https://github.com/rollup/rollup-plugin-commonjs/issues/346)) + +## 9.1.8 + +_2018-09-18_ + +- Ignore virtual modules created by other plugins ([#327](https://github.com/rollup/rollup-plugin-commonjs/issues/327)) +- Add "location" and "process" to reserved words ([#330](https://github.com/rollup/rollup-plugin-commonjs/issues/330)) + +## 9.1.6 + +_2018-08-24_ + +- Keep commonJS detection between instantiations ([#338](https://github.com/rollup/rollup-plugin-commonjs/issues/338)) + +## 9.1.5 + +_2018-08-09_ + +- Handle object form of input ([#329](https://github.com/rollup/rollup-plugin-commonjs/issues/329)) + +## 9.1.4 + +_2018-07-27_ + +- Make "from" a reserved word ([#320](https://github.com/rollup/rollup-plugin-commonjs/issues/320)) + +## 9.1.3 + +_2018-04-30_ + +- Fix a caching issue ([#316](https://github.com/rollup/rollup-plugin-commonjs/issues/316)) + +## 9.1.2 + +_2018-04-30_ + +- Re-publication of 9.1.0 + +## 9.1.1 + +_2018-04-30_ + +- Fix ordering of modules when using rollup 0.58 ([#302](https://github.com/rollup/rollup-plugin-commonjs/issues/302)) + +## 9.1.0 + +- Do not automatically wrap modules with return statements in top level arrow functions ([#302](https://github.com/rollup/rollup-plugin-commonjs/issues/302)) + +## 9.0.0 + +- Make rollup a peer dependency with a version range ([#300](https://github.com/rollup/rollup-plugin-commonjs/issues/300)) + +## 8.4.1 + +- Re-release of 8.3.0 as #287 was actually a breaking change + +## 8.4.0 + +- Better handle non-CJS files that contain CJS keywords ([#285](https://github.com/rollup/rollup-plugin-commonjs/issues/285)) +- Use rollup's plugin context`parse` function ([#287](https://github.com/rollup/rollup-plugin-commonjs/issues/287)) +- Improve error handling ([#288](https://github.com/rollup/rollup-plugin-commonjs/issues/288)) + +## 8.3.0 + +- Handle multiple entry points ([#283](https://github.com/rollup/rollup-plugin-commonjs/issues/283)) +- Extract named exports from exported object literals ([#272](https://github.com/rollup/rollup-plugin-commonjs/issues/272)) +- Fix when `options.external` is modified by other plugins ([#264](https://github.com/rollup/rollup-plugin-commonjs/issues/264)) +- Recognize static template strings in require statements ([#271](https://github.com/rollup/rollup-plugin-commonjs/issues/271)) + +## 8.2.4 + +- Don't import default from ES modules that don't export default ([#206](https://github.com/rollup/rollup-plugin-commonjs/issues/206)) + +## 8.2.3 + +- Prevent duplicate default exports ([#230](https://github.com/rollup/rollup-plugin-commonjs/pull/230)) +- Only include default export when it exists ([#226](https://github.com/rollup/rollup-plugin-commonjs/pull/226)) +- Deconflict `require` aliases ([#232](https://github.com/rollup/rollup-plugin-commonjs/issues/232)) + +## 8.2.1 + +- Fix magic-string deprecation warning + +## 8.2.0 + +- Avoid using `index` as a variable name ([#208](https://github.com/rollup/rollup-plugin-commonjs/pull/208)) + +## 8.1.1 + +- Compatibility with 0.48 ([#220](https://github.com/rollup/rollup-plugin-commonjs/issues/220)) + +## 8.1.0 + +- Handle `options.external` correctly ([#212](https://github.com/rollup/rollup-plugin-commonjs/pull/212)) +- Support top-level return ([#195](https://github.com/rollup/rollup-plugin-commonjs/pull/195)) + +## 8.0.2 + +- Fix another `var` rewrite bug ([#181](https://github.com/rollup/rollup-plugin-commonjs/issues/181)) + +## 8.0.1 + +- Remove declarators within a var declaration correctly ([#179](https://github.com/rollup/rollup-plugin-commonjs/issues/179)) + +## 8.0.0 + +- Prefer the names dependencies are imported by for the common `var foo = require('foo')` pattern ([#176](https://github.com/rollup/rollup-plugin-commonjs/issues/176)) + +## 7.1.0 + +- Allow certain `require` statements to pass through unmolested ([#174](https://github.com/rollup/rollup-plugin-commonjs/issues/174)) + +## 7.0.2 + +- Handle duplicate default exports ([#158](https://github.com/rollup/rollup-plugin-commonjs/issues/158)) + +## 7.0.1 + +- Fix exports with parentheses ([#168](https://github.com/rollup/rollup-plugin-commonjs/issues/168)) + +## 7.0.0 + +- Rewrite `typeof module`, `typeof module.exports` and `typeof exports` as `'object'` ([#151](https://github.com/rollup/rollup-plugin-commonjs/issues/151)) + +## 6.0.1 + +- Don't overwrite globals ([#127](https://github.com/rollup/rollup-plugin-commonjs/issues/127)) + +## 6.0.0 + +- Rewrite top-level `define` as `undefined`, so AMD-first UMD blocks do not cause breakage ([#144](https://github.com/rollup/rollup-plugin-commonjs/issues/144)) +- Support ES2017 syntax ([#132](https://github.com/rollup/rollup-plugin-commonjs/issues/132)) +- Deconflict exported reserved keywords ([#116](https://github.com/rollup/rollup-plugin-commonjs/issues/116)) + +## 5.0.5 + +- Fix parenthesis wrapped exports ([#120](https://github.com/rollup/rollup-plugin-commonjs/issues/120)) + +## 5.0.4 + +- Ensure named exports are added to default export in optimised modules ([#112](https://github.com/rollup/rollup-plugin-commonjs/issues/112)) + +## 5.0.3 + +- Respect custom `namedExports` in optimised modules ([#35](https://github.com/rollup/rollup-plugin-commonjs/issues/35)) + +## 5.0.2 + +- Replace `require` (outside call expressions) with `commonjsRequire` helper ([#77](https://github.com/rollup/rollup-plugin-commonjs/issues/77), [#83](https://github.com/rollup/rollup-plugin-commonjs/issues/83)) + +## 5.0.1 + +- Deconflict against globals ([#84](https://github.com/rollup/rollup-plugin-commonjs/issues/84)) + +## 5.0.0 + +- Optimise modules that don't need to be wrapped in a function ([#106](https://github.com/rollup/rollup-plugin-commonjs/pull/106)) +- Ignore modules containing `import` and `export` statements ([#96](https://github.com/rollup/rollup-plugin-commonjs/pull/96)) + +## 4.1.0 + +- Ignore dead branches ([#93](https://github.com/rollup/rollup-plugin-commonjs/issues/93)) + +## 4.0.1 + +- Fix `ignoreGlobal` option ([#86](https://github.com/rollup/rollup-plugin-commonjs/pull/86)) + +## 4.0.0 + +- Better interop and smaller output ([#92](https://github.com/rollup/rollup-plugin-commonjs/pull/92)) + +## 3.3.1 + +- Deconflict export and local module ([rollup/rollup#554](https://github.com/rollup/rollup/issues/554)) + +## 3.3.0 + +- Keep the order of execution for require calls ([#43](https://github.com/rollup/rollup-plugin-commonjs/pull/43)) +- Use interopDefault as helper ([#42](https://github.com/rollup/rollup-plugin-commonjs/issues/42)) + +## 3.2.0 + +- Use named exports as a function when no default export is defined ([#524](https://github.com/rollup/rollup/issues/524)) + +## 3.1.0 + +- Replace `typeof require` with `'function'` ([#38](https://github.com/rollup/rollup-plugin-commonjs/issues/38)) +- Don't attempt to resolve entry file relative to importer ([#63](https://github.com/rollup/rollup-plugin-commonjs/issues/63)) + +## 3.0.2 + +- Handle multiple references to `global` + +## 3.0.1 + +- Return a `name` + +## 3.0.0 + +- Make `transform` stateless ([#71](https://github.com/rollup/rollup-plugin-commonjs/pull/71)) +- Support web worker `global` ([#50](https://github.com/rollup/rollup-plugin-commonjs/issues/50)) +- Ignore global with `options.ignoreGlobal` ([#48](https://github.com/rollup/rollup-plugin-commonjs/issues/48)) + +## 2.2.1 + +- Prevent false positives with `namedExports` ([#36](https://github.com/rollup/rollup-plugin-commonjs/issues/36)) + +## 2.2.0 + +- Rewrite top-level `this` expressions to mean the same as `global` ([#31](https://github.com/rollup/rollup-plugin-commonjs/issues/31)) + +## 2.1.0 + +- Optimised module wrappers ([#20](https://github.com/rollup/rollup-plugin-commonjs/pull/20)) +- Allow control over named exports via `options.namedExports` ([#18](https://github.com/rollup/rollup-plugin-commonjs/issues/18)) +- Handle bare imports correctly ([#23](https://github.com/rollup/rollup-plugin-commonjs/issues/23)) +- Blacklist all reserved words as export names ([#21](https://github.com/rollup/rollup-plugin-commonjs/issues/21)) +- Configure allowed file extensions via `options.extensions` ([#27](https://github.com/rollup/rollup-plugin-commonjs/pull/27)) + +## 2.0.0 + +- Support for transpiled modules – `exports.default` is used as the default export in place of `module.exports`, if applicable, and `__esModule` is not exported ([#16](https://github.com/rollup/rollup-plugin-commonjs/pull/16)) + +## 1.4.0 + +- Generate sourcemaps by default + +## 1.3.0 + +- Handle references to `global` ([#6](https://github.com/rollup/rollup-plugin-commonjs/issues/6)) + +## 1.2.0 + +- Generate named exports where possible ([#5](https://github.com/rollup/rollup-plugin-commonjs/issues/5)) +- Handle shadowed `require`/`module`/`exports` + +## 1.1.0 + +- Handle dots in filenames ([#3](https://github.com/rollup/rollup-plugin-commonjs/issues/3)) +- Wrap modules in IIFE for more readable output + +## 1.0.0 + +- Stable release, now that Rollup supports plugins + +## 0.2.1 + +- Allow mixed CommonJS/ES6 imports/exports +- Use `var` instead of `let` + +## 0.2.0 + +- Sourcemap support +- Support `options.include` and `options.exclude` +- Bail early if module is obviously not a CommonJS module + +## 0.1.1 + +Add dist files to package (whoops!) + +## 0.1.0 + +- First release diff --git a/frontend/node_modules/@rollup/plugin-commonjs/LICENSE b/frontend/node_modules/@rollup/plugin-commonjs/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..5e46702cbdea74f8a8139094f5a1ff1f0e486f45 --- /dev/null +++ b/frontend/node_modules/@rollup/plugin-commonjs/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/contributors) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/frontend/node_modules/@rollup/plugin-commonjs/README.md b/frontend/node_modules/@rollup/plugin-commonjs/README.md new file mode 100644 index 0000000000000000000000000000000000000000..5d67d347cbf7bbd283f15f0d7a30c32d6dcb7411 --- /dev/null +++ b/frontend/node_modules/@rollup/plugin-commonjs/README.md @@ -0,0 +1,165 @@ +[npm]: https://img.shields.io/npm/v/@rollup/plugin-commonjs +[npm-url]: https://www.npmjs.com/package/@rollup/plugin-commonjs +[size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-commonjs +[size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-commonjs + +[![npm][npm]][npm-url] +[![size][size]][size-url] +[![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com) + +# @rollup/plugin-commonjs + +🍣 A Rollup plugin to convert CommonJS modules to ES6, so they can be included in a Rollup bundle + +## Requirements + +This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+. + +## Install + +Using npm: + +```bash +npm install @rollup/plugin-commonjs --save-dev +``` + +## Usage + +Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin: + +```js +import commonjs from '@rollup/plugin-commonjs'; + +export default { + input: 'src/index.js', + output: { + dir: 'output', + format: 'cjs' + }, + plugins: [commonjs()] +}; +``` + +Then call `rollup` either via the [CLI](https://www.rollupjs.org/guide/en/#command-line-reference) or the [API](https://www.rollupjs.org/guide/en/#javascript-api). + +## Options + +### `dynamicRequireTargets` + +Type: `String|Array[String]`
+Default: `[]` + +Some modules contain dynamic `require` calls, or require modules that contain circular dependencies, which are not handled well by static imports. +Including those modules as `dynamicRequireTargets` will simulate a CommonJS (NodeJS-like) environment for them with support for dynamic and circular dependencies. + +_Note: In extreme cases, this feature may result in some paths being rendered as absolute in the final bundle. The plugin tries to avoid exposing paths from the local machine, but if you are `dynamicRequirePaths` with paths that are far away from your project's folder, that may require replacing strings like `"/Users/John/Desktop/foo-project/"` -> `"/"`._ + +Example: + +```js +commonjs({ + dynamicRequireTargets: [ + // include using a glob pattern (either a string or an array of strings) + 'node_modules/logform/*.js', + + // exclude files that are known to not be required dynamically, this allows for better optimizations + '!node_modules/logform/index.js', + '!node_modules/logform/format.js', + '!node_modules/logform/levels.js', + '!node_modules/logform/browser.js' + ] +}); +``` + +### `exclude` + +Type: `String` | `Array[...String]`
+Default: `null` + +A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should _ignore_. By default non-CommonJS modules are ignored. + +### `include` + +Type: `String` | `Array[...String]`
+Default: `null` + +A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default CommonJS modules are targeted. + +### `extensions` + +Type: `Array[...String]`
+Default: `['.js']` + +Search for extensions other than .js in the order specified. + +### `ignoreGlobal` + +Type: `Boolean`
+Default: `false` + +If true, uses of `global` won't be dealt with by this plugin. + +### `sourceMap` + +Type: `Boolean`
+Default: `true` + +If false, skips source map generation for CommonJS modules. + +### `transformMixedEsModules` + +Type: `Boolean`
+Default: `false` + +Instructs the plugin whether or not to enable mixed module transformations. This is useful in scenarios with mixed ES and CommonJS modules. Set to `true` if it's known that `require` calls should be transformed, or `false` if the code contains env detection and the `require` should survive a transformation. + +### `ignore` + +Type: `Array[...String | (String) => Boolean]`
+Default: `[]` + +Sometimes you have to leave require statements unconverted. Pass an array containing the IDs or an `id => boolean` function. Only use this option if you know what you're doing! + +## Using with @rollup/plugin-node-resolve + +Since most CommonJS packages you are importing are probably dependencies in `node_modules`, you may need to use [@rollup/plugin-node-resolve](https://github.com/rollup/plugins/tree/master/packages/node-resolve): + +```js +// rollup.config.js +import resolve from '@rollup/plugin-node-resolve'; +import commonjs from '@rollup/plugin-commonjs'; + +export default { + input: 'main.js', + output: { + file: 'bundle.js', + format: 'iife', + name: 'MyModule' + }, + plugins: [resolve(), commonjs()] +}; +``` + +## Usage with symlinks + +Symlinks are common in monorepos and are also created by the `npm link` command. Rollup with `@rollup/plugin-node-resolve` resolves modules to their real paths by default. So `include` and `exclude` paths should handle real paths rather than symlinked paths (e.g. `../common/node_modules/**` instead of `node_modules/**`). You may also use a regular expression for `include` that works regardless of base path. Try this: + +```js +commonjs({ + include: /node_modules/ +}); +``` + +Whether symlinked module paths are [realpathed](http://man7.org/linux/man-pages/man3/realpath.3.html) or preserved depends on Rollup's `preserveSymlinks` setting, which is false by default, matching Node.js' default behavior. Setting `preserveSymlinks` to true in your Rollup config will cause `import` and `export` to match based on symlinked paths instead. + +## Strict mode + +ES modules are _always_ parsed in strict mode. That means that certain non-strict constructs (like octal literals) will be treated as syntax errors when Rollup parses modules that use them. Some older CommonJS modules depend on those constructs, and if you depend on them your bundle will blow up. There's basically nothing we can do about that. + +Luckily, there is absolutely no good reason _not_ to use strict mode for everything — so the solution to this problem is to lobby the authors of those modules to update them. + +## Meta + +[CONTRIBUTING](/.github/CONTRIBUTING.md) + +[LICENSE (MIT)](/LICENSE) diff --git a/frontend/node_modules/@rollup/plugin-commonjs/dist/index.es.js b/frontend/node_modules/@rollup/plugin-commonjs/dist/index.es.js new file mode 100644 index 0000000000000000000000000000000000000000..52223468ecb25a948e22d09baf211d8bcf1da545 --- /dev/null +++ b/frontend/node_modules/@rollup/plugin-commonjs/dist/index.es.js @@ -0,0 +1,1374 @@ +import { statSync, existsSync, readFileSync } from 'fs'; +import { basename, extname, dirname, sep, resolve, join } from 'path'; +import { makeLegalIdentifier, attachScopes, extractAssignedNames, createFilter } from '@rollup/pluginutils'; +import getCommonDir from 'commondir'; +import glob from 'glob'; +import { walk } from 'estree-walker'; +import MagicString from 'magic-string'; +import { sync } from 'resolve'; +import isReference from 'is-reference'; + +function _slicedToArray(arr, i) { + return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); +} + +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} + +function _iterableToArrayLimit(arr, i) { + if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; +} + +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(n); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); +} + +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + + return arr2; +} + +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} + +function _createForOfIteratorHelper(o) { + if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { + if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { + var i = 0; + + var F = function () {}; + + return { + s: F, + n: function () { + if (i >= o.length) return { + done: true + }; + return { + done: false, + value: o[i++] + }; + }, + e: function (e) { + throw e; + }, + f: F + }; + } + + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + + var it, + normalCompletion = true, + didErr = false, + err; + return { + s: function () { + it = o[Symbol.iterator](); + }, + n: function () { + var step = it.next(); + normalCompletion = step.done; + return step; + }, + e: function (e) { + didErr = true; + err = e; + }, + f: function () { + try { + if (!normalCompletion && it.return != null) it.return(); + } finally { + if (didErr) throw err; + } + } + }; +} + +var peerDependencies = { + rollup: "^2.3.4" +}; + +/* eslint-disable no-undefined */ +const operators = { + '==': x => equals(x.left, x.right, false), + '!=': x => not(operators['=='](x)), + '===': x => equals(x.left, x.right, true), + '!==': x => not(operators['==='](x)), + '!': x => isFalsy(x.argument), + '&&': x => isTruthy(x.left) && isTruthy(x.right), + '||': x => isTruthy(x.left) || isTruthy(x.right) +}; +function flatten(node) { + const parts = []; + + while (node.type === 'MemberExpression') { + if (node.computed) return null; + parts.unshift(node.property.name); // eslint-disable-next-line no-param-reassign + + node = node.object; + } + + if (node.type !== 'Identifier') return null; + const _node = node, + name = _node.name; + parts.unshift(name); + return { + name, + keypath: parts.join('.') + }; +} + +function isTruthy(node) { + if (node.type === 'Literal') return !!node.value; + if (node.type === 'ParenthesizedExpression') return isTruthy(node.expression); + if (node.operator in operators) return operators[node.operator](node); + return undefined; +} +function isFalsy(node) { + return not(isTruthy(node)); +} + +function not(value) { + return value === undefined ? value : !value; +} + +function equals(a, b, strict) { + if (a.type !== b.type) return undefined; // eslint-disable-next-line eqeqeq + + if (a.type === 'Literal') return strict ? a.value === b.value : a.value == b.value; + return undefined; +} + +const PROXY_SUFFIX = '?commonjs-proxy'; +const getProxyId = id => `\0${id}${PROXY_SUFFIX}`; +const getIdFromProxyId = proxyId => proxyId.slice(1, -PROXY_SUFFIX.length); +const EXTERNAL_SUFFIX = '?commonjs-external'; +const getExternalProxyId = id => `\0${id}${EXTERNAL_SUFFIX}`; +const getIdFromExternalProxyId = proxyId => proxyId.slice(1, -EXTERNAL_SUFFIX.length); +const VIRTUAL_PATH_BASE = '/$$rollup_base$$'; +const getVirtualPathForDynamicRequirePath = (path, commonDir) => { + if (path.startsWith(commonDir)) return VIRTUAL_PATH_BASE + path.slice(commonDir.length); + return path; +}; +const DYNAMIC_REGISTER_PREFIX = '\0commonjs-dynamic-register:'; +const DYNAMIC_JSON_PREFIX = '\0commonjs-dynamic-json:'; +const DYNAMIC_PACKAGES_ID = '\0commonjs-dynamic-packages'; +const HELPERS_ID = '\0commonjsHelpers.js'; // `x['default']` is used instead of `x.default` for backward compatibility with ES3 browsers. +// Minifiers like uglify will usually transpile it back if compatibility with ES3 is not enabled. + +const HELPERS = ` +export var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + +export function unwrapExports (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; +} + +export function createCommonjsModule(fn, basedir, module) { + return module = { + path: basedir, + exports: {}, + require: function (path, base) { + return commonjsRequire(path, (base === undefined || base === null) ? module.path : base); + } + }, fn(module, module.exports), module.exports; +} + +export function getCjsExportFromNamespace (n) { + return n && n['default'] || n; +} +`; +const HELPER_NON_DYNAMIC = ` +export function commonjsRequire () { + throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs'); +} +`; +const HELPERS_DYNAMIC = ` +export function commonjsRegister (path, loader) { + DYNAMIC_REQUIRE_LOADERS[path] = loader; +} + +const DYNAMIC_REQUIRE_LOADERS = Object.create(null); +const DYNAMIC_REQUIRE_CACHE = Object.create(null); +const DEFAULT_PARENT_MODULE = { + id: '<' + 'rollup>', exports: {}, parent: undefined, filename: null, loaded: false, children: [], paths: [] +}; +const CHECKED_EXTENSIONS = ['', '.js', '.json']; + +function normalize (path) { + path = path.replace(/\\\\/g, '/'); + const parts = path.split('/'); + const slashed = parts[0] === ''; + for (let i = 1; i < parts.length; i++) { + if (parts[i] === '.' || parts[i] === '') { + parts.splice(i--, 1); + } + } + for (let i = 1; i < parts.length; i++) { + if (parts[i] !== '..') continue; + if (i > 0 && parts[i - 1] !== '..' && parts[i - 1] !== '.') { + parts.splice(--i, 2); + i--; + } + } + path = parts.join('/'); + if (slashed && path[0] !== '/') + path = '/' + path; + else if (path.length === 0) + path = '.'; + return path; +} + +function join () { + if (arguments.length === 0) + return '.'; + let joined; + for (let i = 0; i < arguments.length; ++i) { + let arg = arguments[i]; + if (arg.length > 0) { + if (joined === undefined) + joined = arg; + else + joined += '/' + arg; + } + } + if (joined === undefined) + return '.'; + + return joined; +} + +function isPossibleNodeModulesPath (modulePath) { + let c0 = modulePath[0]; + if (c0 === '/' || c0 === '\\\\') return false; + let c1 = modulePath[1], c2 = modulePath[2]; + if ((c0 === '.' && (!c1 || c1 === '/' || c1 === '\\\\')) || + (c0 === '.' && c1 === '.' && (!c2 || c2 === '/' || c2 === '\\\\'))) return false; + if (c1 === ':' && (c2 === '/' || c2 === '\\\\')) + return false; + return true; +} + +function dirname (path) { + if (path.length === 0) + return '.'; + + let i = path.length - 1; + while (i > 0) { + const c = path.charCodeAt(i); + if ((c === 47 || c === 92) && i !== path.length - 1) + break; + i--; + } + + if (i > 0) + return path.substr(0, i); + + if (path.chartCodeAt(0) === 47 || path.chartCodeAt(0) === 92) + return path.charAt(0); + + return '.'; +} + +export function commonjsRequire (path, originalModuleDir) { + const shouldTryNodeModules = isPossibleNodeModulesPath(path); + path = normalize(path); + let relPath; + while (true) { + if (!shouldTryNodeModules) { + relPath = originalModuleDir ? normalize(originalModuleDir + '/' + path) : path; + } else if (originalModuleDir) { + relPath = normalize(originalModuleDir + '/node_modules/' + path); + } else { + relPath = normalize(join('node_modules', path)); + } + for (let extensionIndex = 0; extensionIndex < CHECKED_EXTENSIONS.length; extensionIndex++) { + const resolvedPath = relPath + CHECKED_EXTENSIONS[extensionIndex]; + let cachedModule = DYNAMIC_REQUIRE_CACHE[resolvedPath]; + if (cachedModule) return cachedModule.exports; + const loader = DYNAMIC_REQUIRE_LOADERS[resolvedPath]; + if (loader) { + DYNAMIC_REQUIRE_CACHE[resolvedPath] = cachedModule = { + id: resolvedPath, + filename: resolvedPath, + path: dirname(resolvedPath), + exports: {}, + parent: DEFAULT_PARENT_MODULE, + loaded: false, + children: [], + paths: [], + require: function (path, base) { + return commonjsRequire(path, (base === undefined || base === null) ? cachedModule.path : base); + } + }; + try { + loader.call(commonjsGlobal, cachedModule, cachedModule.exports); + } catch (error) { + delete DYNAMIC_REQUIRE_CACHE[resolvedPath]; + throw error; + } + cachedModule.loaded = true; + return cachedModule.exports; + }; + } + if (!shouldTryNodeModules) break; + const nextDir = normalize(originalModuleDir + '/..'); + if (nextDir === originalModuleDir) break; + originalModuleDir = nextDir; + } + return require(path); +} + +commonjsRequire.cache = DYNAMIC_REQUIRE_CACHE; +`; + +/* eslint-disable import/prefer-default-export */ +function getName(id) { + const name = makeLegalIdentifier(basename(id, extname(id))); + + if (name !== 'index') { + return name; + } + + const segments = dirname(id).split(sep); + return makeLegalIdentifier(segments[segments.length - 1]); +} + +const reserved = 'process location abstract arguments boolean break byte case catch char class const continue debugger default delete do double else enum eval export extends false final finally float for from function goto if implements import in instanceof int interface let long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with yield'.split(' '); +const blacklist = { + __esModule: true +}; +reserved.forEach(word => blacklist[word] = true); +const exportsPattern = /^(?:module\.)?exports(?:\.([a-zA-Z_$][a-zA-Z_$0-9]*))?$/; +const firstpassGlobal = /\b(?:require|module|exports|global)\b/; +const firstpassNoGlobal = /\b(?:require|module|exports)\b/; +const importExportDeclaration = /^(?:Import|Export(?:Named|Default))Declaration/; +const functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/; + +function deconflict(scope, globals, identifier) { + let i = 1; + let deconflicted = makeLegalIdentifier(identifier); + + while (scope.contains(deconflicted) || globals.has(deconflicted) || deconflicted in blacklist) { + deconflicted = `${identifier}_${i}`; + i += 1; + } + + scope.declarations[deconflicted] = true; + return deconflicted; +} + +function tryParse(parse, code, id) { + try { + return parse(code, { + allowReturnOutsideFunction: true + }); + } catch (err) { + err.message += ` in ${id}`; + throw err; + } +} + +function normalizePathSlashes(path) { + return path.replace(/\\/g, '/'); +} +function hasCjsKeywords(code, ignoreGlobal) { + const firstpass = ignoreGlobal ? firstpassNoGlobal : firstpassGlobal; + return firstpass.test(code); +} +function checkEsModule(parse, code, id) { + const ast = tryParse(parse, code, id); + let isEsModule = false; + + var _iterator = _createForOfIteratorHelper(ast.body), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + const node = _step.value; + if (node.type === 'ExportDefaultDeclaration') return { + isEsModule: true, + hasDefaultExport: true, + ast + }; + + if (node.type === 'ExportNamedDeclaration') { + isEsModule = true; + + var _iterator2 = _createForOfIteratorHelper(node.specifiers), + _step2; + + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { + const specifier = _step2.value; + + if (specifier.exported.name === 'default') { + return { + isEsModule: true, + hasDefaultExport: true, + ast + }; + } + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + } else if (importExportDeclaration.test(node.type)) isEsModule = true; + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + return { + isEsModule, + hasDefaultExport: false, + ast + }; +} + +function getDefinePropertyCallName(node, targetName) { + if (node.type !== 'CallExpression') return; + const _node$callee = node.callee, + object = _node$callee.object, + property = _node$callee.property; + if (!object || object.type !== 'Identifier' || object.name !== 'Object') return; + if (!property || property.type !== 'Identifier' || property.name !== 'defineProperty') return; + if (node.arguments.length !== 3) return; + + const _node$arguments = _slicedToArray(node.arguments, 2), + target = _node$arguments[0], + val = _node$arguments[1]; + + if (target.type !== 'Identifier' || target.name !== targetName) return; // eslint-disable-next-line consistent-return + + return val.value; +} + +function transformCommonjs(parse, code, id, isEntry, isEsModule, ignoreGlobal, ignoreRequire, sourceMap, isDynamicRequireModulesEnabled, dynamicRequireModuleSet, commonDir, astCache) { + const ast = astCache || tryParse(parse, code, id); + const magicString = new MagicString(code); + const required = {}; // Because objects have no guaranteed ordering, yet we need it, + // we need to keep track of the order in a array + + const sources = []; + let uid = 0; + let scope = attachScopes(ast, 'scope'); + const uses = { + module: false, + exports: false, + global: false, + require: false + }; + let lexicalDepth = 0; + let programDepth = 0; + const globals = new Set(); // TODO technically wrong since globals isn't populated yet, but ¯\_(ツ)_/¯ + + const HELPERS_NAME = deconflict(scope, globals, 'commonjsHelpers'); + const namedExports = {}; // TODO handle transpiled modules + + let shouldWrap = /__esModule/.test(code); + let usesCommonjsHelpers = false; + + function isRequireStatement(node) { + if (!node) return false; + if (node.type !== 'CallExpression') return false; // Weird case of `require()` or `module.require()` without arguments + + if (node.arguments.length === 0) return false; + return isRequireIdentifier(node.callee); + } + + function isRequireIdentifier(node) { + if (!node) return false; + + if (node.type === 'Identifier' && node.name === 'require' + /* `require` */ + ) { + // `require` is hidden by a variable in local scope + if (scope.contains('require')) return false; + return true; + } else if (node.type === 'MemberExpression' + /* `[something].[something]` */ + ) { + // `module.[something]` + if (node.object.type !== 'Identifier' || node.object.name !== 'module') return false; // `module` is hidden by a variable in local scope + + if (scope.contains('module')) return false; // `module.require(...)` + + if (node.property.type !== 'Identifier' || node.property.name !== 'require') return false; + return true; + } + + return false; + } + + function hasDynamicArguments(node) { + return node.arguments.length > 1 || node.arguments[0].type !== 'Literal' && (node.arguments[0].type !== 'TemplateLiteral' || node.arguments[0].expressions.length > 0); + } + + function isStaticRequireStatement(node) { + if (!isRequireStatement(node)) return false; + if (hasDynamicArguments(node)) return false; + return true; + } + + function isIgnoredRequireStatement(requiredNode) { + return ignoreRequire(requiredNode.arguments[0].value); + } + + function getRequireStringArg(node) { + return node.arguments[0].type === 'Literal' ? node.arguments[0].value : node.arguments[0].quasis[0].value.cooked; + } + + function getRequired(node, name) { + let sourceId = getRequireStringArg(node); + const isDynamicRegister = sourceId.startsWith(DYNAMIC_REGISTER_PREFIX); + + if (isDynamicRegister) { + sourceId = sourceId.substr(DYNAMIC_REGISTER_PREFIX.length); + } + + const existing = required[sourceId]; // eslint-disable-next-line no-undefined + + if (existing === undefined) { + const isDynamic = hasDynamicModuleForPath(sourceId); + + if (!name) { + do { + name = `require$$${uid}`; + uid += 1; + } while (scope.contains(name)); + } + + if (isDynamicRegister && sourceId.endsWith('.json')) { + sourceId = DYNAMIC_JSON_PREFIX + sourceId; + } + + if (isDynamicRegister || !isDynamic || sourceId.endsWith('.json')) { + sources.push([sourceId, !isDynamicRegister]); + } + + required[sourceId] = { + source: sourceId, + name, + importsDefault: false, + isDynamic + }; + } + + return required[sourceId]; + } + + function hasDynamicModuleForPath(source) { + if (!/[/\\]/.test(source)) { + try { + const resolvedPath = normalizePathSlashes(sync(source, { + basedir: dirname(id) + })); + + if (dynamicRequireModuleSet.has(resolvedPath)) { + return true; + } + } catch (ex) { + // Probably a node.js internal module + return false; + } + + return false; + } + + for (var _i = 0, _arr = ['', '.js', '.json']; _i < _arr.length; _i++) { + const attemptExt = _arr[_i]; + const resolvedPath = normalizePathSlashes(resolve(dirname(id), source + attemptExt)); + + if (dynamicRequireModuleSet.has(resolvedPath)) { + return true; + } + } + + return false; + } + + function shouldUseSimulatedRequire(required) { + return hasDynamicModuleForPath(required.source) && ( // We only do `commonjsRequire` for json if it's the `commonjsRegister` call. + required.source.startsWith(DYNAMIC_REGISTER_PREFIX) || !required.source.endsWith('.json')); + } // do a first pass, see which names are assigned to. This is necessary to prevent + // illegally replacing `var foo = require('foo')` with `import foo from 'foo'`, + // where `foo` is later reassigned. (This happens in the wild. CommonJS, sigh) + + + const assignedTo = new Set(); + walk(ast, { + enter(node) { + if (node.type !== 'AssignmentExpression') return; + if (node.left.type === 'MemberExpression') return; + extractAssignedNames(node.left).forEach(name => { + assignedTo.add(name); + }); + } + + }); + walk(ast, { + enter(node, parent) { + if (sourceMap) { + magicString.addSourcemapLocation(node.start); + magicString.addSourcemapLocation(node.end); + } // skip dead branches + + + if (parent && (parent.type === 'IfStatement' || parent.type === 'ConditionalExpression')) { + if (node === parent.consequent && isFalsy(parent.test)) { + this.skip(); + return; + } + + if (node === parent.alternate && isTruthy(parent.test)) { + this.skip(); + return; + } + } + + if (node._skip) { + this.skip(); + return; + } + + programDepth += 1; + + if (node.scope) { + scope = node.scope; + } + + if (functionType.test(node.type)) lexicalDepth += 1; // if toplevel return, we need to wrap it + + if (node.type === 'ReturnStatement' && lexicalDepth === 0) { + shouldWrap = true; + } // rewrite `this` as `commonjsHelpers.commonjsGlobal` + + + if (node.type === 'ThisExpression' && lexicalDepth === 0) { + uses.global = true; + + if (!ignoreGlobal) { + magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, { + storeName: true + }); + usesCommonjsHelpers = true; + } + + return; + } // rewrite `typeof module`, `typeof module.exports` and `typeof exports` (https://github.com/rollup/rollup-plugin-commonjs/issues/151) + + + if (node.type === 'UnaryExpression' && node.operator === 'typeof') { + const flattened = flatten(node.argument); + if (!flattened) return; + if (scope.contains(flattened.name)) return; + + if (flattened.keypath === 'module.exports' || flattened.keypath === 'module' || flattened.keypath === 'exports') { + magicString.overwrite(node.start, node.end, `'object'`, { + storeName: false + }); + } + } // rewrite `require` (if not already handled) `global` and `define`, and handle free references to + // `module` and `exports` as these mean we need to wrap the module in commonjsHelpers.createCommonjsModule + + + if (node.type === 'Identifier') { + if (isReference(node, parent) && !scope.contains(node.name)) { + if (node.name in uses) { + if (isRequireIdentifier(node)) { + if (!isDynamicRequireModulesEnabled && isStaticRequireStatement(parent)) { + return; + } + + if (isDynamicRequireModulesEnabled && isRequireStatement(parent)) { + magicString.appendLeft(parent.end - 1, `,${JSON.stringify(dirname(id) === '.' ? null + /* default behavior */ + : getVirtualPathForDynamicRequirePath(normalizePathSlashes(dirname(id)), commonDir))}`); + } + + magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, { + storeName: true + }); + usesCommonjsHelpers = true; + } + + uses[node.name] = true; + + if (node.name === 'global' && !ignoreGlobal) { + magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, { + storeName: true + }); + usesCommonjsHelpers = true; + } // if module or exports are used outside the context of an assignment + // expression, we need to wrap the module + + + if (node.name === 'module' || node.name === 'exports') { + shouldWrap = true; + } + } + + if (node.name === 'define') { + magicString.overwrite(node.start, node.end, 'undefined', { + storeName: true + }); + } + + globals.add(node.name); + } + + return; + } // Is this an assignment to exports or module.exports? + + + if (node.type === 'AssignmentExpression') { + if (node.left.type !== 'MemberExpression') return; + const flattened = flatten(node.left); + if (!flattened) return; + if (scope.contains(flattened.name)) return; + const match = exportsPattern.exec(flattened.keypath); + if (!match || flattened.keypath === 'exports') return; + uses[flattened.name] = true; // we're dealing with `module.exports = ...` or `[module.]exports.foo = ...` – + // if this isn't top-level, we'll need to wrap the module + + if (programDepth > 3) shouldWrap = true; + node.left._skip = true; + + if (flattened.keypath === 'module.exports' && node.right.type === 'ObjectExpression') { + node.right.properties.forEach(prop => { + if (prop.computed || !('key' in prop) || prop.key.type !== 'Identifier') return; + const name = prop.key.name; + if (name === makeLegalIdentifier(name)) namedExports[name] = true; + }); + return; + } + + if (match[1]) namedExports[match[1]] = true; + return; + } + + const name = getDefinePropertyCallName(node, 'exports'); + if (name && name === makeLegalIdentifier(name)) namedExports[name] = true; // if this is `var x = require('x')`, we can do `import x from 'x'` + + if (node.type === 'VariableDeclarator' && node.id.type === 'Identifier' && isStaticRequireStatement(node.init) && !isIgnoredRequireStatement(node.init)) { + // for now, only do this for top-level requires. maybe fix this in future + if (scope.parent) return; // edge case — CJS allows you to assign to imports. ES doesn't + + if (assignedTo.has(node.id.name)) return; + const required = getRequired(node.init, node.id.name); + required.importsDefault = true; + + if (required.name === node.id.name && !required.isDynamic) { + node._shouldRemove = true; + } + } + + if (!isStaticRequireStatement(node) || isIgnoredRequireStatement(node)) { + return; + } + + const required = getRequired(node); + + if (parent.type === 'ExpressionStatement') { + // is a bare import, e.g. `require('foo');` + magicString.remove(parent.start, parent.end); + } else { + required.importsDefault = true; + + if (shouldUseSimulatedRequire(required)) { + magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire(${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizePathSlashes(required.source), commonDir))}, ${JSON.stringify(dirname(id) === '.' ? null + /* default behavior */ + : getVirtualPathForDynamicRequirePath(normalizePathSlashes(dirname(id)), commonDir))})`); + usesCommonjsHelpers = true; + } else { + magicString.overwrite(node.start, node.end, required.name); + } + } + + node.callee._skip = true; + }, + + leave(node) { + programDepth -= 1; + if (node.scope) scope = scope.parent; + if (functionType.test(node.type)) lexicalDepth -= 1; + + if (node.type === 'VariableDeclaration') { + let keepDeclaration = false; + let c = node.declarations[0].start; + + for (let i = 0; i < node.declarations.length; i += 1) { + const declarator = node.declarations[i]; + + if (declarator._shouldRemove) { + magicString.remove(c, declarator.end); + } else { + if (!keepDeclaration) { + magicString.remove(c, declarator.start); + keepDeclaration = true; + } + + c = declarator.end; + } + } + + if (!keepDeclaration) { + magicString.remove(node.start, node.end); + } + } + } + + }); + + if (!sources.length && !uses.module && !uses.exports && !uses.require && (ignoreGlobal || !uses.global)) { + if (Object.keys(namedExports).length) { + throw new Error(`Custom named exports were specified for ${id} but it does not appear to be a CommonJS module`); + } // not a CommonJS module + + + return null; + } // If `isEsModule` is on, it means it has ES6 import/export statements, + // which just can't be wrapped in a function. + + + if (isEsModule) shouldWrap = false; + usesCommonjsHelpers = usesCommonjsHelpers || shouldWrap; + const importBlock = `${(usesCommonjsHelpers ? [`import * as ${HELPERS_NAME} from '${HELPERS_ID}';`] : []).concat(sources.map(([source]) => // import the actual module before the proxy, so that we know + // what kind of proxy to build + `import '${source}';`), sources.filter(([, importProxy]) => importProxy).map(([source]) => { + const _required$source = required[source], + name = _required$source.name, + importsDefault = _required$source.importsDefault; + return `import ${importsDefault ? `${name} from ` : ``}'${getProxyId(source)}';`; + })).join('\n')}\n\n`; + const namedExportDeclarations = []; + let wrapperStart = ''; + let wrapperEnd = ''; + const moduleName = deconflict(scope, globals, getName(id)); + + if (!isEntry && !isEsModule) { + const exportModuleExports = { + str: `export { ${moduleName} as __moduleExports };`, + name: '__moduleExports' + }; + namedExportDeclarations.push(exportModuleExports); + } + + const name = getName(id); + + function addExport(x) { + const deconflicted = deconflict(scope, globals, name); + const declaration = deconflicted === name ? `export var ${x} = ${moduleName}.${x};` : `var ${deconflicted} = ${moduleName}.${x};\nexport { ${deconflicted} as ${x} };`; + namedExportDeclarations.push({ + str: declaration, + name: x + }); + } + + const defaultExportPropertyAssignments = []; + let hasDefaultExport = false; + + if (shouldWrap) { + const args = `module${uses.exports ? ', exports' : ''}`; + wrapperStart = `var ${moduleName} = ${HELPERS_NAME}.createCommonjsModule(function (${args}) {\n`; + wrapperEnd = `\n}`; + + if (isDynamicRequireModulesEnabled) { + wrapperEnd += `, ${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizePathSlashes(dirname(id)), commonDir))}`; + } + + wrapperEnd += `);`; + } else { + const names = []; + + var _iterator3 = _createForOfIteratorHelper(ast.body), + _step3; + + try { + for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { + const node = _step3.value; + + if (node.type === 'ExpressionStatement' && node.expression.type === 'AssignmentExpression') { + const left = node.expression.left; + const flattened = flatten(left); + + if (!flattened) { + continue; + } + + const match = exportsPattern.exec(flattened.keypath); + + if (!match) { + continue; + } + + if (flattened.keypath === 'module.exports') { + hasDefaultExport = true; + magicString.overwrite(left.start, left.end, `var ${moduleName}`); + } else { + const _match = _slicedToArray(match, 2), + name = _match[1]; + + const deconflicted = deconflict(scope, globals, name); + names.push({ + name, + deconflicted + }); + magicString.overwrite(node.start, left.end, `var ${deconflicted}`); + const declaration = name === deconflicted ? `export { ${name} };` : `export { ${deconflicted} as ${name} };`; + + if (name !== 'default') { + namedExportDeclarations.push({ + str: declaration, + name + }); + delete namedExports[name]; + } + + defaultExportPropertyAssignments.push(`${moduleName}.${name} = ${deconflicted};`); + } + } + } + } catch (err) { + _iterator3.e(err); + } finally { + _iterator3.f(); + } + + if (!hasDefaultExport && (names.length || !isEntry && !isEsModule)) { + wrapperEnd = `\n\nvar ${moduleName} = {\n${names.map(({ + name, + deconflicted + }) => `\t${name}: ${deconflicted}`).join(',\n')}\n};`; + } + } + + Object.keys(namedExports).filter(key => !blacklist[key]).forEach(addExport); + const defaultExport = /__esModule/.test(code) ? `export default ${HELPERS_NAME}.unwrapExports(${moduleName});` : `export default ${moduleName};`; + const named = namedExportDeclarations.filter(x => x.name !== 'default' || !hasDefaultExport).map(x => x.str); + const exportBlock = `\n\n${(isEsModule ? [] : [defaultExport]).concat(named).concat(hasDefaultExport ? defaultExportPropertyAssignments : []).join('\n')}`; + magicString.trim().prepend(importBlock + wrapperStart).trim().append(wrapperEnd); + const injectExportBlock = hasDefaultExport || named.length > 0 || shouldWrap || !isEntry; + + if (injectExportBlock) { + magicString.append(exportBlock); + } + + code = magicString.toString(); + const map = sourceMap ? magicString.generateMap() : null; + return { + code, + map, + syntheticNamedExports: injectExportBlock + }; +} + +function getDynamicRequirePaths(patterns) { + const dynamicRequireModuleSet = new Set(); + + var _iterator = _createForOfIteratorHelper(!patterns || Array.isArray(patterns) ? patterns || [] : [patterns]), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + const pattern = _step.value; + const isNegated = pattern.startsWith('!'); + const modifySet = Set.prototype[isNegated ? 'delete' : 'add'].bind(dynamicRequireModuleSet); + + var _iterator2 = _createForOfIteratorHelper(glob.sync(isNegated ? pattern.substr(1) : pattern)), + _step2; + + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { + const path = _step2.value; + modifySet(normalizePathSlashes(resolve(path))); + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + const dynamicRequireModuleDirPaths = Array.from(dynamicRequireModuleSet.values()).filter(path => { + try { + if (statSync(path).isDirectory()) return true; + } catch (ignored) {// Nothing to do here + } + + return false; + }); + return { + dynamicRequireModuleSet, + dynamicRequireModuleDirPaths + }; +} + +/* eslint-disable no-undefined */ +const isCjsPromises = new Map(); +function getIsCjsPromise(id) { + let isCjsPromise = isCjsPromises.get(id); + if (isCjsPromise) return isCjsPromise.promise; + const promise = new Promise(resolve => { + isCjsPromise = { + resolve, + promise: undefined + }; + isCjsPromises.set(id, isCjsPromise); + }); + isCjsPromise.promise = promise; + return promise; +} +function setIsCjsPromise(id, resolution) { + const isCjsPromise = isCjsPromises.get(id); + + if (isCjsPromise) { + if (isCjsPromise.resolve) { + isCjsPromise.resolve(resolution); + isCjsPromise.resolve = undefined; + } + } else { + isCjsPromises.set(id, { + promise: Promise.resolve(resolution), + resolve: undefined + }); + } +} + +/* eslint-disable no-param-reassign, no-undefined */ + +function getCandidatesForExtension(resolved, extension) { + return [resolved + extension, `${resolved}${sep}index${extension}`]; +} + +function getCandidates(resolved, extensions) { + return extensions.reduce((paths, extension) => paths.concat(getCandidatesForExtension(resolved, extension)), [resolved]); +} + +function getResolveId(extensions) { + function resolveExtensions(importee, importer) { + // not our problem + if (importee[0] !== '.' || !importer) return undefined; + const resolved = resolve(dirname(importer), importee); + const candidates = getCandidates(resolved, extensions); + + for (let i = 0; i < candidates.length; i += 1) { + try { + const stats = statSync(candidates[i]); + if (stats.isFile()) return { + id: candidates[i] + }; + } catch (err) { + /* noop */ + } + } + + return undefined; + } + + function resolveId(importee, importer) { + const isProxyModule = importee.endsWith(PROXY_SUFFIX); + + if (isProxyModule) { + importee = getIdFromProxyId(importee); + } else if (importee.startsWith('\0')) { + if (importee === HELPERS_ID || importee === DYNAMIC_PACKAGES_ID || importee.startsWith(DYNAMIC_JSON_PREFIX)) { + return importee; + } + + return null; + } + + if (importee.startsWith(DYNAMIC_JSON_PREFIX)) { + return importee; + } + + if (importer && importer.endsWith(PROXY_SUFFIX)) { + importer = getIdFromProxyId(importer); + } + + return this.resolve(importee, importer, { + skipSelf: true + }).then(resolved => { + if (!resolved) { + resolved = resolveExtensions(importee, importer); + } + + if (isProxyModule) { + if (!resolved) { + return { + id: getExternalProxyId(importee), + external: false + }; + } + + resolved.id = (resolved.external ? getExternalProxyId : getProxyId)(resolved.id); + resolved.external = false; + return resolved; + } + + return resolved; + }); + } + + return resolveId; +} + +function commonjs(options = {}) { + const extensions = options.extensions || ['.js']; + const filter = createFilter(options.include, options.exclude); + const ignoreGlobal = options.ignoreGlobal; + + const _getDynamicRequirePat = getDynamicRequirePaths(options.dynamicRequireTargets), + dynamicRequireModuleSet = _getDynamicRequirePat.dynamicRequireModuleSet, + dynamicRequireModuleDirPaths = _getDynamicRequirePat.dynamicRequireModuleDirPaths; + + const isDynamicRequireModulesEnabled = dynamicRequireModuleSet.size > 0; + const commonDir = isDynamicRequireModulesEnabled ? getCommonDir(null, Array.from(dynamicRequireModuleSet).concat(process.cwd())) : null; + const esModulesWithoutDefaultExport = new Set(); + const esModulesWithDefaultExport = new Set(); + const ignoreRequire = typeof options.ignore === 'function' ? options.ignore : Array.isArray(options.ignore) ? id => options.ignore.includes(id) : () => false; + const resolveId = getResolveId(extensions); + const sourceMap = options.sourceMap !== false; + + function transformAndCheckExports(code, id) { + const _checkEsModule = checkEsModule(this.parse, code, id), + isEsModule = _checkEsModule.isEsModule, + hasDefaultExport = _checkEsModule.hasDefaultExport, + ast = _checkEsModule.ast; + + const isDynamicRequireModule = dynamicRequireModuleSet.has(normalizePathSlashes(id)); + + if (isEsModule && (!isDynamicRequireModule || !options.transformMixedEsModules)) { + (hasDefaultExport ? esModulesWithDefaultExport : esModulesWithoutDefaultExport).add(id); + + if (!options.transformMixedEsModules) { + setIsCjsPromise(id, false); + return null; + } + } // it is not an ES module AND it does not have CJS-specific elements. + else if (!hasCjsKeywords(code, ignoreGlobal)) { + esModulesWithoutDefaultExport.add(id); + setIsCjsPromise(id, false); + return null; + } + + const transformed = transformCommonjs(this.parse, code, id, this.getModuleInfo(id).isEntry, isEsModule, ignoreGlobal || isEsModule, ignoreRequire, sourceMap, isDynamicRequireModulesEnabled, dynamicRequireModuleSet, commonDir, ast); + setIsCjsPromise(id, isEsModule ? false : Boolean(transformed)); + + if (!transformed) { + if (!isEsModule || isDynamicRequireModule) esModulesWithoutDefaultExport.add(id); + return null; + } + + return transformed; + } + + return { + name: 'commonjs', + + buildStart() { + if (options.namedExports != null) { + this.warn('The namedExports option from "@rollup/plugin-commonjs" is deprecated. Named exports are now handled automatically.'); + } + + const _this$meta$rollupVers = this.meta.rollupVersion.split('.').map(Number), + _this$meta$rollupVers2 = _slicedToArray(_this$meta$rollupVers, 2), + major = _this$meta$rollupVers2[0], + minor = _this$meta$rollupVers2[1]; + + const minVersion = peerDependencies.rollup.slice(2); + + const _minVersion$split$map = minVersion.split('.').map(Number), + _minVersion$split$map2 = _slicedToArray(_minVersion$split$map, 2), + minMajor = _minVersion$split$map2[0], + minMinor = _minVersion$split$map2[1]; + + if (major < minMajor || major === minMajor && minor < minMinor) { + this.error(`Insufficient Rollup version: "@rollup/plugin-commonjs" requires at least rollup@${minVersion} but found rollup@${this.meta.rollupVersion}.`); + } + }, + + resolveId, + + load(id) { + if (id === HELPERS_ID) { + let code = HELPERS; // Do not bloat everyone's code with the module manager code + + if (isDynamicRequireModulesEnabled) code += HELPERS_DYNAMIC;else code += HELPER_NON_DYNAMIC; + return code; + } // generate proxy modules + + + if (id.endsWith(EXTERNAL_SUFFIX)) { + const actualId = getIdFromExternalProxyId(id); + const name = getName(actualId); + if (actualId === HELPERS_ID || actualId === DYNAMIC_PACKAGES_ID) // These do not export default + return `import * as ${name} from ${JSON.stringify(actualId)}; export default ${name};`; + return `import ${name} from ${JSON.stringify(actualId)}; export default ${name};`; + } + + if (id === DYNAMIC_PACKAGES_ID) { + let code = `const { commonjsRegister } = require('${HELPERS_ID}');`; + + var _iterator = _createForOfIteratorHelper(dynamicRequireModuleDirPaths), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + const dir = _step.value; + let entryPoint = 'index.js'; + + try { + if (existsSync(join(dir, 'package.json'))) { + entryPoint = JSON.parse(readFileSync(join(dir, 'package.json'), { + encoding: 'utf8' + })).main || entryPoint; + } + } catch (ignored) {// ignored + } + + code += `\ncommonjsRegister(${JSON.stringify(getVirtualPathForDynamicRequirePath(dir, commonDir))}, function (module, exports) { + module.exports = require(${JSON.stringify(normalizePathSlashes(join(dir, entryPoint)))}); +});`; + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + return code; + } + + let actualId = id; + const isDynamicJson = actualId.startsWith(DYNAMIC_JSON_PREFIX); + + if (isDynamicJson) { + actualId = actualId.slice(DYNAMIC_JSON_PREFIX.length); + } + + const normalizedPath = normalizePathSlashes(actualId); + + if (isDynamicJson) { + return `require('${HELPERS_ID}').commonjsRegister(${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizedPath, commonDir))}, function (module, exports) { + module.exports = require(${JSON.stringify(normalizedPath)}); +});`; + } + + if (dynamicRequireModuleSet.has(normalizedPath) && !normalizedPath.endsWith('.json')) { + // Try our best to still export the module fully. + // The commonjs polyfill should take care of circular references. + return `require('${HELPERS_ID}').commonjsRegister(${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizedPath, commonDir))}, function (module, exports) { + ${readFileSync(normalizedPath, { + encoding: 'utf8' + })} +});`; + } + + if (actualId.endsWith(PROXY_SUFFIX)) { + actualId = getIdFromProxyId(actualId); + const name = getName(actualId); + return getIsCjsPromise(actualId).then(isCjs => { + if (dynamicRequireModuleSet.has(normalizePathSlashes(actualId)) && !actualId.endsWith('.json')) return `import {commonjsRequire} from '${HELPERS_ID}'; const ${name} = commonjsRequire(${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizePathSlashes(actualId), commonDir))}); export default (${name} && ${name}['default']) || ${name}`;else if (isCjs) return `import { __moduleExports } from ${JSON.stringify(actualId)}; export default __moduleExports;`;else if (esModulesWithoutDefaultExport.has(actualId)) return `import * as ${name} from ${JSON.stringify(actualId)}; export default ${name};`;else if (esModulesWithDefaultExport.has(actualId)) { + return `export {default} from ${JSON.stringify(actualId)};`; + } + return `import * as ${name} from ${JSON.stringify(actualId)}; import {getCjsExportFromNamespace} from "${HELPERS_ID}"; export default getCjsExportFromNamespace(${name})`; + }); + } + + if (isDynamicRequireModulesEnabled && this.getModuleInfo(id).isEntry) { + let code; + + try { + code = readFileSync(actualId, { + encoding: 'utf8' + }); + } catch (ex) { + this.warn(`Failed to read file ${actualId}, dynamic modules might not work correctly`); + return null; + } + + let dynamicImports = Array.from(dynamicRequireModuleSet).map(dynamicId => `require(${JSON.stringify(DYNAMIC_REGISTER_PREFIX + dynamicId)});`).join('\n'); + + if (dynamicRequireModuleDirPaths.length) { + dynamicImports += `require(${JSON.stringify(DYNAMIC_REGISTER_PREFIX + DYNAMIC_PACKAGES_ID)});`; + } + + code = `${dynamicImports}\n${code}`; + return code; + } + + return null; + }, + + transform(code, id) { + if (id !== DYNAMIC_PACKAGES_ID && !id.startsWith(DYNAMIC_JSON_PREFIX)) { + if (!filter(id) || extensions.indexOf(extname(id)) === -1) { + setIsCjsPromise(id, null); + return null; + } + } + + let transformed; + + try { + transformed = transformAndCheckExports.call(this, code, id); + } catch (err) { + transformed = null; + setIsCjsPromise(id, false); + this.error(err, err.loc); + } + + return transformed; + } + + }; +} + +export default commonjs; +//# sourceMappingURL=index.es.js.map diff --git a/frontend/node_modules/@rollup/plugin-commonjs/dist/index.es.js.map b/frontend/node_modules/@rollup/plugin-commonjs/dist/index.es.js.map new file mode 100644 index 0000000000000000000000000000000000000000..b94021e577f1a8681ee973cdb7237e99c8b8b842 --- /dev/null +++ b/frontend/node_modules/@rollup/plugin-commonjs/dist/index.es.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.es.js","sources":["../src/ast-utils.js","../src/helpers.js","../src/utils.js","../src/transform.js","../src/dynamic-require-paths.js","../src/is-cjs.js","../src/resolve-id.js","../src/index.js"],"sourcesContent":["/* eslint-disable no-undefined */\nexport { default as isReference } from 'is-reference';\n\nconst operators = {\n '==': (x) => equals(x.left, x.right, false),\n\n '!=': (x) => not(operators['=='](x)),\n\n '===': (x) => equals(x.left, x.right, true),\n\n '!==': (x) => not(operators['==='](x)),\n\n '!': (x) => isFalsy(x.argument),\n\n '&&': (x) => isTruthy(x.left) && isTruthy(x.right),\n\n '||': (x) => isTruthy(x.left) || isTruthy(x.right)\n};\n\nconst extractors = {\n Identifier(names, node) {\n names.push(node.name);\n },\n\n ObjectPattern(names, node) {\n node.properties.forEach((prop) => {\n getExtractor(prop.value.type)(names, prop.value);\n });\n },\n\n ArrayPattern(names, node) {\n node.elements.forEach((element) => {\n if (!element) return;\n getExtractor(element.type)(names, element);\n });\n },\n\n RestElement(names, node) {\n getExtractor(node.argument.type)(names, node.argument);\n },\n\n AssignmentPattern(names, node) {\n getExtractor(node.left.type)(names, node.left);\n }\n};\n\nexport function flatten(node) {\n const parts = [];\n\n while (node.type === 'MemberExpression') {\n if (node.computed) return null;\n\n parts.unshift(node.property.name);\n // eslint-disable-next-line no-param-reassign\n node = node.object;\n }\n\n if (node.type !== 'Identifier') return null;\n\n const { name } = node;\n parts.unshift(name);\n\n return { name, keypath: parts.join('.') };\n}\n\nexport function extractNames(node) {\n const names = [];\n extractors[node.type](names, node);\n return names;\n}\n\nfunction getExtractor(type) {\n const extractor = extractors[type];\n if (!extractor) throw new SyntaxError(`${type} pattern not supported.`);\n return extractor;\n}\n\nexport function isTruthy(node) {\n if (node.type === 'Literal') return !!node.value;\n if (node.type === 'ParenthesizedExpression') return isTruthy(node.expression);\n if (node.operator in operators) return operators[node.operator](node);\n return undefined;\n}\n\nexport function isFalsy(node) {\n return not(isTruthy(node));\n}\n\nfunction not(value) {\n return value === undefined ? value : !value;\n}\n\nfunction equals(a, b, strict) {\n if (a.type !== b.type) return undefined;\n // eslint-disable-next-line eqeqeq\n if (a.type === 'Literal') return strict ? a.value === b.value : a.value == b.value;\n return undefined;\n}\n","export const PROXY_SUFFIX = '?commonjs-proxy';\nexport const getProxyId = (id) => `\\0${id}${PROXY_SUFFIX}`;\nexport const getIdFromProxyId = (proxyId) => proxyId.slice(1, -PROXY_SUFFIX.length);\n\nexport const EXTERNAL_SUFFIX = '?commonjs-external';\nexport const getExternalProxyId = (id) => `\\0${id}${EXTERNAL_SUFFIX}`;\nexport const getIdFromExternalProxyId = (proxyId) => proxyId.slice(1, -EXTERNAL_SUFFIX.length);\n\nexport const VIRTUAL_PATH_BASE = '/$$rollup_base$$';\nexport const getVirtualPathForDynamicRequirePath = (path, commonDir) => {\n if (path.startsWith(commonDir)) return VIRTUAL_PATH_BASE + path.slice(commonDir.length);\n return path;\n};\n\nexport const DYNAMIC_REGISTER_PREFIX = '\\0commonjs-dynamic-register:';\nexport const DYNAMIC_JSON_PREFIX = '\\0commonjs-dynamic-json:';\nexport const DYNAMIC_PACKAGES_ID = '\\0commonjs-dynamic-packages';\n\nexport const HELPERS_ID = '\\0commonjsHelpers.js';\n\n// `x['default']` is used instead of `x.default` for backward compatibility with ES3 browsers.\n// Minifiers like uglify will usually transpile it back if compatibility with ES3 is not enabled.\nexport const HELPERS = `\nexport var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nexport function unwrapExports (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nexport function createCommonjsModule(fn, basedir, module) {\n\treturn module = {\n\t path: basedir,\n\t exports: {},\n\t require: function (path, base) {\n return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);\n }\n\t}, fn(module, module.exports), module.exports;\n}\n\nexport function getCjsExportFromNamespace (n) {\n\treturn n && n['default'] || n;\n}\n`;\n\nexport const HELPER_NON_DYNAMIC = `\nexport function commonjsRequire () {\n\tthrow new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');\n}\n`;\n\nexport const HELPERS_DYNAMIC = `\nexport function commonjsRegister (path, loader) {\n\tDYNAMIC_REQUIRE_LOADERS[path] = loader;\n}\n\nconst DYNAMIC_REQUIRE_LOADERS = Object.create(null);\nconst DYNAMIC_REQUIRE_CACHE = Object.create(null);\nconst DEFAULT_PARENT_MODULE = {\n\tid: '<' + 'rollup>', exports: {}, parent: undefined, filename: null, loaded: false, children: [], paths: []\n};\nconst CHECKED_EXTENSIONS = ['', '.js', '.json'];\n\nfunction normalize (path) {\n\tpath = path.replace(/\\\\\\\\/g, '/');\n\tconst parts = path.split('/');\n\tconst slashed = parts[0] === '';\n\tfor (let i = 1; i < parts.length; i++) {\n\t\tif (parts[i] === '.' || parts[i] === '') {\n\t\t\tparts.splice(i--, 1);\n\t\t}\n\t}\n\tfor (let i = 1; i < parts.length; i++) {\n\t\tif (parts[i] !== '..') continue;\n\t\tif (i > 0 && parts[i - 1] !== '..' && parts[i - 1] !== '.') {\n\t\t\tparts.splice(--i, 2);\n\t\t\ti--;\n\t\t}\n\t}\n\tpath = parts.join('/');\n\tif (slashed && path[0] !== '/')\n\t path = '/' + path;\n\telse if (path.length === 0)\n\t path = '.';\n\treturn path;\n}\n\nfunction join () {\n\tif (arguments.length === 0)\n\t return '.';\n\tlet joined;\n\tfor (let i = 0; i < arguments.length; ++i) {\n\t let arg = arguments[i];\n\t if (arg.length > 0) {\n\t\tif (joined === undefined)\n\t\t joined = arg;\n\t\telse\n\t\t joined += '/' + arg;\n\t }\n\t}\n\tif (joined === undefined)\n\t return '.';\n\n\treturn joined;\n}\n\nfunction isPossibleNodeModulesPath (modulePath) {\n\tlet c0 = modulePath[0];\n\tif (c0 === '/' || c0 === '\\\\\\\\') return false;\n\tlet c1 = modulePath[1], c2 = modulePath[2];\n\tif ((c0 === '.' && (!c1 || c1 === '/' || c1 === '\\\\\\\\')) ||\n\t\t(c0 === '.' && c1 === '.' && (!c2 || c2 === '/' || c2 === '\\\\\\\\'))) return false;\n\tif (c1 === ':' && (c2 === '/' || c2 === '\\\\\\\\'))\n\t\treturn false;\n\treturn true;\n}\n\nfunction dirname (path) {\n if (path.length === 0)\n return '.';\n\n let i = path.length - 1;\n while (i > 0) {\n const c = path.charCodeAt(i);\n if ((c === 47 || c === 92) && i !== path.length - 1)\n break;\n i--;\n }\n\n if (i > 0)\n return path.substr(0, i);\n\n if (path.chartCodeAt(0) === 47 || path.chartCodeAt(0) === 92)\n return path.charAt(0);\n\n return '.';\n}\n\nexport function commonjsRequire (path, originalModuleDir) {\n\tconst shouldTryNodeModules = isPossibleNodeModulesPath(path);\n\tpath = normalize(path);\n\tlet relPath;\n\twhile (true) {\n\t\tif (!shouldTryNodeModules) {\n\t\t\trelPath = originalModuleDir ? normalize(originalModuleDir + '/' + path) : path;\n\t\t} else if (originalModuleDir) {\n\t\t\trelPath = normalize(originalModuleDir + '/node_modules/' + path);\n\t\t} else {\n\t\t\trelPath = normalize(join('node_modules', path));\n\t\t}\n\t\tfor (let extensionIndex = 0; extensionIndex < CHECKED_EXTENSIONS.length; extensionIndex++) {\n\t\t\tconst resolvedPath = relPath + CHECKED_EXTENSIONS[extensionIndex];\n\t\t\tlet cachedModule = DYNAMIC_REQUIRE_CACHE[resolvedPath];\n\t\t\tif (cachedModule) return cachedModule.exports;\n\t\t\tconst loader = DYNAMIC_REQUIRE_LOADERS[resolvedPath];\n\t\t\tif (loader) {\n\t\t\t\tDYNAMIC_REQUIRE_CACHE[resolvedPath] = cachedModule = {\n\t\t\t\t\tid: resolvedPath,\n\t\t\t\t\tfilename: resolvedPath,\n\t\t\t\t\tpath: dirname(resolvedPath),\n\t\t\t\t\texports: {},\n\t\t\t\t\tparent: DEFAULT_PARENT_MODULE,\n\t\t\t\t\tloaded: false,\n\t\t\t\t\tchildren: [],\n\t\t\t\t\tpaths: [],\n\t\t\t\t\trequire: function (path, base) {\n\t\t\t\t\t return commonjsRequire(path, (base === undefined || base === null) ? cachedModule.path : base);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\ttry {\n\t\t\t\t\tloader.call(commonjsGlobal, cachedModule, cachedModule.exports);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tdelete DYNAMIC_REQUIRE_CACHE[resolvedPath];\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t\tcachedModule.loaded = true;\n\t\t\t\treturn cachedModule.exports;\n\t\t\t};\n\t\t}\n\t\tif (!shouldTryNodeModules) break;\n\t\tconst nextDir = normalize(originalModuleDir + '/..');\n\t\tif (nextDir === originalModuleDir) break;\n\t\toriginalModuleDir = nextDir;\n\t}\n\treturn require(path);\n}\n\ncommonjsRequire.cache = DYNAMIC_REQUIRE_CACHE;\n`;\n","/* eslint-disable import/prefer-default-export */\nimport { basename, dirname, extname, sep } from 'path';\n\nimport { makeLegalIdentifier } from '@rollup/pluginutils';\n\nexport function getName(id) {\n const name = makeLegalIdentifier(basename(id, extname(id)));\n if (name !== 'index') {\n return name;\n }\n const segments = dirname(id).split(sep);\n return makeLegalIdentifier(segments[segments.length - 1]);\n}\n","/* eslint-disable no-param-reassign, no-shadow, no-underscore-dangle, no-continue */\nimport { resolve, dirname } from 'path';\n\nimport { walk } from 'estree-walker';\nimport MagicString from 'magic-string';\nimport { attachScopes, extractAssignedNames, makeLegalIdentifier } from '@rollup/pluginutils';\n\nimport { sync as nodeResolveSync } from 'resolve';\n\nimport { flatten, isFalsy, isReference, isTruthy } from './ast-utils';\nimport {\n getProxyId,\n getVirtualPathForDynamicRequirePath,\n HELPERS_ID,\n DYNAMIC_REGISTER_PREFIX,\n DYNAMIC_JSON_PREFIX\n} from './helpers';\nimport { getName } from './utils';\n// TODO can this be async?\n\nconst reserved = 'process location abstract arguments boolean break byte case catch char class const continue debugger default delete do double else enum eval export extends false final finally float for from function goto if implements import in instanceof int interface let long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with yield'.split(\n ' '\n);\nconst blacklist = { __esModule: true };\nreserved.forEach((word) => (blacklist[word] = true));\n\nconst exportsPattern = /^(?:module\\.)?exports(?:\\.([a-zA-Z_$][a-zA-Z_$0-9]*))?$/;\n\nconst firstpassGlobal = /\\b(?:require|module|exports|global)\\b/;\nconst firstpassNoGlobal = /\\b(?:require|module|exports)\\b/;\nconst importExportDeclaration = /^(?:Import|Export(?:Named|Default))Declaration/;\nconst functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/;\n\nfunction deconflict(scope, globals, identifier) {\n let i = 1;\n let deconflicted = makeLegalIdentifier(identifier);\n\n while (scope.contains(deconflicted) || globals.has(deconflicted) || deconflicted in blacklist) {\n deconflicted = `${identifier}_${i}`;\n i += 1;\n }\n scope.declarations[deconflicted] = true;\n\n return deconflicted;\n}\n\nfunction tryParse(parse, code, id) {\n try {\n return parse(code, { allowReturnOutsideFunction: true });\n } catch (err) {\n err.message += ` in ${id}`;\n throw err;\n }\n}\n\nexport function normalizePathSlashes(path) {\n return path.replace(/\\\\/g, '/');\n}\n\nexport function hasCjsKeywords(code, ignoreGlobal) {\n const firstpass = ignoreGlobal ? firstpassNoGlobal : firstpassGlobal;\n return firstpass.test(code);\n}\n\nexport function checkEsModule(parse, code, id) {\n const ast = tryParse(parse, code, id);\n\n let isEsModule = false;\n for (const node of ast.body) {\n if (node.type === 'ExportDefaultDeclaration')\n return { isEsModule: true, hasDefaultExport: true, ast };\n if (node.type === 'ExportNamedDeclaration') {\n isEsModule = true;\n for (const specifier of node.specifiers) {\n if (specifier.exported.name === 'default') {\n return { isEsModule: true, hasDefaultExport: true, ast };\n }\n }\n } else if (importExportDeclaration.test(node.type)) isEsModule = true;\n }\n\n return { isEsModule, hasDefaultExport: false, ast };\n}\n\nfunction getDefinePropertyCallName(node, targetName) {\n if (node.type !== 'CallExpression') return;\n\n const {\n callee: { object, property }\n } = node;\n\n if (!object || object.type !== 'Identifier' || object.name !== 'Object') return;\n\n if (!property || property.type !== 'Identifier' || property.name !== 'defineProperty') return;\n\n if (node.arguments.length !== 3) return;\n\n const [target, val] = node.arguments;\n if (target.type !== 'Identifier' || target.name !== targetName) return;\n // eslint-disable-next-line consistent-return\n return val.value;\n}\n\nexport function transformCommonjs(\n parse,\n code,\n id,\n isEntry,\n isEsModule,\n ignoreGlobal,\n ignoreRequire,\n sourceMap,\n isDynamicRequireModulesEnabled,\n dynamicRequireModuleSet,\n commonDir,\n astCache\n) {\n const ast = astCache || tryParse(parse, code, id);\n\n const magicString = new MagicString(code);\n\n const required = {};\n // Because objects have no guaranteed ordering, yet we need it,\n // we need to keep track of the order in a array\n const sources = [];\n\n let uid = 0;\n\n let scope = attachScopes(ast, 'scope');\n const uses = { module: false, exports: false, global: false, require: false };\n\n let lexicalDepth = 0;\n let programDepth = 0;\n\n const globals = new Set();\n\n // TODO technically wrong since globals isn't populated yet, but ¯\\_(ツ)_/¯\n const HELPERS_NAME = deconflict(scope, globals, 'commonjsHelpers');\n\n const namedExports = {};\n\n // TODO handle transpiled modules\n let shouldWrap = /__esModule/.test(code);\n let usesCommonjsHelpers = false;\n\n function isRequireStatement(node) {\n if (!node) return false;\n if (node.type !== 'CallExpression') return false;\n\n // Weird case of `require()` or `module.require()` without arguments\n if (node.arguments.length === 0) return false;\n\n return isRequireIdentifier(node.callee);\n }\n\n function isRequireIdentifier(node) {\n if (!node) return false;\n\n if (node.type === 'Identifier' && node.name === 'require' /* `require` */) {\n // `require` is hidden by a variable in local scope\n if (scope.contains('require')) return false;\n\n return true;\n } else if (node.type === 'MemberExpression' /* `[something].[something]` */) {\n // `module.[something]`\n if (node.object.type !== 'Identifier' || node.object.name !== 'module') return false;\n\n // `module` is hidden by a variable in local scope\n if (scope.contains('module')) return false;\n\n // `module.require(...)`\n if (node.property.type !== 'Identifier' || node.property.name !== 'require') return false;\n\n return true;\n }\n\n return false;\n }\n\n function hasDynamicArguments(node) {\n return (\n node.arguments.length > 1 ||\n (node.arguments[0].type !== 'Literal' &&\n (node.arguments[0].type !== 'TemplateLiteral' || node.arguments[0].expressions.length > 0))\n );\n }\n\n function isStaticRequireStatement(node) {\n if (!isRequireStatement(node)) return false;\n if (hasDynamicArguments(node)) return false;\n return true;\n }\n\n function isIgnoredRequireStatement(requiredNode) {\n return ignoreRequire(requiredNode.arguments[0].value);\n }\n\n function getRequireStringArg(node) {\n return node.arguments[0].type === 'Literal'\n ? node.arguments[0].value\n : node.arguments[0].quasis[0].value.cooked;\n }\n\n function getRequired(node, name) {\n let sourceId = getRequireStringArg(node);\n const isDynamicRegister = sourceId.startsWith(DYNAMIC_REGISTER_PREFIX);\n if (isDynamicRegister) {\n sourceId = sourceId.substr(DYNAMIC_REGISTER_PREFIX.length);\n }\n\n const existing = required[sourceId];\n // eslint-disable-next-line no-undefined\n if (existing === undefined) {\n const isDynamic = hasDynamicModuleForPath(sourceId);\n\n if (!name) {\n do {\n name = `require$$${uid}`;\n uid += 1;\n } while (scope.contains(name));\n }\n\n if (isDynamicRegister && sourceId.endsWith('.json')) {\n sourceId = DYNAMIC_JSON_PREFIX + sourceId;\n }\n\n if (isDynamicRegister || !isDynamic || sourceId.endsWith('.json')) {\n sources.push([sourceId, !isDynamicRegister]);\n }\n\n required[sourceId] = { source: sourceId, name, importsDefault: false, isDynamic };\n }\n\n return required[sourceId];\n }\n\n function hasDynamicModuleForPath(source) {\n if (!/[/\\\\]/.test(source)) {\n try {\n const resolvedPath = normalizePathSlashes(\n nodeResolveSync(source, { basedir: dirname(id) })\n );\n if (dynamicRequireModuleSet.has(resolvedPath)) {\n return true;\n }\n } catch (ex) {\n // Probably a node.js internal module\n return false;\n }\n\n return false;\n }\n\n for (const attemptExt of ['', '.js', '.json']) {\n const resolvedPath = normalizePathSlashes(resolve(dirname(id), source + attemptExt));\n if (dynamicRequireModuleSet.has(resolvedPath)) {\n return true;\n }\n }\n\n return false;\n }\n\n function shouldUseSimulatedRequire(required) {\n return (\n hasDynamicModuleForPath(required.source) &&\n // We only do `commonjsRequire` for json if it's the `commonjsRegister` call.\n (required.source.startsWith(DYNAMIC_REGISTER_PREFIX) || !required.source.endsWith('.json'))\n );\n }\n\n // do a first pass, see which names are assigned to. This is necessary to prevent\n // illegally replacing `var foo = require('foo')` with `import foo from 'foo'`,\n // where `foo` is later reassigned. (This happens in the wild. CommonJS, sigh)\n const assignedTo = new Set();\n walk(ast, {\n enter(node) {\n if (node.type !== 'AssignmentExpression') return;\n if (node.left.type === 'MemberExpression') return;\n\n extractAssignedNames(node.left).forEach((name) => {\n assignedTo.add(name);\n });\n }\n });\n\n walk(ast, {\n enter(node, parent) {\n if (sourceMap) {\n magicString.addSourcemapLocation(node.start);\n magicString.addSourcemapLocation(node.end);\n }\n\n // skip dead branches\n if (parent && (parent.type === 'IfStatement' || parent.type === 'ConditionalExpression')) {\n if (node === parent.consequent && isFalsy(parent.test)) {\n this.skip();\n return;\n }\n if (node === parent.alternate && isTruthy(parent.test)) {\n this.skip();\n return;\n }\n }\n\n if (node._skip) {\n this.skip();\n return;\n }\n\n programDepth += 1;\n\n if (node.scope) ({ scope } = node);\n if (functionType.test(node.type)) lexicalDepth += 1;\n\n // if toplevel return, we need to wrap it\n if (node.type === 'ReturnStatement' && lexicalDepth === 0) {\n shouldWrap = true;\n }\n\n // rewrite `this` as `commonjsHelpers.commonjsGlobal`\n if (node.type === 'ThisExpression' && lexicalDepth === 0) {\n uses.global = true;\n if (!ignoreGlobal) {\n magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {\n storeName: true\n });\n usesCommonjsHelpers = true;\n }\n return;\n }\n\n // rewrite `typeof module`, `typeof module.exports` and `typeof exports` (https://github.com/rollup/rollup-plugin-commonjs/issues/151)\n if (node.type === 'UnaryExpression' && node.operator === 'typeof') {\n const flattened = flatten(node.argument);\n if (!flattened) return;\n\n if (scope.contains(flattened.name)) return;\n\n if (\n flattened.keypath === 'module.exports' ||\n flattened.keypath === 'module' ||\n flattened.keypath === 'exports'\n ) {\n magicString.overwrite(node.start, node.end, `'object'`, { storeName: false });\n }\n }\n\n // rewrite `require` (if not already handled) `global` and `define`, and handle free references to\n // `module` and `exports` as these mean we need to wrap the module in commonjsHelpers.createCommonjsModule\n if (node.type === 'Identifier') {\n if (isReference(node, parent) && !scope.contains(node.name)) {\n if (node.name in uses) {\n if (isRequireIdentifier(node)) {\n if (!isDynamicRequireModulesEnabled && isStaticRequireStatement(parent)) {\n return;\n }\n\n if (isDynamicRequireModulesEnabled && isRequireStatement(parent)) {\n magicString.appendLeft(\n parent.end - 1,\n `,${JSON.stringify(\n dirname(id) === '.'\n ? null /* default behavior */\n : getVirtualPathForDynamicRequirePath(\n normalizePathSlashes(dirname(id)),\n commonDir\n )\n )}`\n );\n }\n\n magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, {\n storeName: true\n });\n usesCommonjsHelpers = true;\n }\n\n uses[node.name] = true;\n if (node.name === 'global' && !ignoreGlobal) {\n magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {\n storeName: true\n });\n usesCommonjsHelpers = true;\n }\n\n // if module or exports are used outside the context of an assignment\n // expression, we need to wrap the module\n if (node.name === 'module' || node.name === 'exports') {\n shouldWrap = true;\n }\n }\n\n if (node.name === 'define') {\n magicString.overwrite(node.start, node.end, 'undefined', { storeName: true });\n }\n\n globals.add(node.name);\n }\n\n return;\n }\n\n // Is this an assignment to exports or module.exports?\n if (node.type === 'AssignmentExpression') {\n if (node.left.type !== 'MemberExpression') return;\n\n const flattened = flatten(node.left);\n if (!flattened) return;\n\n if (scope.contains(flattened.name)) return;\n\n const match = exportsPattern.exec(flattened.keypath);\n if (!match || flattened.keypath === 'exports') return;\n\n uses[flattened.name] = true;\n\n // we're dealing with `module.exports = ...` or `[module.]exports.foo = ...` –\n // if this isn't top-level, we'll need to wrap the module\n if (programDepth > 3) shouldWrap = true;\n\n node.left._skip = true;\n\n if (flattened.keypath === 'module.exports' && node.right.type === 'ObjectExpression') {\n node.right.properties.forEach((prop) => {\n if (prop.computed || !('key' in prop) || prop.key.type !== 'Identifier') return;\n const { name } = prop.key;\n if (name === makeLegalIdentifier(name)) namedExports[name] = true;\n });\n return;\n }\n\n if (match[1]) namedExports[match[1]] = true;\n return;\n }\n\n const name = getDefinePropertyCallName(node, 'exports');\n if (name && name === makeLegalIdentifier(name)) namedExports[name] = true;\n\n // if this is `var x = require('x')`, we can do `import x from 'x'`\n if (\n node.type === 'VariableDeclarator' &&\n node.id.type === 'Identifier' &&\n isStaticRequireStatement(node.init) &&\n !isIgnoredRequireStatement(node.init)\n ) {\n // for now, only do this for top-level requires. maybe fix this in future\n if (scope.parent) return;\n\n // edge case — CJS allows you to assign to imports. ES doesn't\n if (assignedTo.has(node.id.name)) return;\n\n const required = getRequired(node.init, node.id.name);\n required.importsDefault = true;\n\n if (required.name === node.id.name && !required.isDynamic) {\n node._shouldRemove = true;\n }\n }\n\n if (!isStaticRequireStatement(node) || isIgnoredRequireStatement(node)) {\n return;\n }\n\n const required = getRequired(node);\n\n if (parent.type === 'ExpressionStatement') {\n // is a bare import, e.g. `require('foo');`\n magicString.remove(parent.start, parent.end);\n } else {\n required.importsDefault = true;\n\n if (shouldUseSimulatedRequire(required)) {\n magicString.overwrite(\n node.start,\n node.end,\n `${HELPERS_NAME}.commonjsRequire(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizePathSlashes(required.source), commonDir)\n )}, ${JSON.stringify(\n dirname(id) === '.'\n ? null /* default behavior */\n : getVirtualPathForDynamicRequirePath(normalizePathSlashes(dirname(id)), commonDir)\n )})`\n );\n usesCommonjsHelpers = true;\n } else {\n magicString.overwrite(node.start, node.end, required.name);\n }\n }\n\n node.callee._skip = true;\n },\n\n leave(node) {\n programDepth -= 1;\n if (node.scope) scope = scope.parent;\n if (functionType.test(node.type)) lexicalDepth -= 1;\n\n if (node.type === 'VariableDeclaration') {\n let keepDeclaration = false;\n let c = node.declarations[0].start;\n\n for (let i = 0; i < node.declarations.length; i += 1) {\n const declarator = node.declarations[i];\n\n if (declarator._shouldRemove) {\n magicString.remove(c, declarator.end);\n } else {\n if (!keepDeclaration) {\n magicString.remove(c, declarator.start);\n keepDeclaration = true;\n }\n\n c = declarator.end;\n }\n }\n\n if (!keepDeclaration) {\n magicString.remove(node.start, node.end);\n }\n }\n }\n });\n\n if (\n !sources.length &&\n !uses.module &&\n !uses.exports &&\n !uses.require &&\n (ignoreGlobal || !uses.global)\n ) {\n if (Object.keys(namedExports).length) {\n throw new Error(\n `Custom named exports were specified for ${id} but it does not appear to be a CommonJS module`\n );\n }\n // not a CommonJS module\n return null;\n }\n\n // If `isEsModule` is on, it means it has ES6 import/export statements,\n // which just can't be wrapped in a function.\n if (isEsModule) shouldWrap = false;\n\n usesCommonjsHelpers = usesCommonjsHelpers || shouldWrap;\n\n const importBlock = `${(usesCommonjsHelpers\n ? [`import * as ${HELPERS_NAME} from '${HELPERS_ID}';`]\n : []\n )\n .concat(\n sources.map(\n ([source]) =>\n // import the actual module before the proxy, so that we know\n // what kind of proxy to build\n `import '${source}';`\n ),\n sources\n .filter(([, importProxy]) => importProxy)\n .map(([source]) => {\n const { name, importsDefault } = required[source];\n return `import ${importsDefault ? `${name} from ` : ``}'${getProxyId(source)}';`;\n })\n )\n .join('\\n')}\\n\\n`;\n\n const namedExportDeclarations = [];\n let wrapperStart = '';\n let wrapperEnd = '';\n\n const moduleName = deconflict(scope, globals, getName(id));\n if (!isEntry && !isEsModule) {\n const exportModuleExports = {\n str: `export { ${moduleName} as __moduleExports };`,\n name: '__moduleExports'\n };\n\n namedExportDeclarations.push(exportModuleExports);\n }\n\n const name = getName(id);\n\n function addExport(x) {\n const deconflicted = deconflict(scope, globals, name);\n\n const declaration =\n deconflicted === name\n ? `export var ${x} = ${moduleName}.${x};`\n : `var ${deconflicted} = ${moduleName}.${x};\\nexport { ${deconflicted} as ${x} };`;\n\n namedExportDeclarations.push({\n str: declaration,\n name: x\n });\n }\n\n const defaultExportPropertyAssignments = [];\n let hasDefaultExport = false;\n\n if (shouldWrap) {\n const args = `module${uses.exports ? ', exports' : ''}`;\n\n wrapperStart = `var ${moduleName} = ${HELPERS_NAME}.createCommonjsModule(function (${args}) {\\n`;\n\n wrapperEnd = `\\n}`;\n if (isDynamicRequireModulesEnabled) {\n wrapperEnd += `, ${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizePathSlashes(dirname(id)), commonDir)\n )}`;\n }\n\n wrapperEnd += `);`;\n } else {\n const names = [];\n\n for (const node of ast.body) {\n if (node.type === 'ExpressionStatement' && node.expression.type === 'AssignmentExpression') {\n const { left } = node.expression;\n const flattened = flatten(left);\n\n if (!flattened) {\n continue;\n }\n\n const match = exportsPattern.exec(flattened.keypath);\n if (!match) {\n continue;\n }\n\n if (flattened.keypath === 'module.exports') {\n hasDefaultExport = true;\n magicString.overwrite(left.start, left.end, `var ${moduleName}`);\n } else {\n const [, name] = match;\n const deconflicted = deconflict(scope, globals, name);\n\n names.push({ name, deconflicted });\n\n magicString.overwrite(node.start, left.end, `var ${deconflicted}`);\n\n const declaration =\n name === deconflicted\n ? `export { ${name} };`\n : `export { ${deconflicted} as ${name} };`;\n\n if (name !== 'default') {\n namedExportDeclarations.push({\n str: declaration,\n name\n });\n delete namedExports[name];\n }\n\n defaultExportPropertyAssignments.push(`${moduleName}.${name} = ${deconflicted};`);\n }\n }\n }\n\n if (!hasDefaultExport && (names.length || (!isEntry && !isEsModule))) {\n wrapperEnd = `\\n\\nvar ${moduleName} = {\\n${names\n .map(({ name, deconflicted }) => `\\t${name}: ${deconflicted}`)\n .join(',\\n')}\\n};`;\n }\n }\n\n Object.keys(namedExports)\n .filter((key) => !blacklist[key])\n .forEach(addExport);\n\n const defaultExport = /__esModule/.test(code)\n ? `export default ${HELPERS_NAME}.unwrapExports(${moduleName});`\n : `export default ${moduleName};`;\n\n const named = namedExportDeclarations\n .filter((x) => x.name !== 'default' || !hasDefaultExport)\n .map((x) => x.str);\n\n const exportBlock = `\\n\\n${(isEsModule ? [] : [defaultExport])\n .concat(named)\n .concat(hasDefaultExport ? defaultExportPropertyAssignments : [])\n .join('\\n')}`;\n\n magicString\n .trim()\n .prepend(importBlock + wrapperStart)\n .trim()\n .append(wrapperEnd);\n\n const injectExportBlock = hasDefaultExport || named.length > 0 || shouldWrap || !isEntry;\n if (injectExportBlock) {\n magicString.append(exportBlock);\n }\n\n code = magicString.toString();\n const map = sourceMap ? magicString.generateMap() : null;\n\n return { code, map, syntheticNamedExports: injectExportBlock };\n}\n","import { statSync } from 'fs';\n\nimport { resolve } from 'path';\n\nimport glob from 'glob';\n\nimport { normalizePathSlashes } from './transform';\n\nexport default function getDynamicRequirePaths(patterns) {\n const dynamicRequireModuleSet = new Set();\n for (const pattern of !patterns || Array.isArray(patterns) ? patterns || [] : [patterns]) {\n const isNegated = pattern.startsWith('!');\n const modifySet = Set.prototype[isNegated ? 'delete' : 'add'].bind(dynamicRequireModuleSet);\n for (const path of glob.sync(isNegated ? pattern.substr(1) : pattern)) {\n modifySet(normalizePathSlashes(resolve(path)));\n }\n }\n const dynamicRequireModuleDirPaths = Array.from(dynamicRequireModuleSet.values()).filter(\n (path) => {\n try {\n if (statSync(path).isDirectory()) return true;\n } catch (ignored) {\n // Nothing to do here\n }\n return false;\n }\n );\n return { dynamicRequireModuleSet, dynamicRequireModuleDirPaths };\n}\n","/* eslint-disable no-undefined */\nconst isCjsPromises = new Map();\n\nexport function getIsCjsPromise(id) {\n let isCjsPromise = isCjsPromises.get(id);\n if (isCjsPromise) return isCjsPromise.promise;\n\n const promise = new Promise((resolve) => {\n isCjsPromise = {\n resolve,\n promise: undefined\n };\n isCjsPromises.set(id, isCjsPromise);\n });\n isCjsPromise.promise = promise;\n\n return promise;\n}\n\nexport function setIsCjsPromise(id, resolution) {\n const isCjsPromise = isCjsPromises.get(id);\n if (isCjsPromise) {\n if (isCjsPromise.resolve) {\n isCjsPromise.resolve(resolution);\n isCjsPromise.resolve = undefined;\n }\n } else {\n isCjsPromises.set(id, { promise: Promise.resolve(resolution), resolve: undefined });\n }\n}\n","/* eslint-disable no-param-reassign, no-undefined */\nimport { statSync } from 'fs';\nimport { dirname, resolve, sep } from 'path';\n\nimport {\n DYNAMIC_JSON_PREFIX,\n DYNAMIC_PACKAGES_ID,\n getExternalProxyId,\n getIdFromProxyId,\n getProxyId,\n HELPERS_ID,\n PROXY_SUFFIX\n} from './helpers';\n\nfunction getCandidatesForExtension(resolved, extension) {\n return [resolved + extension, `${resolved}${sep}index${extension}`];\n}\n\nfunction getCandidates(resolved, extensions) {\n return extensions.reduce(\n (paths, extension) => paths.concat(getCandidatesForExtension(resolved, extension)),\n [resolved]\n );\n}\n\nexport default function getResolveId(extensions) {\n function resolveExtensions(importee, importer) {\n // not our problem\n if (importee[0] !== '.' || !importer) return undefined;\n\n const resolved = resolve(dirname(importer), importee);\n const candidates = getCandidates(resolved, extensions);\n\n for (let i = 0; i < candidates.length; i += 1) {\n try {\n const stats = statSync(candidates[i]);\n if (stats.isFile()) return { id: candidates[i] };\n } catch (err) {\n /* noop */\n }\n }\n\n return undefined;\n }\n\n function resolveId(importee, importer) {\n const isProxyModule = importee.endsWith(PROXY_SUFFIX);\n if (isProxyModule) {\n importee = getIdFromProxyId(importee);\n } else if (importee.startsWith('\\0')) {\n if (\n importee === HELPERS_ID ||\n importee === DYNAMIC_PACKAGES_ID ||\n importee.startsWith(DYNAMIC_JSON_PREFIX)\n ) {\n return importee;\n }\n return null;\n }\n\n if (importee.startsWith(DYNAMIC_JSON_PREFIX)) {\n return importee;\n }\n\n if (importer && importer.endsWith(PROXY_SUFFIX)) {\n importer = getIdFromProxyId(importer);\n }\n\n return this.resolve(importee, importer, { skipSelf: true }).then((resolved) => {\n if (!resolved) {\n resolved = resolveExtensions(importee, importer);\n }\n if (isProxyModule) {\n if (!resolved) {\n return { id: getExternalProxyId(importee), external: false };\n }\n resolved.id = (resolved.external ? getExternalProxyId : getProxyId)(resolved.id);\n resolved.external = false;\n return resolved;\n }\n return resolved;\n });\n }\n\n return resolveId;\n}\n","import { existsSync, readFileSync } from 'fs';\nimport { extname, join } from 'path';\n\nimport { createFilter } from '@rollup/pluginutils';\n\nimport getCommonDir from 'commondir';\n\nimport { peerDependencies } from '../package.json';\n\nimport getDynamicRequirePaths from './dynamic-require-paths';\n\nimport {\n DYNAMIC_JSON_PREFIX,\n DYNAMIC_PACKAGES_ID,\n DYNAMIC_REGISTER_PREFIX,\n getVirtualPathForDynamicRequirePath,\n EXTERNAL_SUFFIX,\n getIdFromExternalProxyId,\n getIdFromProxyId,\n HELPERS,\n HELPERS_ID,\n HELPER_NON_DYNAMIC,\n HELPERS_DYNAMIC,\n PROXY_SUFFIX\n} from './helpers';\n\nimport { getIsCjsPromise, setIsCjsPromise } from './is-cjs';\nimport getResolveId from './resolve-id';\nimport {\n checkEsModule,\n normalizePathSlashes,\n hasCjsKeywords,\n transformCommonjs\n} from './transform';\nimport { getName } from './utils';\n\nexport default function commonjs(options = {}) {\n const extensions = options.extensions || ['.js'];\n const filter = createFilter(options.include, options.exclude);\n const { ignoreGlobal } = options;\n\n const { dynamicRequireModuleSet, dynamicRequireModuleDirPaths } = getDynamicRequirePaths(\n options.dynamicRequireTargets\n );\n const isDynamicRequireModulesEnabled = dynamicRequireModuleSet.size > 0;\n const commonDir = isDynamicRequireModulesEnabled\n ? getCommonDir(null, Array.from(dynamicRequireModuleSet).concat(process.cwd()))\n : null;\n\n const esModulesWithoutDefaultExport = new Set();\n const esModulesWithDefaultExport = new Set();\n\n const ignoreRequire =\n typeof options.ignore === 'function'\n ? options.ignore\n : Array.isArray(options.ignore)\n ? (id) => options.ignore.includes(id)\n : () => false;\n\n const resolveId = getResolveId(extensions);\n\n const sourceMap = options.sourceMap !== false;\n\n function transformAndCheckExports(code, id) {\n const { isEsModule, hasDefaultExport, ast } = checkEsModule(this.parse, code, id);\n\n const isDynamicRequireModule = dynamicRequireModuleSet.has(normalizePathSlashes(id));\n\n if (isEsModule && (!isDynamicRequireModule || !options.transformMixedEsModules)) {\n (hasDefaultExport ? esModulesWithDefaultExport : esModulesWithoutDefaultExport).add(id);\n if (!options.transformMixedEsModules) {\n setIsCjsPromise(id, false);\n return null;\n }\n }\n // it is not an ES module AND it does not have CJS-specific elements.\n else if (!hasCjsKeywords(code, ignoreGlobal)) {\n esModulesWithoutDefaultExport.add(id);\n setIsCjsPromise(id, false);\n return null;\n }\n\n const transformed = transformCommonjs(\n this.parse,\n code,\n id,\n this.getModuleInfo(id).isEntry,\n isEsModule,\n ignoreGlobal || isEsModule,\n ignoreRequire,\n sourceMap,\n isDynamicRequireModulesEnabled,\n dynamicRequireModuleSet,\n commonDir,\n ast\n );\n\n setIsCjsPromise(id, isEsModule ? false : Boolean(transformed));\n\n if (!transformed) {\n if (!isEsModule || isDynamicRequireModule) esModulesWithoutDefaultExport.add(id);\n return null;\n }\n\n return transformed;\n }\n\n return {\n name: 'commonjs',\n\n buildStart() {\n if (options.namedExports != null) {\n this.warn(\n 'The namedExports option from \"@rollup/plugin-commonjs\" is deprecated. Named exports are now handled automatically.'\n );\n }\n\n const [major, minor] = this.meta.rollupVersion.split('.').map(Number);\n const minVersion = peerDependencies.rollup.slice(2);\n const [minMajor, minMinor] = minVersion.split('.').map(Number);\n if (major < minMajor || (major === minMajor && minor < minMinor)) {\n this.error(\n `Insufficient Rollup version: \"@rollup/plugin-commonjs\" requires at least rollup@${minVersion} but found rollup@${this.meta.rollupVersion}.`\n );\n }\n },\n\n resolveId,\n\n load(id) {\n if (id === HELPERS_ID) {\n let code = HELPERS;\n\n // Do not bloat everyone's code with the module manager code\n if (isDynamicRequireModulesEnabled) code += HELPERS_DYNAMIC;\n else code += HELPER_NON_DYNAMIC;\n\n return code;\n }\n\n // generate proxy modules\n if (id.endsWith(EXTERNAL_SUFFIX)) {\n const actualId = getIdFromExternalProxyId(id);\n const name = getName(actualId);\n\n if (actualId === HELPERS_ID || actualId === DYNAMIC_PACKAGES_ID)\n // These do not export default\n return `import * as ${name} from ${JSON.stringify(actualId)}; export default ${name};`;\n\n return `import ${name} from ${JSON.stringify(actualId)}; export default ${name};`;\n }\n\n if (id === DYNAMIC_PACKAGES_ID) {\n let code = `const { commonjsRegister } = require('${HELPERS_ID}');`;\n for (const dir of dynamicRequireModuleDirPaths) {\n let entryPoint = 'index.js';\n\n try {\n if (existsSync(join(dir, 'package.json'))) {\n entryPoint =\n JSON.parse(readFileSync(join(dir, 'package.json'), { encoding: 'utf8' })).main ||\n entryPoint;\n }\n } catch (ignored) {\n // ignored\n }\n\n code += `\\ncommonjsRegister(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(dir, commonDir)\n )}, function (module, exports) {\n module.exports = require(${JSON.stringify(normalizePathSlashes(join(dir, entryPoint)))});\n});`;\n }\n return code;\n }\n\n let actualId = id;\n\n const isDynamicJson = actualId.startsWith(DYNAMIC_JSON_PREFIX);\n if (isDynamicJson) {\n actualId = actualId.slice(DYNAMIC_JSON_PREFIX.length);\n }\n\n const normalizedPath = normalizePathSlashes(actualId);\n\n if (isDynamicJson) {\n return `require('${HELPERS_ID}').commonjsRegister(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizedPath, commonDir)\n )}, function (module, exports) {\n module.exports = require(${JSON.stringify(normalizedPath)});\n});`;\n }\n\n if (dynamicRequireModuleSet.has(normalizedPath) && !normalizedPath.endsWith('.json')) {\n // Try our best to still export the module fully.\n // The commonjs polyfill should take care of circular references.\n\n return `require('${HELPERS_ID}').commonjsRegister(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizedPath, commonDir)\n )}, function (module, exports) {\n ${readFileSync(normalizedPath, { encoding: 'utf8' })}\n});`;\n }\n\n if (actualId.endsWith(PROXY_SUFFIX)) {\n actualId = getIdFromProxyId(actualId);\n const name = getName(actualId);\n\n return getIsCjsPromise(actualId).then((isCjs) => {\n if (\n dynamicRequireModuleSet.has(normalizePathSlashes(actualId)) &&\n !actualId.endsWith('.json')\n )\n return `import {commonjsRequire} from '${HELPERS_ID}'; const ${name} = commonjsRequire(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizePathSlashes(actualId), commonDir)\n )}); export default (${name} && ${name}['default']) || ${name}`;\n else if (isCjs)\n return `import { __moduleExports } from ${JSON.stringify(\n actualId\n )}; export default __moduleExports;`;\n else if (esModulesWithoutDefaultExport.has(actualId))\n return `import * as ${name} from ${JSON.stringify(actualId)}; export default ${name};`;\n else if (esModulesWithDefaultExport.has(actualId)) {\n return `export {default} from ${JSON.stringify(actualId)};`;\n }\n return `import * as ${name} from ${JSON.stringify(\n actualId\n )}; import {getCjsExportFromNamespace} from \"${HELPERS_ID}\"; export default getCjsExportFromNamespace(${name})`;\n });\n }\n\n if (isDynamicRequireModulesEnabled && this.getModuleInfo(id).isEntry) {\n let code;\n\n try {\n code = readFileSync(actualId, { encoding: 'utf8' });\n } catch (ex) {\n this.warn(`Failed to read file ${actualId}, dynamic modules might not work correctly`);\n return null;\n }\n\n let dynamicImports = Array.from(dynamicRequireModuleSet)\n .map((dynamicId) => `require(${JSON.stringify(DYNAMIC_REGISTER_PREFIX + dynamicId)});`)\n .join('\\n');\n\n if (dynamicRequireModuleDirPaths.length) {\n dynamicImports += `require(${JSON.stringify(\n DYNAMIC_REGISTER_PREFIX + DYNAMIC_PACKAGES_ID\n )});`;\n }\n\n code = `${dynamicImports}\\n${code}`;\n\n return code;\n }\n\n return null;\n },\n\n transform(code, id) {\n if (id !== DYNAMIC_PACKAGES_ID && !id.startsWith(DYNAMIC_JSON_PREFIX)) {\n if (!filter(id) || extensions.indexOf(extname(id)) === -1) {\n setIsCjsPromise(id, null);\n return null;\n }\n }\n\n let transformed;\n try {\n transformed = transformAndCheckExports.call(this, code, id);\n } catch (err) {\n transformed = null;\n setIsCjsPromise(id, false);\n this.error(err, err.loc);\n }\n\n return transformed;\n }\n };\n}\n"],"names":["operators","x","equals","left","right","not","isFalsy","argument","isTruthy","flatten","node","parts","type","computed","unshift","property","name","object","keypath","join","value","expression","operator","undefined","a","b","strict","PROXY_SUFFIX","getProxyId","id","getIdFromProxyId","proxyId","slice","length","EXTERNAL_SUFFIX","getExternalProxyId","getIdFromExternalProxyId","VIRTUAL_PATH_BASE","getVirtualPathForDynamicRequirePath","path","commonDir","startsWith","DYNAMIC_REGISTER_PREFIX","DYNAMIC_JSON_PREFIX","DYNAMIC_PACKAGES_ID","HELPERS_ID","HELPERS","HELPER_NON_DYNAMIC","HELPERS_DYNAMIC","getName","makeLegalIdentifier","basename","extname","segments","dirname","split","sep","reserved","blacklist","__esModule","forEach","word","exportsPattern","firstpassGlobal","firstpassNoGlobal","importExportDeclaration","functionType","deconflict","scope","globals","identifier","i","deconflicted","contains","has","declarations","tryParse","parse","code","allowReturnOutsideFunction","err","message","normalizePathSlashes","replace","hasCjsKeywords","ignoreGlobal","firstpass","test","checkEsModule","ast","isEsModule","body","hasDefaultExport","specifiers","specifier","exported","getDefinePropertyCallName","targetName","callee","arguments","target","val","transformCommonjs","isEntry","ignoreRequire","sourceMap","isDynamicRequireModulesEnabled","dynamicRequireModuleSet","astCache","magicString","MagicString","required","sources","uid","attachScopes","uses","module","exports","global","require","lexicalDepth","programDepth","Set","HELPERS_NAME","namedExports","shouldWrap","usesCommonjsHelpers","isRequireStatement","isRequireIdentifier","hasDynamicArguments","expressions","isStaticRequireStatement","isIgnoredRequireStatement","requiredNode","getRequireStringArg","quasis","cooked","getRequired","sourceId","isDynamicRegister","substr","existing","isDynamic","hasDynamicModuleForPath","endsWith","push","source","importsDefault","resolvedPath","nodeResolveSync","basedir","ex","attemptExt","resolve","shouldUseSimulatedRequire","assignedTo","walk","enter","extractAssignedNames","add","parent","addSourcemapLocation","start","end","consequent","skip","alternate","_skip","overwrite","storeName","flattened","isReference","appendLeft","JSON","stringify","match","exec","properties","prop","key","init","_shouldRemove","remove","leave","keepDeclaration","c","declarator","Object","keys","Error","importBlock","concat","map","filter","importProxy","namedExportDeclarations","wrapperStart","wrapperEnd","moduleName","exportModuleExports","str","addExport","declaration","defaultExportPropertyAssignments","args","names","defaultExport","named","exportBlock","trim","prepend","append","injectExportBlock","toString","generateMap","syntheticNamedExports","getDynamicRequirePaths","patterns","Array","isArray","pattern","isNegated","modifySet","prototype","bind","glob","sync","dynamicRequireModuleDirPaths","from","values","statSync","isDirectory","ignored","isCjsPromises","Map","getIsCjsPromise","isCjsPromise","get","promise","Promise","set","setIsCjsPromise","resolution","getCandidatesForExtension","resolved","extension","getCandidates","extensions","reduce","paths","getResolveId","resolveExtensions","importee","importer","candidates","stats","isFile","resolveId","isProxyModule","skipSelf","then","external","commonjs","options","createFilter","include","exclude","dynamicRequireTargets","size","getCommonDir","process","cwd","esModulesWithoutDefaultExport","esModulesWithDefaultExport","ignore","includes","transformAndCheckExports","isDynamicRequireModule","transformMixedEsModules","transformed","getModuleInfo","Boolean","buildStart","warn","meta","rollupVersion","Number","major","minor","minVersion","peerDependencies","rollup","minMajor","minMinor","error","load","actualId","dir","entryPoint","existsSync","readFileSync","encoding","main","isDynamicJson","normalizedPath","isCjs","dynamicImports","dynamicId","transform","indexOf","call","loc"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAGA,MAAMA,SAAS,GAAG;AAChB,QAAOC,CAAD,IAAOC,MAAM,CAACD,CAAC,CAACE,IAAH,EAASF,CAAC,CAACG,KAAX,EAAkB,KAAlB,CADH;AAGhB,QAAOH,CAAD,IAAOI,GAAG,CAACL,SAAS,CAAC,IAAD,CAAT,CAAgBC,CAAhB,CAAD,CAHA;AAKhB,SAAQA,CAAD,IAAOC,MAAM,CAACD,CAAC,CAACE,IAAH,EAASF,CAAC,CAACG,KAAX,EAAkB,IAAlB,CALJ;AAOhB,SAAQH,CAAD,IAAOI,GAAG,CAACL,SAAS,CAAC,KAAD,CAAT,CAAiBC,CAAjB,CAAD,CAPD;AAShB,OAAMA,CAAD,IAAOK,OAAO,CAACL,CAAC,CAACM,QAAH,CATH;AAWhB,QAAON,CAAD,IAAOO,QAAQ,CAACP,CAAC,CAACE,IAAH,CAAR,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;AACA,aAAKyQ,KAAL,CAAWtN,GAAX,EAAgBA,GAAG,CAACuO,GAApB;AACD;;AAED,aAAOhC,WAAP;AACD;;AA1KI,GAAP;AA4KD;;;;"} \ No newline at end of file diff --git a/frontend/node_modules/@rollup/plugin-commonjs/dist/index.js b/frontend/node_modules/@rollup/plugin-commonjs/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..a9cb2c1c94e4231ccb075ef8df50fee83084528b --- /dev/null +++ b/frontend/node_modules/@rollup/plugin-commonjs/dist/index.js @@ -0,0 +1,1378 @@ +'use strict'; + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var fs = require('fs'); +var path = require('path'); +var pluginutils = require('@rollup/pluginutils'); +var getCommonDir = _interopDefault(require('commondir')); +var glob = _interopDefault(require('glob')); +var estreeWalker = require('estree-walker'); +var MagicString = _interopDefault(require('magic-string')); +var resolve = require('resolve'); +var isReference = _interopDefault(require('is-reference')); + +function _slicedToArray(arr, i) { + return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); +} + +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} + +function _iterableToArrayLimit(arr, i) { + if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; +} + +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(n); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); +} + +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + + return arr2; +} + +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} + +function _createForOfIteratorHelper(o) { + if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { + if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { + var i = 0; + + var F = function () {}; + + return { + s: F, + n: function () { + if (i >= o.length) return { + done: true + }; + return { + done: false, + value: o[i++] + }; + }, + e: function (e) { + throw e; + }, + f: F + }; + } + + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + + var it, + normalCompletion = true, + didErr = false, + err; + return { + s: function () { + it = o[Symbol.iterator](); + }, + n: function () { + var step = it.next(); + normalCompletion = step.done; + return step; + }, + e: function (e) { + didErr = true; + err = e; + }, + f: function () { + try { + if (!normalCompletion && it.return != null) it.return(); + } finally { + if (didErr) throw err; + } + } + }; +} + +var peerDependencies = { + rollup: "^2.3.4" +}; + +/* eslint-disable no-undefined */ +const operators = { + '==': x => equals(x.left, x.right, false), + '!=': x => not(operators['=='](x)), + '===': x => equals(x.left, x.right, true), + '!==': x => not(operators['==='](x)), + '!': x => isFalsy(x.argument), + '&&': x => isTruthy(x.left) && isTruthy(x.right), + '||': x => isTruthy(x.left) || isTruthy(x.right) +}; +function flatten(node) { + const parts = []; + + while (node.type === 'MemberExpression') { + if (node.computed) return null; + parts.unshift(node.property.name); // eslint-disable-next-line no-param-reassign + + node = node.object; + } + + if (node.type !== 'Identifier') return null; + const _node = node, + name = _node.name; + parts.unshift(name); + return { + name, + keypath: parts.join('.') + }; +} + +function isTruthy(node) { + if (node.type === 'Literal') return !!node.value; + if (node.type === 'ParenthesizedExpression') return isTruthy(node.expression); + if (node.operator in operators) return operators[node.operator](node); + return undefined; +} +function isFalsy(node) { + return not(isTruthy(node)); +} + +function not(value) { + return value === undefined ? value : !value; +} + +function equals(a, b, strict) { + if (a.type !== b.type) return undefined; // eslint-disable-next-line eqeqeq + + if (a.type === 'Literal') return strict ? a.value === b.value : a.value == b.value; + return undefined; +} + +const PROXY_SUFFIX = '?commonjs-proxy'; +const getProxyId = id => `\0${id}${PROXY_SUFFIX}`; +const getIdFromProxyId = proxyId => proxyId.slice(1, -PROXY_SUFFIX.length); +const EXTERNAL_SUFFIX = '?commonjs-external'; +const getExternalProxyId = id => `\0${id}${EXTERNAL_SUFFIX}`; +const getIdFromExternalProxyId = proxyId => proxyId.slice(1, -EXTERNAL_SUFFIX.length); +const VIRTUAL_PATH_BASE = '/$$rollup_base$$'; +const getVirtualPathForDynamicRequirePath = (path, commonDir) => { + if (path.startsWith(commonDir)) return VIRTUAL_PATH_BASE + path.slice(commonDir.length); + return path; +}; +const DYNAMIC_REGISTER_PREFIX = '\0commonjs-dynamic-register:'; +const DYNAMIC_JSON_PREFIX = '\0commonjs-dynamic-json:'; +const DYNAMIC_PACKAGES_ID = '\0commonjs-dynamic-packages'; +const HELPERS_ID = '\0commonjsHelpers.js'; // `x['default']` is used instead of `x.default` for backward compatibility with ES3 browsers. +// Minifiers like uglify will usually transpile it back if compatibility with ES3 is not enabled. + +const HELPERS = ` +export var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + +export function unwrapExports (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; +} + +export function createCommonjsModule(fn, basedir, module) { + return module = { + path: basedir, + exports: {}, + require: function (path, base) { + return commonjsRequire(path, (base === undefined || base === null) ? module.path : base); + } + }, fn(module, module.exports), module.exports; +} + +export function getCjsExportFromNamespace (n) { + return n && n['default'] || n; +} +`; +const HELPER_NON_DYNAMIC = ` +export function commonjsRequire () { + throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs'); +} +`; +const HELPERS_DYNAMIC = ` +export function commonjsRegister (path, loader) { + DYNAMIC_REQUIRE_LOADERS[path] = loader; +} + +const DYNAMIC_REQUIRE_LOADERS = Object.create(null); +const DYNAMIC_REQUIRE_CACHE = Object.create(null); +const DEFAULT_PARENT_MODULE = { + id: '<' + 'rollup>', exports: {}, parent: undefined, filename: null, loaded: false, children: [], paths: [] +}; +const CHECKED_EXTENSIONS = ['', '.js', '.json']; + +function normalize (path) { + path = path.replace(/\\\\/g, '/'); + const parts = path.split('/'); + const slashed = parts[0] === ''; + for (let i = 1; i < parts.length; i++) { + if (parts[i] === '.' || parts[i] === '') { + parts.splice(i--, 1); + } + } + for (let i = 1; i < parts.length; i++) { + if (parts[i] !== '..') continue; + if (i > 0 && parts[i - 1] !== '..' && parts[i - 1] !== '.') { + parts.splice(--i, 2); + i--; + } + } + path = parts.join('/'); + if (slashed && path[0] !== '/') + path = '/' + path; + else if (path.length === 0) + path = '.'; + return path; +} + +function join () { + if (arguments.length === 0) + return '.'; + let joined; + for (let i = 0; i < arguments.length; ++i) { + let arg = arguments[i]; + if (arg.length > 0) { + if (joined === undefined) + joined = arg; + else + joined += '/' + arg; + } + } + if (joined === undefined) + return '.'; + + return joined; +} + +function isPossibleNodeModulesPath (modulePath) { + let c0 = modulePath[0]; + if (c0 === '/' || c0 === '\\\\') return false; + let c1 = modulePath[1], c2 = modulePath[2]; + if ((c0 === '.' && (!c1 || c1 === '/' || c1 === '\\\\')) || + (c0 === '.' && c1 === '.' && (!c2 || c2 === '/' || c2 === '\\\\'))) return false; + if (c1 === ':' && (c2 === '/' || c2 === '\\\\')) + return false; + return true; +} + +function dirname (path) { + if (path.length === 0) + return '.'; + + let i = path.length - 1; + while (i > 0) { + const c = path.charCodeAt(i); + if ((c === 47 || c === 92) && i !== path.length - 1) + break; + i--; + } + + if (i > 0) + return path.substr(0, i); + + if (path.chartCodeAt(0) === 47 || path.chartCodeAt(0) === 92) + return path.charAt(0); + + return '.'; +} + +export function commonjsRequire (path, originalModuleDir) { + const shouldTryNodeModules = isPossibleNodeModulesPath(path); + path = normalize(path); + let relPath; + while (true) { + if (!shouldTryNodeModules) { + relPath = originalModuleDir ? normalize(originalModuleDir + '/' + path) : path; + } else if (originalModuleDir) { + relPath = normalize(originalModuleDir + '/node_modules/' + path); + } else { + relPath = normalize(join('node_modules', path)); + } + for (let extensionIndex = 0; extensionIndex < CHECKED_EXTENSIONS.length; extensionIndex++) { + const resolvedPath = relPath + CHECKED_EXTENSIONS[extensionIndex]; + let cachedModule = DYNAMIC_REQUIRE_CACHE[resolvedPath]; + if (cachedModule) return cachedModule.exports; + const loader = DYNAMIC_REQUIRE_LOADERS[resolvedPath]; + if (loader) { + DYNAMIC_REQUIRE_CACHE[resolvedPath] = cachedModule = { + id: resolvedPath, + filename: resolvedPath, + path: dirname(resolvedPath), + exports: {}, + parent: DEFAULT_PARENT_MODULE, + loaded: false, + children: [], + paths: [], + require: function (path, base) { + return commonjsRequire(path, (base === undefined || base === null) ? cachedModule.path : base); + } + }; + try { + loader.call(commonjsGlobal, cachedModule, cachedModule.exports); + } catch (error) { + delete DYNAMIC_REQUIRE_CACHE[resolvedPath]; + throw error; + } + cachedModule.loaded = true; + return cachedModule.exports; + }; + } + if (!shouldTryNodeModules) break; + const nextDir = normalize(originalModuleDir + '/..'); + if (nextDir === originalModuleDir) break; + originalModuleDir = nextDir; + } + return require(path); +} + +commonjsRequire.cache = DYNAMIC_REQUIRE_CACHE; +`; + +/* eslint-disable import/prefer-default-export */ +function getName(id) { + const name = pluginutils.makeLegalIdentifier(path.basename(id, path.extname(id))); + + if (name !== 'index') { + return name; + } + + const segments = path.dirname(id).split(path.sep); + return pluginutils.makeLegalIdentifier(segments[segments.length - 1]); +} + +const reserved = 'process location abstract arguments boolean break byte case catch char class const continue debugger default delete do double else enum eval export extends false final finally float for from function goto if implements import in instanceof int interface let long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with yield'.split(' '); +const blacklist = { + __esModule: true +}; +reserved.forEach(word => blacklist[word] = true); +const exportsPattern = /^(?:module\.)?exports(?:\.([a-zA-Z_$][a-zA-Z_$0-9]*))?$/; +const firstpassGlobal = /\b(?:require|module|exports|global)\b/; +const firstpassNoGlobal = /\b(?:require|module|exports)\b/; +const importExportDeclaration = /^(?:Import|Export(?:Named|Default))Declaration/; +const functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/; + +function deconflict(scope, globals, identifier) { + let i = 1; + let deconflicted = pluginutils.makeLegalIdentifier(identifier); + + while (scope.contains(deconflicted) || globals.has(deconflicted) || deconflicted in blacklist) { + deconflicted = `${identifier}_${i}`; + i += 1; + } + + scope.declarations[deconflicted] = true; + return deconflicted; +} + +function tryParse(parse, code, id) { + try { + return parse(code, { + allowReturnOutsideFunction: true + }); + } catch (err) { + err.message += ` in ${id}`; + throw err; + } +} + +function normalizePathSlashes(path) { + return path.replace(/\\/g, '/'); +} +function hasCjsKeywords(code, ignoreGlobal) { + const firstpass = ignoreGlobal ? firstpassNoGlobal : firstpassGlobal; + return firstpass.test(code); +} +function checkEsModule(parse, code, id) { + const ast = tryParse(parse, code, id); + let isEsModule = false; + + var _iterator = _createForOfIteratorHelper(ast.body), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + const node = _step.value; + if (node.type === 'ExportDefaultDeclaration') return { + isEsModule: true, + hasDefaultExport: true, + ast + }; + + if (node.type === 'ExportNamedDeclaration') { + isEsModule = true; + + var _iterator2 = _createForOfIteratorHelper(node.specifiers), + _step2; + + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { + const specifier = _step2.value; + + if (specifier.exported.name === 'default') { + return { + isEsModule: true, + hasDefaultExport: true, + ast + }; + } + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + } else if (importExportDeclaration.test(node.type)) isEsModule = true; + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + return { + isEsModule, + hasDefaultExport: false, + ast + }; +} + +function getDefinePropertyCallName(node, targetName) { + if (node.type !== 'CallExpression') return; + const _node$callee = node.callee, + object = _node$callee.object, + property = _node$callee.property; + if (!object || object.type !== 'Identifier' || object.name !== 'Object') return; + if (!property || property.type !== 'Identifier' || property.name !== 'defineProperty') return; + if (node.arguments.length !== 3) return; + + const _node$arguments = _slicedToArray(node.arguments, 2), + target = _node$arguments[0], + val = _node$arguments[1]; + + if (target.type !== 'Identifier' || target.name !== targetName) return; // eslint-disable-next-line consistent-return + + return val.value; +} + +function transformCommonjs(parse, code, id, isEntry, isEsModule, ignoreGlobal, ignoreRequire, sourceMap, isDynamicRequireModulesEnabled, dynamicRequireModuleSet, commonDir, astCache) { + const ast = astCache || tryParse(parse, code, id); + const magicString = new MagicString(code); + const required = {}; // Because objects have no guaranteed ordering, yet we need it, + // we need to keep track of the order in a array + + const sources = []; + let uid = 0; + let scope = pluginutils.attachScopes(ast, 'scope'); + const uses = { + module: false, + exports: false, + global: false, + require: false + }; + let lexicalDepth = 0; + let programDepth = 0; + const globals = new Set(); // TODO technically wrong since globals isn't populated yet, but ¯\_(ツ)_/¯ + + const HELPERS_NAME = deconflict(scope, globals, 'commonjsHelpers'); + const namedExports = {}; // TODO handle transpiled modules + + let shouldWrap = /__esModule/.test(code); + let usesCommonjsHelpers = false; + + function isRequireStatement(node) { + if (!node) return false; + if (node.type !== 'CallExpression') return false; // Weird case of `require()` or `module.require()` without arguments + + if (node.arguments.length === 0) return false; + return isRequireIdentifier(node.callee); + } + + function isRequireIdentifier(node) { + if (!node) return false; + + if (node.type === 'Identifier' && node.name === 'require' + /* `require` */ + ) { + // `require` is hidden by a variable in local scope + if (scope.contains('require')) return false; + return true; + } else if (node.type === 'MemberExpression' + /* `[something].[something]` */ + ) { + // `module.[something]` + if (node.object.type !== 'Identifier' || node.object.name !== 'module') return false; // `module` is hidden by a variable in local scope + + if (scope.contains('module')) return false; // `module.require(...)` + + if (node.property.type !== 'Identifier' || node.property.name !== 'require') return false; + return true; + } + + return false; + } + + function hasDynamicArguments(node) { + return node.arguments.length > 1 || node.arguments[0].type !== 'Literal' && (node.arguments[0].type !== 'TemplateLiteral' || node.arguments[0].expressions.length > 0); + } + + function isStaticRequireStatement(node) { + if (!isRequireStatement(node)) return false; + if (hasDynamicArguments(node)) return false; + return true; + } + + function isIgnoredRequireStatement(requiredNode) { + return ignoreRequire(requiredNode.arguments[0].value); + } + + function getRequireStringArg(node) { + return node.arguments[0].type === 'Literal' ? node.arguments[0].value : node.arguments[0].quasis[0].value.cooked; + } + + function getRequired(node, name) { + let sourceId = getRequireStringArg(node); + const isDynamicRegister = sourceId.startsWith(DYNAMIC_REGISTER_PREFIX); + + if (isDynamicRegister) { + sourceId = sourceId.substr(DYNAMIC_REGISTER_PREFIX.length); + } + + const existing = required[sourceId]; // eslint-disable-next-line no-undefined + + if (existing === undefined) { + const isDynamic = hasDynamicModuleForPath(sourceId); + + if (!name) { + do { + name = `require$$${uid}`; + uid += 1; + } while (scope.contains(name)); + } + + if (isDynamicRegister && sourceId.endsWith('.json')) { + sourceId = DYNAMIC_JSON_PREFIX + sourceId; + } + + if (isDynamicRegister || !isDynamic || sourceId.endsWith('.json')) { + sources.push([sourceId, !isDynamicRegister]); + } + + required[sourceId] = { + source: sourceId, + name, + importsDefault: false, + isDynamic + }; + } + + return required[sourceId]; + } + + function hasDynamicModuleForPath(source) { + if (!/[/\\]/.test(source)) { + try { + const resolvedPath = normalizePathSlashes(resolve.sync(source, { + basedir: path.dirname(id) + })); + + if (dynamicRequireModuleSet.has(resolvedPath)) { + return true; + } + } catch (ex) { + // Probably a node.js internal module + return false; + } + + return false; + } + + for (var _i = 0, _arr = ['', '.js', '.json']; _i < _arr.length; _i++) { + const attemptExt = _arr[_i]; + const resolvedPath = normalizePathSlashes(path.resolve(path.dirname(id), source + attemptExt)); + + if (dynamicRequireModuleSet.has(resolvedPath)) { + return true; + } + } + + return false; + } + + function shouldUseSimulatedRequire(required) { + return hasDynamicModuleForPath(required.source) && ( // We only do `commonjsRequire` for json if it's the `commonjsRegister` call. + required.source.startsWith(DYNAMIC_REGISTER_PREFIX) || !required.source.endsWith('.json')); + } // do a first pass, see which names are assigned to. This is necessary to prevent + // illegally replacing `var foo = require('foo')` with `import foo from 'foo'`, + // where `foo` is later reassigned. (This happens in the wild. CommonJS, sigh) + + + const assignedTo = new Set(); + estreeWalker.walk(ast, { + enter(node) { + if (node.type !== 'AssignmentExpression') return; + if (node.left.type === 'MemberExpression') return; + pluginutils.extractAssignedNames(node.left).forEach(name => { + assignedTo.add(name); + }); + } + + }); + estreeWalker.walk(ast, { + enter(node, parent) { + if (sourceMap) { + magicString.addSourcemapLocation(node.start); + magicString.addSourcemapLocation(node.end); + } // skip dead branches + + + if (parent && (parent.type === 'IfStatement' || parent.type === 'ConditionalExpression')) { + if (node === parent.consequent && isFalsy(parent.test)) { + this.skip(); + return; + } + + if (node === parent.alternate && isTruthy(parent.test)) { + this.skip(); + return; + } + } + + if (node._skip) { + this.skip(); + return; + } + + programDepth += 1; + + if (node.scope) { + scope = node.scope; + } + + if (functionType.test(node.type)) lexicalDepth += 1; // if toplevel return, we need to wrap it + + if (node.type === 'ReturnStatement' && lexicalDepth === 0) { + shouldWrap = true; + } // rewrite `this` as `commonjsHelpers.commonjsGlobal` + + + if (node.type === 'ThisExpression' && lexicalDepth === 0) { + uses.global = true; + + if (!ignoreGlobal) { + magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, { + storeName: true + }); + usesCommonjsHelpers = true; + } + + return; + } // rewrite `typeof module`, `typeof module.exports` and `typeof exports` (https://github.com/rollup/rollup-plugin-commonjs/issues/151) + + + if (node.type === 'UnaryExpression' && node.operator === 'typeof') { + const flattened = flatten(node.argument); + if (!flattened) return; + if (scope.contains(flattened.name)) return; + + if (flattened.keypath === 'module.exports' || flattened.keypath === 'module' || flattened.keypath === 'exports') { + magicString.overwrite(node.start, node.end, `'object'`, { + storeName: false + }); + } + } // rewrite `require` (if not already handled) `global` and `define`, and handle free references to + // `module` and `exports` as these mean we need to wrap the module in commonjsHelpers.createCommonjsModule + + + if (node.type === 'Identifier') { + if (isReference(node, parent) && !scope.contains(node.name)) { + if (node.name in uses) { + if (isRequireIdentifier(node)) { + if (!isDynamicRequireModulesEnabled && isStaticRequireStatement(parent)) { + return; + } + + if (isDynamicRequireModulesEnabled && isRequireStatement(parent)) { + magicString.appendLeft(parent.end - 1, `,${JSON.stringify(path.dirname(id) === '.' ? null + /* default behavior */ + : getVirtualPathForDynamicRequirePath(normalizePathSlashes(path.dirname(id)), commonDir))}`); + } + + magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, { + storeName: true + }); + usesCommonjsHelpers = true; + } + + uses[node.name] = true; + + if (node.name === 'global' && !ignoreGlobal) { + magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, { + storeName: true + }); + usesCommonjsHelpers = true; + } // if module or exports are used outside the context of an assignment + // expression, we need to wrap the module + + + if (node.name === 'module' || node.name === 'exports') { + shouldWrap = true; + } + } + + if (node.name === 'define') { + magicString.overwrite(node.start, node.end, 'undefined', { + storeName: true + }); + } + + globals.add(node.name); + } + + return; + } // Is this an assignment to exports or module.exports? + + + if (node.type === 'AssignmentExpression') { + if (node.left.type !== 'MemberExpression') return; + const flattened = flatten(node.left); + if (!flattened) return; + if (scope.contains(flattened.name)) return; + const match = exportsPattern.exec(flattened.keypath); + if (!match || flattened.keypath === 'exports') return; + uses[flattened.name] = true; // we're dealing with `module.exports = ...` or `[module.]exports.foo = ...` – + // if this isn't top-level, we'll need to wrap the module + + if (programDepth > 3) shouldWrap = true; + node.left._skip = true; + + if (flattened.keypath === 'module.exports' && node.right.type === 'ObjectExpression') { + node.right.properties.forEach(prop => { + if (prop.computed || !('key' in prop) || prop.key.type !== 'Identifier') return; + const name = prop.key.name; + if (name === pluginutils.makeLegalIdentifier(name)) namedExports[name] = true; + }); + return; + } + + if (match[1]) namedExports[match[1]] = true; + return; + } + + const name = getDefinePropertyCallName(node, 'exports'); + if (name && name === pluginutils.makeLegalIdentifier(name)) namedExports[name] = true; // if this is `var x = require('x')`, we can do `import x from 'x'` + + if (node.type === 'VariableDeclarator' && node.id.type === 'Identifier' && isStaticRequireStatement(node.init) && !isIgnoredRequireStatement(node.init)) { + // for now, only do this for top-level requires. maybe fix this in future + if (scope.parent) return; // edge case — CJS allows you to assign to imports. ES doesn't + + if (assignedTo.has(node.id.name)) return; + const required = getRequired(node.init, node.id.name); + required.importsDefault = true; + + if (required.name === node.id.name && !required.isDynamic) { + node._shouldRemove = true; + } + } + + if (!isStaticRequireStatement(node) || isIgnoredRequireStatement(node)) { + return; + } + + const required = getRequired(node); + + if (parent.type === 'ExpressionStatement') { + // is a bare import, e.g. `require('foo');` + magicString.remove(parent.start, parent.end); + } else { + required.importsDefault = true; + + if (shouldUseSimulatedRequire(required)) { + magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire(${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizePathSlashes(required.source), commonDir))}, ${JSON.stringify(path.dirname(id) === '.' ? null + /* default behavior */ + : getVirtualPathForDynamicRequirePath(normalizePathSlashes(path.dirname(id)), commonDir))})`); + usesCommonjsHelpers = true; + } else { + magicString.overwrite(node.start, node.end, required.name); + } + } + + node.callee._skip = true; + }, + + leave(node) { + programDepth -= 1; + if (node.scope) scope = scope.parent; + if (functionType.test(node.type)) lexicalDepth -= 1; + + if (node.type === 'VariableDeclaration') { + let keepDeclaration = false; + let c = node.declarations[0].start; + + for (let i = 0; i < node.declarations.length; i += 1) { + const declarator = node.declarations[i]; + + if (declarator._shouldRemove) { + magicString.remove(c, declarator.end); + } else { + if (!keepDeclaration) { + magicString.remove(c, declarator.start); + keepDeclaration = true; + } + + c = declarator.end; + } + } + + if (!keepDeclaration) { + magicString.remove(node.start, node.end); + } + } + } + + }); + + if (!sources.length && !uses.module && !uses.exports && !uses.require && (ignoreGlobal || !uses.global)) { + if (Object.keys(namedExports).length) { + throw new Error(`Custom named exports were specified for ${id} but it does not appear to be a CommonJS module`); + } // not a CommonJS module + + + return null; + } // If `isEsModule` is on, it means it has ES6 import/export statements, + // which just can't be wrapped in a function. + + + if (isEsModule) shouldWrap = false; + usesCommonjsHelpers = usesCommonjsHelpers || shouldWrap; + const importBlock = `${(usesCommonjsHelpers ? [`import * as ${HELPERS_NAME} from '${HELPERS_ID}';`] : []).concat(sources.map(([source]) => // import the actual module before the proxy, so that we know + // what kind of proxy to build + `import '${source}';`), sources.filter(([, importProxy]) => importProxy).map(([source]) => { + const _required$source = required[source], + name = _required$source.name, + importsDefault = _required$source.importsDefault; + return `import ${importsDefault ? `${name} from ` : ``}'${getProxyId(source)}';`; + })).join('\n')}\n\n`; + const namedExportDeclarations = []; + let wrapperStart = ''; + let wrapperEnd = ''; + const moduleName = deconflict(scope, globals, getName(id)); + + if (!isEntry && !isEsModule) { + const exportModuleExports = { + str: `export { ${moduleName} as __moduleExports };`, + name: '__moduleExports' + }; + namedExportDeclarations.push(exportModuleExports); + } + + const name = getName(id); + + function addExport(x) { + const deconflicted = deconflict(scope, globals, name); + const declaration = deconflicted === name ? `export var ${x} = ${moduleName}.${x};` : `var ${deconflicted} = ${moduleName}.${x};\nexport { ${deconflicted} as ${x} };`; + namedExportDeclarations.push({ + str: declaration, + name: x + }); + } + + const defaultExportPropertyAssignments = []; + let hasDefaultExport = false; + + if (shouldWrap) { + const args = `module${uses.exports ? ', exports' : ''}`; + wrapperStart = `var ${moduleName} = ${HELPERS_NAME}.createCommonjsModule(function (${args}) {\n`; + wrapperEnd = `\n}`; + + if (isDynamicRequireModulesEnabled) { + wrapperEnd += `, ${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizePathSlashes(path.dirname(id)), commonDir))}`; + } + + wrapperEnd += `);`; + } else { + const names = []; + + var _iterator3 = _createForOfIteratorHelper(ast.body), + _step3; + + try { + for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { + const node = _step3.value; + + if (node.type === 'ExpressionStatement' && node.expression.type === 'AssignmentExpression') { + const left = node.expression.left; + const flattened = flatten(left); + + if (!flattened) { + continue; + } + + const match = exportsPattern.exec(flattened.keypath); + + if (!match) { + continue; + } + + if (flattened.keypath === 'module.exports') { + hasDefaultExport = true; + magicString.overwrite(left.start, left.end, `var ${moduleName}`); + } else { + const _match = _slicedToArray(match, 2), + name = _match[1]; + + const deconflicted = deconflict(scope, globals, name); + names.push({ + name, + deconflicted + }); + magicString.overwrite(node.start, left.end, `var ${deconflicted}`); + const declaration = name === deconflicted ? `export { ${name} };` : `export { ${deconflicted} as ${name} };`; + + if (name !== 'default') { + namedExportDeclarations.push({ + str: declaration, + name + }); + delete namedExports[name]; + } + + defaultExportPropertyAssignments.push(`${moduleName}.${name} = ${deconflicted};`); + } + } + } + } catch (err) { + _iterator3.e(err); + } finally { + _iterator3.f(); + } + + if (!hasDefaultExport && (names.length || !isEntry && !isEsModule)) { + wrapperEnd = `\n\nvar ${moduleName} = {\n${names.map(({ + name, + deconflicted + }) => `\t${name}: ${deconflicted}`).join(',\n')}\n};`; + } + } + + Object.keys(namedExports).filter(key => !blacklist[key]).forEach(addExport); + const defaultExport = /__esModule/.test(code) ? `export default ${HELPERS_NAME}.unwrapExports(${moduleName});` : `export default ${moduleName};`; + const named = namedExportDeclarations.filter(x => x.name !== 'default' || !hasDefaultExport).map(x => x.str); + const exportBlock = `\n\n${(isEsModule ? [] : [defaultExport]).concat(named).concat(hasDefaultExport ? defaultExportPropertyAssignments : []).join('\n')}`; + magicString.trim().prepend(importBlock + wrapperStart).trim().append(wrapperEnd); + const injectExportBlock = hasDefaultExport || named.length > 0 || shouldWrap || !isEntry; + + if (injectExportBlock) { + magicString.append(exportBlock); + } + + code = magicString.toString(); + const map = sourceMap ? magicString.generateMap() : null; + return { + code, + map, + syntheticNamedExports: injectExportBlock + }; +} + +function getDynamicRequirePaths(patterns) { + const dynamicRequireModuleSet = new Set(); + + var _iterator = _createForOfIteratorHelper(!patterns || Array.isArray(patterns) ? patterns || [] : [patterns]), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + const pattern = _step.value; + const isNegated = pattern.startsWith('!'); + const modifySet = Set.prototype[isNegated ? 'delete' : 'add'].bind(dynamicRequireModuleSet); + + var _iterator2 = _createForOfIteratorHelper(glob.sync(isNegated ? pattern.substr(1) : pattern)), + _step2; + + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { + const path$1 = _step2.value; + modifySet(normalizePathSlashes(path.resolve(path$1))); + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + const dynamicRequireModuleDirPaths = Array.from(dynamicRequireModuleSet.values()).filter(path => { + try { + if (fs.statSync(path).isDirectory()) return true; + } catch (ignored) {// Nothing to do here + } + + return false; + }); + return { + dynamicRequireModuleSet, + dynamicRequireModuleDirPaths + }; +} + +/* eslint-disable no-undefined */ +const isCjsPromises = new Map(); +function getIsCjsPromise(id) { + let isCjsPromise = isCjsPromises.get(id); + if (isCjsPromise) return isCjsPromise.promise; + const promise = new Promise(resolve => { + isCjsPromise = { + resolve, + promise: undefined + }; + isCjsPromises.set(id, isCjsPromise); + }); + isCjsPromise.promise = promise; + return promise; +} +function setIsCjsPromise(id, resolution) { + const isCjsPromise = isCjsPromises.get(id); + + if (isCjsPromise) { + if (isCjsPromise.resolve) { + isCjsPromise.resolve(resolution); + isCjsPromise.resolve = undefined; + } + } else { + isCjsPromises.set(id, { + promise: Promise.resolve(resolution), + resolve: undefined + }); + } +} + +/* eslint-disable no-param-reassign, no-undefined */ + +function getCandidatesForExtension(resolved, extension) { + return [resolved + extension, `${resolved}${path.sep}index${extension}`]; +} + +function getCandidates(resolved, extensions) { + return extensions.reduce((paths, extension) => paths.concat(getCandidatesForExtension(resolved, extension)), [resolved]); +} + +function getResolveId(extensions) { + function resolveExtensions(importee, importer) { + // not our problem + if (importee[0] !== '.' || !importer) return undefined; + const resolved = path.resolve(path.dirname(importer), importee); + const candidates = getCandidates(resolved, extensions); + + for (let i = 0; i < candidates.length; i += 1) { + try { + const stats = fs.statSync(candidates[i]); + if (stats.isFile()) return { + id: candidates[i] + }; + } catch (err) { + /* noop */ + } + } + + return undefined; + } + + function resolveId(importee, importer) { + const isProxyModule = importee.endsWith(PROXY_SUFFIX); + + if (isProxyModule) { + importee = getIdFromProxyId(importee); + } else if (importee.startsWith('\0')) { + if (importee === HELPERS_ID || importee === DYNAMIC_PACKAGES_ID || importee.startsWith(DYNAMIC_JSON_PREFIX)) { + return importee; + } + + return null; + } + + if (importee.startsWith(DYNAMIC_JSON_PREFIX)) { + return importee; + } + + if (importer && importer.endsWith(PROXY_SUFFIX)) { + importer = getIdFromProxyId(importer); + } + + return this.resolve(importee, importer, { + skipSelf: true + }).then(resolved => { + if (!resolved) { + resolved = resolveExtensions(importee, importer); + } + + if (isProxyModule) { + if (!resolved) { + return { + id: getExternalProxyId(importee), + external: false + }; + } + + resolved.id = (resolved.external ? getExternalProxyId : getProxyId)(resolved.id); + resolved.external = false; + return resolved; + } + + return resolved; + }); + } + + return resolveId; +} + +function commonjs(options = {}) { + const extensions = options.extensions || ['.js']; + const filter = pluginutils.createFilter(options.include, options.exclude); + const ignoreGlobal = options.ignoreGlobal; + + const _getDynamicRequirePat = getDynamicRequirePaths(options.dynamicRequireTargets), + dynamicRequireModuleSet = _getDynamicRequirePat.dynamicRequireModuleSet, + dynamicRequireModuleDirPaths = _getDynamicRequirePat.dynamicRequireModuleDirPaths; + + const isDynamicRequireModulesEnabled = dynamicRequireModuleSet.size > 0; + const commonDir = isDynamicRequireModulesEnabled ? getCommonDir(null, Array.from(dynamicRequireModuleSet).concat(process.cwd())) : null; + const esModulesWithoutDefaultExport = new Set(); + const esModulesWithDefaultExport = new Set(); + const ignoreRequire = typeof options.ignore === 'function' ? options.ignore : Array.isArray(options.ignore) ? id => options.ignore.includes(id) : () => false; + const resolveId = getResolveId(extensions); + const sourceMap = options.sourceMap !== false; + + function transformAndCheckExports(code, id) { + const _checkEsModule = checkEsModule(this.parse, code, id), + isEsModule = _checkEsModule.isEsModule, + hasDefaultExport = _checkEsModule.hasDefaultExport, + ast = _checkEsModule.ast; + + const isDynamicRequireModule = dynamicRequireModuleSet.has(normalizePathSlashes(id)); + + if (isEsModule && (!isDynamicRequireModule || !options.transformMixedEsModules)) { + (hasDefaultExport ? esModulesWithDefaultExport : esModulesWithoutDefaultExport).add(id); + + if (!options.transformMixedEsModules) { + setIsCjsPromise(id, false); + return null; + } + } // it is not an ES module AND it does not have CJS-specific elements. + else if (!hasCjsKeywords(code, ignoreGlobal)) { + esModulesWithoutDefaultExport.add(id); + setIsCjsPromise(id, false); + return null; + } + + const transformed = transformCommonjs(this.parse, code, id, this.getModuleInfo(id).isEntry, isEsModule, ignoreGlobal || isEsModule, ignoreRequire, sourceMap, isDynamicRequireModulesEnabled, dynamicRequireModuleSet, commonDir, ast); + setIsCjsPromise(id, isEsModule ? false : Boolean(transformed)); + + if (!transformed) { + if (!isEsModule || isDynamicRequireModule) esModulesWithoutDefaultExport.add(id); + return null; + } + + return transformed; + } + + return { + name: 'commonjs', + + buildStart() { + if (options.namedExports != null) { + this.warn('The namedExports option from "@rollup/plugin-commonjs" is deprecated. Named exports are now handled automatically.'); + } + + const _this$meta$rollupVers = this.meta.rollupVersion.split('.').map(Number), + _this$meta$rollupVers2 = _slicedToArray(_this$meta$rollupVers, 2), + major = _this$meta$rollupVers2[0], + minor = _this$meta$rollupVers2[1]; + + const minVersion = peerDependencies.rollup.slice(2); + + const _minVersion$split$map = minVersion.split('.').map(Number), + _minVersion$split$map2 = _slicedToArray(_minVersion$split$map, 2), + minMajor = _minVersion$split$map2[0], + minMinor = _minVersion$split$map2[1]; + + if (major < minMajor || major === minMajor && minor < minMinor) { + this.error(`Insufficient Rollup version: "@rollup/plugin-commonjs" requires at least rollup@${minVersion} but found rollup@${this.meta.rollupVersion}.`); + } + }, + + resolveId, + + load(id) { + if (id === HELPERS_ID) { + let code = HELPERS; // Do not bloat everyone's code with the module manager code + + if (isDynamicRequireModulesEnabled) code += HELPERS_DYNAMIC;else code += HELPER_NON_DYNAMIC; + return code; + } // generate proxy modules + + + if (id.endsWith(EXTERNAL_SUFFIX)) { + const actualId = getIdFromExternalProxyId(id); + const name = getName(actualId); + if (actualId === HELPERS_ID || actualId === DYNAMIC_PACKAGES_ID) // These do not export default + return `import * as ${name} from ${JSON.stringify(actualId)}; export default ${name};`; + return `import ${name} from ${JSON.stringify(actualId)}; export default ${name};`; + } + + if (id === DYNAMIC_PACKAGES_ID) { + let code = `const { commonjsRegister } = require('${HELPERS_ID}');`; + + var _iterator = _createForOfIteratorHelper(dynamicRequireModuleDirPaths), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + const dir = _step.value; + let entryPoint = 'index.js'; + + try { + if (fs.existsSync(path.join(dir, 'package.json'))) { + entryPoint = JSON.parse(fs.readFileSync(path.join(dir, 'package.json'), { + encoding: 'utf8' + })).main || entryPoint; + } + } catch (ignored) {// ignored + } + + code += `\ncommonjsRegister(${JSON.stringify(getVirtualPathForDynamicRequirePath(dir, commonDir))}, function (module, exports) { + module.exports = require(${JSON.stringify(normalizePathSlashes(path.join(dir, entryPoint)))}); +});`; + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + return code; + } + + let actualId = id; + const isDynamicJson = actualId.startsWith(DYNAMIC_JSON_PREFIX); + + if (isDynamicJson) { + actualId = actualId.slice(DYNAMIC_JSON_PREFIX.length); + } + + const normalizedPath = normalizePathSlashes(actualId); + + if (isDynamicJson) { + return `require('${HELPERS_ID}').commonjsRegister(${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizedPath, commonDir))}, function (module, exports) { + module.exports = require(${JSON.stringify(normalizedPath)}); +});`; + } + + if (dynamicRequireModuleSet.has(normalizedPath) && !normalizedPath.endsWith('.json')) { + // Try our best to still export the module fully. + // The commonjs polyfill should take care of circular references. + return `require('${HELPERS_ID}').commonjsRegister(${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizedPath, commonDir))}, function (module, exports) { + ${fs.readFileSync(normalizedPath, { + encoding: 'utf8' + })} +});`; + } + + if (actualId.endsWith(PROXY_SUFFIX)) { + actualId = getIdFromProxyId(actualId); + const name = getName(actualId); + return getIsCjsPromise(actualId).then(isCjs => { + if (dynamicRequireModuleSet.has(normalizePathSlashes(actualId)) && !actualId.endsWith('.json')) return `import {commonjsRequire} from '${HELPERS_ID}'; const ${name} = commonjsRequire(${JSON.stringify(getVirtualPathForDynamicRequirePath(normalizePathSlashes(actualId), commonDir))}); export default (${name} && ${name}['default']) || ${name}`;else if (isCjs) return `import { __moduleExports } from ${JSON.stringify(actualId)}; export default __moduleExports;`;else if (esModulesWithoutDefaultExport.has(actualId)) return `import * as ${name} from ${JSON.stringify(actualId)}; export default ${name};`;else if (esModulesWithDefaultExport.has(actualId)) { + return `export {default} from ${JSON.stringify(actualId)};`; + } + return `import * as ${name} from ${JSON.stringify(actualId)}; import {getCjsExportFromNamespace} from "${HELPERS_ID}"; export default getCjsExportFromNamespace(${name})`; + }); + } + + if (isDynamicRequireModulesEnabled && this.getModuleInfo(id).isEntry) { + let code; + + try { + code = fs.readFileSync(actualId, { + encoding: 'utf8' + }); + } catch (ex) { + this.warn(`Failed to read file ${actualId}, dynamic modules might not work correctly`); + return null; + } + + let dynamicImports = Array.from(dynamicRequireModuleSet).map(dynamicId => `require(${JSON.stringify(DYNAMIC_REGISTER_PREFIX + dynamicId)});`).join('\n'); + + if (dynamicRequireModuleDirPaths.length) { + dynamicImports += `require(${JSON.stringify(DYNAMIC_REGISTER_PREFIX + DYNAMIC_PACKAGES_ID)});`; + } + + code = `${dynamicImports}\n${code}`; + return code; + } + + return null; + }, + + transform(code, id) { + if (id !== DYNAMIC_PACKAGES_ID && !id.startsWith(DYNAMIC_JSON_PREFIX)) { + if (!filter(id) || extensions.indexOf(path.extname(id)) === -1) { + setIsCjsPromise(id, null); + return null; + } + } + + let transformed; + + try { + transformed = transformAndCheckExports.call(this, code, id); + } catch (err) { + transformed = null; + setIsCjsPromise(id, false); + this.error(err, err.loc); + } + + return transformed; + } + + }; +} + +module.exports = commonjs; +//# sourceMappingURL=index.js.map diff --git a/frontend/node_modules/@rollup/plugin-commonjs/dist/index.js.map b/frontend/node_modules/@rollup/plugin-commonjs/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..65315401e0d206c4d84f1db4580719df0d75fc59 --- /dev/null +++ b/frontend/node_modules/@rollup/plugin-commonjs/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../src/ast-utils.js","../src/helpers.js","../src/utils.js","../src/transform.js","../src/dynamic-require-paths.js","../src/is-cjs.js","../src/resolve-id.js","../src/index.js"],"sourcesContent":["/* eslint-disable no-undefined */\nexport { default as isReference } from 'is-reference';\n\nconst operators = {\n '==': (x) => equals(x.left, x.right, false),\n\n '!=': (x) => not(operators['=='](x)),\n\n '===': (x) => equals(x.left, x.right, true),\n\n '!==': (x) => not(operators['==='](x)),\n\n '!': (x) => isFalsy(x.argument),\n\n '&&': (x) => isTruthy(x.left) && isTruthy(x.right),\n\n '||': (x) => isTruthy(x.left) || isTruthy(x.right)\n};\n\nconst extractors = {\n Identifier(names, node) {\n names.push(node.name);\n },\n\n ObjectPattern(names, node) {\n node.properties.forEach((prop) => {\n getExtractor(prop.value.type)(names, prop.value);\n });\n },\n\n ArrayPattern(names, node) {\n node.elements.forEach((element) => {\n if (!element) return;\n getExtractor(element.type)(names, element);\n });\n },\n\n RestElement(names, node) {\n getExtractor(node.argument.type)(names, node.argument);\n },\n\n AssignmentPattern(names, node) {\n getExtractor(node.left.type)(names, node.left);\n }\n};\n\nexport function flatten(node) {\n const parts = [];\n\n while (node.type === 'MemberExpression') {\n if (node.computed) return null;\n\n parts.unshift(node.property.name);\n // eslint-disable-next-line no-param-reassign\n node = node.object;\n }\n\n if (node.type !== 'Identifier') return null;\n\n const { name } = node;\n parts.unshift(name);\n\n return { name, keypath: parts.join('.') };\n}\n\nexport function extractNames(node) {\n const names = [];\n extractors[node.type](names, node);\n return names;\n}\n\nfunction getExtractor(type) {\n const extractor = extractors[type];\n if (!extractor) throw new SyntaxError(`${type} pattern not supported.`);\n return extractor;\n}\n\nexport function isTruthy(node) {\n if (node.type === 'Literal') return !!node.value;\n if (node.type === 'ParenthesizedExpression') return isTruthy(node.expression);\n if (node.operator in operators) return operators[node.operator](node);\n return undefined;\n}\n\nexport function isFalsy(node) {\n return not(isTruthy(node));\n}\n\nfunction not(value) {\n return value === undefined ? value : !value;\n}\n\nfunction equals(a, b, strict) {\n if (a.type !== b.type) return undefined;\n // eslint-disable-next-line eqeqeq\n if (a.type === 'Literal') return strict ? a.value === b.value : a.value == b.value;\n return undefined;\n}\n","export const PROXY_SUFFIX = '?commonjs-proxy';\nexport const getProxyId = (id) => `\\0${id}${PROXY_SUFFIX}`;\nexport const getIdFromProxyId = (proxyId) => proxyId.slice(1, -PROXY_SUFFIX.length);\n\nexport const EXTERNAL_SUFFIX = '?commonjs-external';\nexport const getExternalProxyId = (id) => `\\0${id}${EXTERNAL_SUFFIX}`;\nexport const getIdFromExternalProxyId = (proxyId) => proxyId.slice(1, -EXTERNAL_SUFFIX.length);\n\nexport const VIRTUAL_PATH_BASE = '/$$rollup_base$$';\nexport const getVirtualPathForDynamicRequirePath = (path, commonDir) => {\n if (path.startsWith(commonDir)) return VIRTUAL_PATH_BASE + path.slice(commonDir.length);\n return path;\n};\n\nexport const DYNAMIC_REGISTER_PREFIX = '\\0commonjs-dynamic-register:';\nexport const DYNAMIC_JSON_PREFIX = '\\0commonjs-dynamic-json:';\nexport const DYNAMIC_PACKAGES_ID = '\\0commonjs-dynamic-packages';\n\nexport const HELPERS_ID = '\\0commonjsHelpers.js';\n\n// `x['default']` is used instead of `x.default` for backward compatibility with ES3 browsers.\n// Minifiers like uglify will usually transpile it back if compatibility with ES3 is not enabled.\nexport const HELPERS = `\nexport var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nexport function unwrapExports (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nexport function createCommonjsModule(fn, basedir, module) {\n\treturn module = {\n\t path: basedir,\n\t exports: {},\n\t require: function (path, base) {\n return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);\n }\n\t}, fn(module, module.exports), module.exports;\n}\n\nexport function getCjsExportFromNamespace (n) {\n\treturn n && n['default'] || n;\n}\n`;\n\nexport const HELPER_NON_DYNAMIC = `\nexport function commonjsRequire () {\n\tthrow new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');\n}\n`;\n\nexport const HELPERS_DYNAMIC = `\nexport function commonjsRegister (path, loader) {\n\tDYNAMIC_REQUIRE_LOADERS[path] = loader;\n}\n\nconst DYNAMIC_REQUIRE_LOADERS = Object.create(null);\nconst DYNAMIC_REQUIRE_CACHE = Object.create(null);\nconst DEFAULT_PARENT_MODULE = {\n\tid: '<' + 'rollup>', exports: {}, parent: undefined, filename: null, loaded: false, children: [], paths: []\n};\nconst CHECKED_EXTENSIONS = ['', '.js', '.json'];\n\nfunction normalize (path) {\n\tpath = path.replace(/\\\\\\\\/g, '/');\n\tconst parts = path.split('/');\n\tconst slashed = parts[0] === '';\n\tfor (let i = 1; i < parts.length; i++) {\n\t\tif (parts[i] === '.' || parts[i] === '') {\n\t\t\tparts.splice(i--, 1);\n\t\t}\n\t}\n\tfor (let i = 1; i < parts.length; i++) {\n\t\tif (parts[i] !== '..') continue;\n\t\tif (i > 0 && parts[i - 1] !== '..' && parts[i - 1] !== '.') {\n\t\t\tparts.splice(--i, 2);\n\t\t\ti--;\n\t\t}\n\t}\n\tpath = parts.join('/');\n\tif (slashed && path[0] !== '/')\n\t path = '/' + path;\n\telse if (path.length === 0)\n\t path = '.';\n\treturn path;\n}\n\nfunction join () {\n\tif (arguments.length === 0)\n\t return '.';\n\tlet joined;\n\tfor (let i = 0; i < arguments.length; ++i) {\n\t let arg = arguments[i];\n\t if (arg.length > 0) {\n\t\tif (joined === undefined)\n\t\t joined = arg;\n\t\telse\n\t\t joined += '/' + arg;\n\t }\n\t}\n\tif (joined === undefined)\n\t return '.';\n\n\treturn joined;\n}\n\nfunction isPossibleNodeModulesPath (modulePath) {\n\tlet c0 = modulePath[0];\n\tif (c0 === '/' || c0 === '\\\\\\\\') return false;\n\tlet c1 = modulePath[1], c2 = modulePath[2];\n\tif ((c0 === '.' && (!c1 || c1 === '/' || c1 === '\\\\\\\\')) ||\n\t\t(c0 === '.' && c1 === '.' && (!c2 || c2 === '/' || c2 === '\\\\\\\\'))) return false;\n\tif (c1 === ':' && (c2 === '/' || c2 === '\\\\\\\\'))\n\t\treturn false;\n\treturn true;\n}\n\nfunction dirname (path) {\n if (path.length === 0)\n return '.';\n\n let i = path.length - 1;\n while (i > 0) {\n const c = path.charCodeAt(i);\n if ((c === 47 || c === 92) && i !== path.length - 1)\n break;\n i--;\n }\n\n if (i > 0)\n return path.substr(0, i);\n\n if (path.chartCodeAt(0) === 47 || path.chartCodeAt(0) === 92)\n return path.charAt(0);\n\n return '.';\n}\n\nexport function commonjsRequire (path, originalModuleDir) {\n\tconst shouldTryNodeModules = isPossibleNodeModulesPath(path);\n\tpath = normalize(path);\n\tlet relPath;\n\twhile (true) {\n\t\tif (!shouldTryNodeModules) {\n\t\t\trelPath = originalModuleDir ? normalize(originalModuleDir + '/' + path) : path;\n\t\t} else if (originalModuleDir) {\n\t\t\trelPath = normalize(originalModuleDir + '/node_modules/' + path);\n\t\t} else {\n\t\t\trelPath = normalize(join('node_modules', path));\n\t\t}\n\t\tfor (let extensionIndex = 0; extensionIndex < CHECKED_EXTENSIONS.length; extensionIndex++) {\n\t\t\tconst resolvedPath = relPath + CHECKED_EXTENSIONS[extensionIndex];\n\t\t\tlet cachedModule = DYNAMIC_REQUIRE_CACHE[resolvedPath];\n\t\t\tif (cachedModule) return cachedModule.exports;\n\t\t\tconst loader = DYNAMIC_REQUIRE_LOADERS[resolvedPath];\n\t\t\tif (loader) {\n\t\t\t\tDYNAMIC_REQUIRE_CACHE[resolvedPath] = cachedModule = {\n\t\t\t\t\tid: resolvedPath,\n\t\t\t\t\tfilename: resolvedPath,\n\t\t\t\t\tpath: dirname(resolvedPath),\n\t\t\t\t\texports: {},\n\t\t\t\t\tparent: DEFAULT_PARENT_MODULE,\n\t\t\t\t\tloaded: false,\n\t\t\t\t\tchildren: [],\n\t\t\t\t\tpaths: [],\n\t\t\t\t\trequire: function (path, base) {\n\t\t\t\t\t return commonjsRequire(path, (base === undefined || base === null) ? cachedModule.path : base);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\ttry {\n\t\t\t\t\tloader.call(commonjsGlobal, cachedModule, cachedModule.exports);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tdelete DYNAMIC_REQUIRE_CACHE[resolvedPath];\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t\tcachedModule.loaded = true;\n\t\t\t\treturn cachedModule.exports;\n\t\t\t};\n\t\t}\n\t\tif (!shouldTryNodeModules) break;\n\t\tconst nextDir = normalize(originalModuleDir + '/..');\n\t\tif (nextDir === originalModuleDir) break;\n\t\toriginalModuleDir = nextDir;\n\t}\n\treturn require(path);\n}\n\ncommonjsRequire.cache = DYNAMIC_REQUIRE_CACHE;\n`;\n","/* eslint-disable import/prefer-default-export */\nimport { basename, dirname, extname, sep } from 'path';\n\nimport { makeLegalIdentifier } from '@rollup/pluginutils';\n\nexport function getName(id) {\n const name = makeLegalIdentifier(basename(id, extname(id)));\n if (name !== 'index') {\n return name;\n }\n const segments = dirname(id).split(sep);\n return makeLegalIdentifier(segments[segments.length - 1]);\n}\n","/* eslint-disable no-param-reassign, no-shadow, no-underscore-dangle, no-continue */\nimport { resolve, dirname } from 'path';\n\nimport { walk } from 'estree-walker';\nimport MagicString from 'magic-string';\nimport { attachScopes, extractAssignedNames, makeLegalIdentifier } from '@rollup/pluginutils';\n\nimport { sync as nodeResolveSync } from 'resolve';\n\nimport { flatten, isFalsy, isReference, isTruthy } from './ast-utils';\nimport {\n getProxyId,\n getVirtualPathForDynamicRequirePath,\n HELPERS_ID,\n DYNAMIC_REGISTER_PREFIX,\n DYNAMIC_JSON_PREFIX\n} from './helpers';\nimport { getName } from './utils';\n// TODO can this be async?\n\nconst reserved = 'process location abstract arguments boolean break byte case catch char class const continue debugger default delete do double else enum eval export extends false final finally float for from function goto if implements import in instanceof int interface let long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with yield'.split(\n ' '\n);\nconst blacklist = { __esModule: true };\nreserved.forEach((word) => (blacklist[word] = true));\n\nconst exportsPattern = /^(?:module\\.)?exports(?:\\.([a-zA-Z_$][a-zA-Z_$0-9]*))?$/;\n\nconst firstpassGlobal = /\\b(?:require|module|exports|global)\\b/;\nconst firstpassNoGlobal = /\\b(?:require|module|exports)\\b/;\nconst importExportDeclaration = /^(?:Import|Export(?:Named|Default))Declaration/;\nconst functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/;\n\nfunction deconflict(scope, globals, identifier) {\n let i = 1;\n let deconflicted = makeLegalIdentifier(identifier);\n\n while (scope.contains(deconflicted) || globals.has(deconflicted) || deconflicted in blacklist) {\n deconflicted = `${identifier}_${i}`;\n i += 1;\n }\n scope.declarations[deconflicted] = true;\n\n return deconflicted;\n}\n\nfunction tryParse(parse, code, id) {\n try {\n return parse(code, { allowReturnOutsideFunction: true });\n } catch (err) {\n err.message += ` in ${id}`;\n throw err;\n }\n}\n\nexport function normalizePathSlashes(path) {\n return path.replace(/\\\\/g, '/');\n}\n\nexport function hasCjsKeywords(code, ignoreGlobal) {\n const firstpass = ignoreGlobal ? firstpassNoGlobal : firstpassGlobal;\n return firstpass.test(code);\n}\n\nexport function checkEsModule(parse, code, id) {\n const ast = tryParse(parse, code, id);\n\n let isEsModule = false;\n for (const node of ast.body) {\n if (node.type === 'ExportDefaultDeclaration')\n return { isEsModule: true, hasDefaultExport: true, ast };\n if (node.type === 'ExportNamedDeclaration') {\n isEsModule = true;\n for (const specifier of node.specifiers) {\n if (specifier.exported.name === 'default') {\n return { isEsModule: true, hasDefaultExport: true, ast };\n }\n }\n } else if (importExportDeclaration.test(node.type)) isEsModule = true;\n }\n\n return { isEsModule, hasDefaultExport: false, ast };\n}\n\nfunction getDefinePropertyCallName(node, targetName) {\n if (node.type !== 'CallExpression') return;\n\n const {\n callee: { object, property }\n } = node;\n\n if (!object || object.type !== 'Identifier' || object.name !== 'Object') return;\n\n if (!property || property.type !== 'Identifier' || property.name !== 'defineProperty') return;\n\n if (node.arguments.length !== 3) return;\n\n const [target, val] = node.arguments;\n if (target.type !== 'Identifier' || target.name !== targetName) return;\n // eslint-disable-next-line consistent-return\n return val.value;\n}\n\nexport function transformCommonjs(\n parse,\n code,\n id,\n isEntry,\n isEsModule,\n ignoreGlobal,\n ignoreRequire,\n sourceMap,\n isDynamicRequireModulesEnabled,\n dynamicRequireModuleSet,\n commonDir,\n astCache\n) {\n const ast = astCache || tryParse(parse, code, id);\n\n const magicString = new MagicString(code);\n\n const required = {};\n // Because objects have no guaranteed ordering, yet we need it,\n // we need to keep track of the order in a array\n const sources = [];\n\n let uid = 0;\n\n let scope = attachScopes(ast, 'scope');\n const uses = { module: false, exports: false, global: false, require: false };\n\n let lexicalDepth = 0;\n let programDepth = 0;\n\n const globals = new Set();\n\n // TODO technically wrong since globals isn't populated yet, but ¯\\_(ツ)_/¯\n const HELPERS_NAME = deconflict(scope, globals, 'commonjsHelpers');\n\n const namedExports = {};\n\n // TODO handle transpiled modules\n let shouldWrap = /__esModule/.test(code);\n let usesCommonjsHelpers = false;\n\n function isRequireStatement(node) {\n if (!node) return false;\n if (node.type !== 'CallExpression') return false;\n\n // Weird case of `require()` or `module.require()` without arguments\n if (node.arguments.length === 0) return false;\n\n return isRequireIdentifier(node.callee);\n }\n\n function isRequireIdentifier(node) {\n if (!node) return false;\n\n if (node.type === 'Identifier' && node.name === 'require' /* `require` */) {\n // `require` is hidden by a variable in local scope\n if (scope.contains('require')) return false;\n\n return true;\n } else if (node.type === 'MemberExpression' /* `[something].[something]` */) {\n // `module.[something]`\n if (node.object.type !== 'Identifier' || node.object.name !== 'module') return false;\n\n // `module` is hidden by a variable in local scope\n if (scope.contains('module')) return false;\n\n // `module.require(...)`\n if (node.property.type !== 'Identifier' || node.property.name !== 'require') return false;\n\n return true;\n }\n\n return false;\n }\n\n function hasDynamicArguments(node) {\n return (\n node.arguments.length > 1 ||\n (node.arguments[0].type !== 'Literal' &&\n (node.arguments[0].type !== 'TemplateLiteral' || node.arguments[0].expressions.length > 0))\n );\n }\n\n function isStaticRequireStatement(node) {\n if (!isRequireStatement(node)) return false;\n if (hasDynamicArguments(node)) return false;\n return true;\n }\n\n function isIgnoredRequireStatement(requiredNode) {\n return ignoreRequire(requiredNode.arguments[0].value);\n }\n\n function getRequireStringArg(node) {\n return node.arguments[0].type === 'Literal'\n ? node.arguments[0].value\n : node.arguments[0].quasis[0].value.cooked;\n }\n\n function getRequired(node, name) {\n let sourceId = getRequireStringArg(node);\n const isDynamicRegister = sourceId.startsWith(DYNAMIC_REGISTER_PREFIX);\n if (isDynamicRegister) {\n sourceId = sourceId.substr(DYNAMIC_REGISTER_PREFIX.length);\n }\n\n const existing = required[sourceId];\n // eslint-disable-next-line no-undefined\n if (existing === undefined) {\n const isDynamic = hasDynamicModuleForPath(sourceId);\n\n if (!name) {\n do {\n name = `require$$${uid}`;\n uid += 1;\n } while (scope.contains(name));\n }\n\n if (isDynamicRegister && sourceId.endsWith('.json')) {\n sourceId = DYNAMIC_JSON_PREFIX + sourceId;\n }\n\n if (isDynamicRegister || !isDynamic || sourceId.endsWith('.json')) {\n sources.push([sourceId, !isDynamicRegister]);\n }\n\n required[sourceId] = { source: sourceId, name, importsDefault: false, isDynamic };\n }\n\n return required[sourceId];\n }\n\n function hasDynamicModuleForPath(source) {\n if (!/[/\\\\]/.test(source)) {\n try {\n const resolvedPath = normalizePathSlashes(\n nodeResolveSync(source, { basedir: dirname(id) })\n );\n if (dynamicRequireModuleSet.has(resolvedPath)) {\n return true;\n }\n } catch (ex) {\n // Probably a node.js internal module\n return false;\n }\n\n return false;\n }\n\n for (const attemptExt of ['', '.js', '.json']) {\n const resolvedPath = normalizePathSlashes(resolve(dirname(id), source + attemptExt));\n if (dynamicRequireModuleSet.has(resolvedPath)) {\n return true;\n }\n }\n\n return false;\n }\n\n function shouldUseSimulatedRequire(required) {\n return (\n hasDynamicModuleForPath(required.source) &&\n // We only do `commonjsRequire` for json if it's the `commonjsRegister` call.\n (required.source.startsWith(DYNAMIC_REGISTER_PREFIX) || !required.source.endsWith('.json'))\n );\n }\n\n // do a first pass, see which names are assigned to. This is necessary to prevent\n // illegally replacing `var foo = require('foo')` with `import foo from 'foo'`,\n // where `foo` is later reassigned. (This happens in the wild. CommonJS, sigh)\n const assignedTo = new Set();\n walk(ast, {\n enter(node) {\n if (node.type !== 'AssignmentExpression') return;\n if (node.left.type === 'MemberExpression') return;\n\n extractAssignedNames(node.left).forEach((name) => {\n assignedTo.add(name);\n });\n }\n });\n\n walk(ast, {\n enter(node, parent) {\n if (sourceMap) {\n magicString.addSourcemapLocation(node.start);\n magicString.addSourcemapLocation(node.end);\n }\n\n // skip dead branches\n if (parent && (parent.type === 'IfStatement' || parent.type === 'ConditionalExpression')) {\n if (node === parent.consequent && isFalsy(parent.test)) {\n this.skip();\n return;\n }\n if (node === parent.alternate && isTruthy(parent.test)) {\n this.skip();\n return;\n }\n }\n\n if (node._skip) {\n this.skip();\n return;\n }\n\n programDepth += 1;\n\n if (node.scope) ({ scope } = node);\n if (functionType.test(node.type)) lexicalDepth += 1;\n\n // if toplevel return, we need to wrap it\n if (node.type === 'ReturnStatement' && lexicalDepth === 0) {\n shouldWrap = true;\n }\n\n // rewrite `this` as `commonjsHelpers.commonjsGlobal`\n if (node.type === 'ThisExpression' && lexicalDepth === 0) {\n uses.global = true;\n if (!ignoreGlobal) {\n magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {\n storeName: true\n });\n usesCommonjsHelpers = true;\n }\n return;\n }\n\n // rewrite `typeof module`, `typeof module.exports` and `typeof exports` (https://github.com/rollup/rollup-plugin-commonjs/issues/151)\n if (node.type === 'UnaryExpression' && node.operator === 'typeof') {\n const flattened = flatten(node.argument);\n if (!flattened) return;\n\n if (scope.contains(flattened.name)) return;\n\n if (\n flattened.keypath === 'module.exports' ||\n flattened.keypath === 'module' ||\n flattened.keypath === 'exports'\n ) {\n magicString.overwrite(node.start, node.end, `'object'`, { storeName: false });\n }\n }\n\n // rewrite `require` (if not already handled) `global` and `define`, and handle free references to\n // `module` and `exports` as these mean we need to wrap the module in commonjsHelpers.createCommonjsModule\n if (node.type === 'Identifier') {\n if (isReference(node, parent) && !scope.contains(node.name)) {\n if (node.name in uses) {\n if (isRequireIdentifier(node)) {\n if (!isDynamicRequireModulesEnabled && isStaticRequireStatement(parent)) {\n return;\n }\n\n if (isDynamicRequireModulesEnabled && isRequireStatement(parent)) {\n magicString.appendLeft(\n parent.end - 1,\n `,${JSON.stringify(\n dirname(id) === '.'\n ? null /* default behavior */\n : getVirtualPathForDynamicRequirePath(\n normalizePathSlashes(dirname(id)),\n commonDir\n )\n )}`\n );\n }\n\n magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, {\n storeName: true\n });\n usesCommonjsHelpers = true;\n }\n\n uses[node.name] = true;\n if (node.name === 'global' && !ignoreGlobal) {\n magicString.overwrite(node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, {\n storeName: true\n });\n usesCommonjsHelpers = true;\n }\n\n // if module or exports are used outside the context of an assignment\n // expression, we need to wrap the module\n if (node.name === 'module' || node.name === 'exports') {\n shouldWrap = true;\n }\n }\n\n if (node.name === 'define') {\n magicString.overwrite(node.start, node.end, 'undefined', { storeName: true });\n }\n\n globals.add(node.name);\n }\n\n return;\n }\n\n // Is this an assignment to exports or module.exports?\n if (node.type === 'AssignmentExpression') {\n if (node.left.type !== 'MemberExpression') return;\n\n const flattened = flatten(node.left);\n if (!flattened) return;\n\n if (scope.contains(flattened.name)) return;\n\n const match = exportsPattern.exec(flattened.keypath);\n if (!match || flattened.keypath === 'exports') return;\n\n uses[flattened.name] = true;\n\n // we're dealing with `module.exports = ...` or `[module.]exports.foo = ...` –\n // if this isn't top-level, we'll need to wrap the module\n if (programDepth > 3) shouldWrap = true;\n\n node.left._skip = true;\n\n if (flattened.keypath === 'module.exports' && node.right.type === 'ObjectExpression') {\n node.right.properties.forEach((prop) => {\n if (prop.computed || !('key' in prop) || prop.key.type !== 'Identifier') return;\n const { name } = prop.key;\n if (name === makeLegalIdentifier(name)) namedExports[name] = true;\n });\n return;\n }\n\n if (match[1]) namedExports[match[1]] = true;\n return;\n }\n\n const name = getDefinePropertyCallName(node, 'exports');\n if (name && name === makeLegalIdentifier(name)) namedExports[name] = true;\n\n // if this is `var x = require('x')`, we can do `import x from 'x'`\n if (\n node.type === 'VariableDeclarator' &&\n node.id.type === 'Identifier' &&\n isStaticRequireStatement(node.init) &&\n !isIgnoredRequireStatement(node.init)\n ) {\n // for now, only do this for top-level requires. maybe fix this in future\n if (scope.parent) return;\n\n // edge case — CJS allows you to assign to imports. ES doesn't\n if (assignedTo.has(node.id.name)) return;\n\n const required = getRequired(node.init, node.id.name);\n required.importsDefault = true;\n\n if (required.name === node.id.name && !required.isDynamic) {\n node._shouldRemove = true;\n }\n }\n\n if (!isStaticRequireStatement(node) || isIgnoredRequireStatement(node)) {\n return;\n }\n\n const required = getRequired(node);\n\n if (parent.type === 'ExpressionStatement') {\n // is a bare import, e.g. `require('foo');`\n magicString.remove(parent.start, parent.end);\n } else {\n required.importsDefault = true;\n\n if (shouldUseSimulatedRequire(required)) {\n magicString.overwrite(\n node.start,\n node.end,\n `${HELPERS_NAME}.commonjsRequire(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizePathSlashes(required.source), commonDir)\n )}, ${JSON.stringify(\n dirname(id) === '.'\n ? null /* default behavior */\n : getVirtualPathForDynamicRequirePath(normalizePathSlashes(dirname(id)), commonDir)\n )})`\n );\n usesCommonjsHelpers = true;\n } else {\n magicString.overwrite(node.start, node.end, required.name);\n }\n }\n\n node.callee._skip = true;\n },\n\n leave(node) {\n programDepth -= 1;\n if (node.scope) scope = scope.parent;\n if (functionType.test(node.type)) lexicalDepth -= 1;\n\n if (node.type === 'VariableDeclaration') {\n let keepDeclaration = false;\n let c = node.declarations[0].start;\n\n for (let i = 0; i < node.declarations.length; i += 1) {\n const declarator = node.declarations[i];\n\n if (declarator._shouldRemove) {\n magicString.remove(c, declarator.end);\n } else {\n if (!keepDeclaration) {\n magicString.remove(c, declarator.start);\n keepDeclaration = true;\n }\n\n c = declarator.end;\n }\n }\n\n if (!keepDeclaration) {\n magicString.remove(node.start, node.end);\n }\n }\n }\n });\n\n if (\n !sources.length &&\n !uses.module &&\n !uses.exports &&\n !uses.require &&\n (ignoreGlobal || !uses.global)\n ) {\n if (Object.keys(namedExports).length) {\n throw new Error(\n `Custom named exports were specified for ${id} but it does not appear to be a CommonJS module`\n );\n }\n // not a CommonJS module\n return null;\n }\n\n // If `isEsModule` is on, it means it has ES6 import/export statements,\n // which just can't be wrapped in a function.\n if (isEsModule) shouldWrap = false;\n\n usesCommonjsHelpers = usesCommonjsHelpers || shouldWrap;\n\n const importBlock = `${(usesCommonjsHelpers\n ? [`import * as ${HELPERS_NAME} from '${HELPERS_ID}';`]\n : []\n )\n .concat(\n sources.map(\n ([source]) =>\n // import the actual module before the proxy, so that we know\n // what kind of proxy to build\n `import '${source}';`\n ),\n sources\n .filter(([, importProxy]) => importProxy)\n .map(([source]) => {\n const { name, importsDefault } = required[source];\n return `import ${importsDefault ? `${name} from ` : ``}'${getProxyId(source)}';`;\n })\n )\n .join('\\n')}\\n\\n`;\n\n const namedExportDeclarations = [];\n let wrapperStart = '';\n let wrapperEnd = '';\n\n const moduleName = deconflict(scope, globals, getName(id));\n if (!isEntry && !isEsModule) {\n const exportModuleExports = {\n str: `export { ${moduleName} as __moduleExports };`,\n name: '__moduleExports'\n };\n\n namedExportDeclarations.push(exportModuleExports);\n }\n\n const name = getName(id);\n\n function addExport(x) {\n const deconflicted = deconflict(scope, globals, name);\n\n const declaration =\n deconflicted === name\n ? `export var ${x} = ${moduleName}.${x};`\n : `var ${deconflicted} = ${moduleName}.${x};\\nexport { ${deconflicted} as ${x} };`;\n\n namedExportDeclarations.push({\n str: declaration,\n name: x\n });\n }\n\n const defaultExportPropertyAssignments = [];\n let hasDefaultExport = false;\n\n if (shouldWrap) {\n const args = `module${uses.exports ? ', exports' : ''}`;\n\n wrapperStart = `var ${moduleName} = ${HELPERS_NAME}.createCommonjsModule(function (${args}) {\\n`;\n\n wrapperEnd = `\\n}`;\n if (isDynamicRequireModulesEnabled) {\n wrapperEnd += `, ${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizePathSlashes(dirname(id)), commonDir)\n )}`;\n }\n\n wrapperEnd += `);`;\n } else {\n const names = [];\n\n for (const node of ast.body) {\n if (node.type === 'ExpressionStatement' && node.expression.type === 'AssignmentExpression') {\n const { left } = node.expression;\n const flattened = flatten(left);\n\n if (!flattened) {\n continue;\n }\n\n const match = exportsPattern.exec(flattened.keypath);\n if (!match) {\n continue;\n }\n\n if (flattened.keypath === 'module.exports') {\n hasDefaultExport = true;\n magicString.overwrite(left.start, left.end, `var ${moduleName}`);\n } else {\n const [, name] = match;\n const deconflicted = deconflict(scope, globals, name);\n\n names.push({ name, deconflicted });\n\n magicString.overwrite(node.start, left.end, `var ${deconflicted}`);\n\n const declaration =\n name === deconflicted\n ? `export { ${name} };`\n : `export { ${deconflicted} as ${name} };`;\n\n if (name !== 'default') {\n namedExportDeclarations.push({\n str: declaration,\n name\n });\n delete namedExports[name];\n }\n\n defaultExportPropertyAssignments.push(`${moduleName}.${name} = ${deconflicted};`);\n }\n }\n }\n\n if (!hasDefaultExport && (names.length || (!isEntry && !isEsModule))) {\n wrapperEnd = `\\n\\nvar ${moduleName} = {\\n${names\n .map(({ name, deconflicted }) => `\\t${name}: ${deconflicted}`)\n .join(',\\n')}\\n};`;\n }\n }\n\n Object.keys(namedExports)\n .filter((key) => !blacklist[key])\n .forEach(addExport);\n\n const defaultExport = /__esModule/.test(code)\n ? `export default ${HELPERS_NAME}.unwrapExports(${moduleName});`\n : `export default ${moduleName};`;\n\n const named = namedExportDeclarations\n .filter((x) => x.name !== 'default' || !hasDefaultExport)\n .map((x) => x.str);\n\n const exportBlock = `\\n\\n${(isEsModule ? [] : [defaultExport])\n .concat(named)\n .concat(hasDefaultExport ? defaultExportPropertyAssignments : [])\n .join('\\n')}`;\n\n magicString\n .trim()\n .prepend(importBlock + wrapperStart)\n .trim()\n .append(wrapperEnd);\n\n const injectExportBlock = hasDefaultExport || named.length > 0 || shouldWrap || !isEntry;\n if (injectExportBlock) {\n magicString.append(exportBlock);\n }\n\n code = magicString.toString();\n const map = sourceMap ? magicString.generateMap() : null;\n\n return { code, map, syntheticNamedExports: injectExportBlock };\n}\n","import { statSync } from 'fs';\n\nimport { resolve } from 'path';\n\nimport glob from 'glob';\n\nimport { normalizePathSlashes } from './transform';\n\nexport default function getDynamicRequirePaths(patterns) {\n const dynamicRequireModuleSet = new Set();\n for (const pattern of !patterns || Array.isArray(patterns) ? patterns || [] : [patterns]) {\n const isNegated = pattern.startsWith('!');\n const modifySet = Set.prototype[isNegated ? 'delete' : 'add'].bind(dynamicRequireModuleSet);\n for (const path of glob.sync(isNegated ? pattern.substr(1) : pattern)) {\n modifySet(normalizePathSlashes(resolve(path)));\n }\n }\n const dynamicRequireModuleDirPaths = Array.from(dynamicRequireModuleSet.values()).filter(\n (path) => {\n try {\n if (statSync(path).isDirectory()) return true;\n } catch (ignored) {\n // Nothing to do here\n }\n return false;\n }\n );\n return { dynamicRequireModuleSet, dynamicRequireModuleDirPaths };\n}\n","/* eslint-disable no-undefined */\nconst isCjsPromises = new Map();\n\nexport function getIsCjsPromise(id) {\n let isCjsPromise = isCjsPromises.get(id);\n if (isCjsPromise) return isCjsPromise.promise;\n\n const promise = new Promise((resolve) => {\n isCjsPromise = {\n resolve,\n promise: undefined\n };\n isCjsPromises.set(id, isCjsPromise);\n });\n isCjsPromise.promise = promise;\n\n return promise;\n}\n\nexport function setIsCjsPromise(id, resolution) {\n const isCjsPromise = isCjsPromises.get(id);\n if (isCjsPromise) {\n if (isCjsPromise.resolve) {\n isCjsPromise.resolve(resolution);\n isCjsPromise.resolve = undefined;\n }\n } else {\n isCjsPromises.set(id, { promise: Promise.resolve(resolution), resolve: undefined });\n }\n}\n","/* eslint-disable no-param-reassign, no-undefined */\nimport { statSync } from 'fs';\nimport { dirname, resolve, sep } from 'path';\n\nimport {\n DYNAMIC_JSON_PREFIX,\n DYNAMIC_PACKAGES_ID,\n getExternalProxyId,\n getIdFromProxyId,\n getProxyId,\n HELPERS_ID,\n PROXY_SUFFIX\n} from './helpers';\n\nfunction getCandidatesForExtension(resolved, extension) {\n return [resolved + extension, `${resolved}${sep}index${extension}`];\n}\n\nfunction getCandidates(resolved, extensions) {\n return extensions.reduce(\n (paths, extension) => paths.concat(getCandidatesForExtension(resolved, extension)),\n [resolved]\n );\n}\n\nexport default function getResolveId(extensions) {\n function resolveExtensions(importee, importer) {\n // not our problem\n if (importee[0] !== '.' || !importer) return undefined;\n\n const resolved = resolve(dirname(importer), importee);\n const candidates = getCandidates(resolved, extensions);\n\n for (let i = 0; i < candidates.length; i += 1) {\n try {\n const stats = statSync(candidates[i]);\n if (stats.isFile()) return { id: candidates[i] };\n } catch (err) {\n /* noop */\n }\n }\n\n return undefined;\n }\n\n function resolveId(importee, importer) {\n const isProxyModule = importee.endsWith(PROXY_SUFFIX);\n if (isProxyModule) {\n importee = getIdFromProxyId(importee);\n } else if (importee.startsWith('\\0')) {\n if (\n importee === HELPERS_ID ||\n importee === DYNAMIC_PACKAGES_ID ||\n importee.startsWith(DYNAMIC_JSON_PREFIX)\n ) {\n return importee;\n }\n return null;\n }\n\n if (importee.startsWith(DYNAMIC_JSON_PREFIX)) {\n return importee;\n }\n\n if (importer && importer.endsWith(PROXY_SUFFIX)) {\n importer = getIdFromProxyId(importer);\n }\n\n return this.resolve(importee, importer, { skipSelf: true }).then((resolved) => {\n if (!resolved) {\n resolved = resolveExtensions(importee, importer);\n }\n if (isProxyModule) {\n if (!resolved) {\n return { id: getExternalProxyId(importee), external: false };\n }\n resolved.id = (resolved.external ? getExternalProxyId : getProxyId)(resolved.id);\n resolved.external = false;\n return resolved;\n }\n return resolved;\n });\n }\n\n return resolveId;\n}\n","import { existsSync, readFileSync } from 'fs';\nimport { extname, join } from 'path';\n\nimport { createFilter } from '@rollup/pluginutils';\n\nimport getCommonDir from 'commondir';\n\nimport { peerDependencies } from '../package.json';\n\nimport getDynamicRequirePaths from './dynamic-require-paths';\n\nimport {\n DYNAMIC_JSON_PREFIX,\n DYNAMIC_PACKAGES_ID,\n DYNAMIC_REGISTER_PREFIX,\n getVirtualPathForDynamicRequirePath,\n EXTERNAL_SUFFIX,\n getIdFromExternalProxyId,\n getIdFromProxyId,\n HELPERS,\n HELPERS_ID,\n HELPER_NON_DYNAMIC,\n HELPERS_DYNAMIC,\n PROXY_SUFFIX\n} from './helpers';\n\nimport { getIsCjsPromise, setIsCjsPromise } from './is-cjs';\nimport getResolveId from './resolve-id';\nimport {\n checkEsModule,\n normalizePathSlashes,\n hasCjsKeywords,\n transformCommonjs\n} from './transform';\nimport { getName } from './utils';\n\nexport default function commonjs(options = {}) {\n const extensions = options.extensions || ['.js'];\n const filter = createFilter(options.include, options.exclude);\n const { ignoreGlobal } = options;\n\n const { dynamicRequireModuleSet, dynamicRequireModuleDirPaths } = getDynamicRequirePaths(\n options.dynamicRequireTargets\n );\n const isDynamicRequireModulesEnabled = dynamicRequireModuleSet.size > 0;\n const commonDir = isDynamicRequireModulesEnabled\n ? getCommonDir(null, Array.from(dynamicRequireModuleSet).concat(process.cwd()))\n : null;\n\n const esModulesWithoutDefaultExport = new Set();\n const esModulesWithDefaultExport = new Set();\n\n const ignoreRequire =\n typeof options.ignore === 'function'\n ? options.ignore\n : Array.isArray(options.ignore)\n ? (id) => options.ignore.includes(id)\n : () => false;\n\n const resolveId = getResolveId(extensions);\n\n const sourceMap = options.sourceMap !== false;\n\n function transformAndCheckExports(code, id) {\n const { isEsModule, hasDefaultExport, ast } = checkEsModule(this.parse, code, id);\n\n const isDynamicRequireModule = dynamicRequireModuleSet.has(normalizePathSlashes(id));\n\n if (isEsModule && (!isDynamicRequireModule || !options.transformMixedEsModules)) {\n (hasDefaultExport ? esModulesWithDefaultExport : esModulesWithoutDefaultExport).add(id);\n if (!options.transformMixedEsModules) {\n setIsCjsPromise(id, false);\n return null;\n }\n }\n // it is not an ES module AND it does not have CJS-specific elements.\n else if (!hasCjsKeywords(code, ignoreGlobal)) {\n esModulesWithoutDefaultExport.add(id);\n setIsCjsPromise(id, false);\n return null;\n }\n\n const transformed = transformCommonjs(\n this.parse,\n code,\n id,\n this.getModuleInfo(id).isEntry,\n isEsModule,\n ignoreGlobal || isEsModule,\n ignoreRequire,\n sourceMap,\n isDynamicRequireModulesEnabled,\n dynamicRequireModuleSet,\n commonDir,\n ast\n );\n\n setIsCjsPromise(id, isEsModule ? false : Boolean(transformed));\n\n if (!transformed) {\n if (!isEsModule || isDynamicRequireModule) esModulesWithoutDefaultExport.add(id);\n return null;\n }\n\n return transformed;\n }\n\n return {\n name: 'commonjs',\n\n buildStart() {\n if (options.namedExports != null) {\n this.warn(\n 'The namedExports option from \"@rollup/plugin-commonjs\" is deprecated. Named exports are now handled automatically.'\n );\n }\n\n const [major, minor] = this.meta.rollupVersion.split('.').map(Number);\n const minVersion = peerDependencies.rollup.slice(2);\n const [minMajor, minMinor] = minVersion.split('.').map(Number);\n if (major < minMajor || (major === minMajor && minor < minMinor)) {\n this.error(\n `Insufficient Rollup version: \"@rollup/plugin-commonjs\" requires at least rollup@${minVersion} but found rollup@${this.meta.rollupVersion}.`\n );\n }\n },\n\n resolveId,\n\n load(id) {\n if (id === HELPERS_ID) {\n let code = HELPERS;\n\n // Do not bloat everyone's code with the module manager code\n if (isDynamicRequireModulesEnabled) code += HELPERS_DYNAMIC;\n else code += HELPER_NON_DYNAMIC;\n\n return code;\n }\n\n // generate proxy modules\n if (id.endsWith(EXTERNAL_SUFFIX)) {\n const actualId = getIdFromExternalProxyId(id);\n const name = getName(actualId);\n\n if (actualId === HELPERS_ID || actualId === DYNAMIC_PACKAGES_ID)\n // These do not export default\n return `import * as ${name} from ${JSON.stringify(actualId)}; export default ${name};`;\n\n return `import ${name} from ${JSON.stringify(actualId)}; export default ${name};`;\n }\n\n if (id === DYNAMIC_PACKAGES_ID) {\n let code = `const { commonjsRegister } = require('${HELPERS_ID}');`;\n for (const dir of dynamicRequireModuleDirPaths) {\n let entryPoint = 'index.js';\n\n try {\n if (existsSync(join(dir, 'package.json'))) {\n entryPoint =\n JSON.parse(readFileSync(join(dir, 'package.json'), { encoding: 'utf8' })).main ||\n entryPoint;\n }\n } catch (ignored) {\n // ignored\n }\n\n code += `\\ncommonjsRegister(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(dir, commonDir)\n )}, function (module, exports) {\n module.exports = require(${JSON.stringify(normalizePathSlashes(join(dir, entryPoint)))});\n});`;\n }\n return code;\n }\n\n let actualId = id;\n\n const isDynamicJson = actualId.startsWith(DYNAMIC_JSON_PREFIX);\n if (isDynamicJson) {\n actualId = actualId.slice(DYNAMIC_JSON_PREFIX.length);\n }\n\n const normalizedPath = normalizePathSlashes(actualId);\n\n if (isDynamicJson) {\n return `require('${HELPERS_ID}').commonjsRegister(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizedPath, commonDir)\n )}, function (module, exports) {\n module.exports = require(${JSON.stringify(normalizedPath)});\n});`;\n }\n\n if (dynamicRequireModuleSet.has(normalizedPath) && !normalizedPath.endsWith('.json')) {\n // Try our best to still export the module fully.\n // The commonjs polyfill should take care of circular references.\n\n return `require('${HELPERS_ID}').commonjsRegister(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizedPath, commonDir)\n )}, function (module, exports) {\n ${readFileSync(normalizedPath, { encoding: 'utf8' })}\n});`;\n }\n\n if (actualId.endsWith(PROXY_SUFFIX)) {\n actualId = getIdFromProxyId(actualId);\n const name = getName(actualId);\n\n return getIsCjsPromise(actualId).then((isCjs) => {\n if (\n dynamicRequireModuleSet.has(normalizePathSlashes(actualId)) &&\n !actualId.endsWith('.json')\n )\n return `import {commonjsRequire} from '${HELPERS_ID}'; const ${name} = commonjsRequire(${JSON.stringify(\n getVirtualPathForDynamicRequirePath(normalizePathSlashes(actualId), commonDir)\n )}); export default (${name} && ${name}['default']) || ${name}`;\n else if (isCjs)\n return `import { __moduleExports } from ${JSON.stringify(\n actualId\n )}; export default __moduleExports;`;\n else if (esModulesWithoutDefaultExport.has(actualId))\n return `import * as ${name} from ${JSON.stringify(actualId)}; export default ${name};`;\n else if (esModulesWithDefaultExport.has(actualId)) {\n return `export {default} from ${JSON.stringify(actualId)};`;\n }\n return `import * as ${name} from ${JSON.stringify(\n actualId\n )}; import {getCjsExportFromNamespace} from \"${HELPERS_ID}\"; export default getCjsExportFromNamespace(${name})`;\n });\n }\n\n if (isDynamicRequireModulesEnabled && this.getModuleInfo(id).isEntry) {\n let code;\n\n try {\n code = readFileSync(actualId, { encoding: 'utf8' });\n } catch (ex) {\n this.warn(`Failed to read file ${actualId}, dynamic modules might not work correctly`);\n return null;\n }\n\n let dynamicImports = Array.from(dynamicRequireModuleSet)\n .map((dynamicId) => `require(${JSON.stringify(DYNAMIC_REGISTER_PREFIX + dynamicId)});`)\n .join('\\n');\n\n if (dynamicRequireModuleDirPaths.length) {\n dynamicImports += `require(${JSON.stringify(\n DYNAMIC_REGISTER_PREFIX + DYNAMIC_PACKAGES_ID\n )});`;\n }\n\n code = `${dynamicImports}\\n${code}`;\n\n return code;\n }\n\n return null;\n },\n\n transform(code, id) {\n if (id !== DYNAMIC_PACKAGES_ID && !id.startsWith(DYNAMIC_JSON_PREFIX)) {\n if (!filter(id) || extensions.indexOf(extname(id)) === -1) {\n setIsCjsPromise(id, null);\n return null;\n }\n }\n\n let transformed;\n try {\n transformed = transformAndCheckExports.call(this, code, id);\n } catch (err) {\n transformed = null;\n setIsCjsPromise(id, false);\n this.error(err, err.loc);\n }\n\n return transformed;\n }\n };\n}\n"],"names":["operators","x","equals","left","right","not","isFalsy","argument","isTruthy","flatten","node","parts","type","computed","unshift","property","name","object","keypath","join","value","expression","operator","undefined","a","b","strict","PROXY_SUFFIX","getProxyId","id","getIdFromProxyId","proxyId","slice","length","EXTERNAL_SUFFIX","getExternalProxyId","getIdFromExternalProxyId","VIRTUAL_PATH_BASE","getVirtualPathForDynamicRequirePath","path","commonDir","startsWith","DYNAMIC_REGISTER_PREFIX","DYNAMIC_JSON_PREFIX","DYNAMIC_PACKAGES_ID","HELPERS_ID","HELPERS","HELPER_NON_DYNAMIC","HELPERS_DYNAMIC","getName","makeLegalIdentifier","basename","extname","segments","dirname","split","sep","reserved","blacklist","__esModule","forEach","word","exportsPattern","firstpassGlobal","firstpassNoGlobal","importExportDeclaration","functionType","deconflict","scope","globals","identifier","i","deconflicted","contains","has","declarations","tryParse","parse","code","allowReturnOutsideFunction","err","message","normalizePathSlashes","replace","hasCjsKeywords","ignoreGlobal","firstpass","test","checkEsModule","ast","isEsModule","body","hasDefaultExport","specifiers","specifier","exported","getDefinePropertyCallName","targetName","callee","arguments","target","val","transformCommonjs","isEntry","ignoreRequire","sourceMap","isDynamicRequireModulesEnabled","dynamicRequireModuleSet","astCache","magicString","MagicString","required","sources","uid","attachScopes","uses","module","exports","global","require","lexicalDepth","programDepth","Set","HELPERS_NAME","namedExports","shouldWrap","usesCommonjsHelpers","isRequireStatement","isRequireIdentifier","hasDynamicArguments","expressions","isStaticRequireStatement","isIgnoredRequireStatement","requiredNode","getRequireStringArg","quasis","cooked","getRequired","sourceId","isDynamicRegister","substr","existing","isDynamic","hasDynamicModuleForPath","endsWith","push","source","importsDefault","resolvedPath","nodeResolveSync","basedir","ex","attemptExt","resolve","shouldUseSimulatedRequire","assignedTo","walk","enter","extractAssignedNames","add","parent","addSourcemapLocation","start","end","consequent","skip","alternate","_skip","overwrite","storeName","flattened","isReference","appendLeft","JSON","stringify","match","exec","properties","prop","key","init","_shouldRemove","remove","leave","keepDeclaration","c","declarator","Object","keys","Error","importBlock","concat","map","filter","importProxy","namedExportDeclarations","wrapperStart","wrapperEnd","moduleName","exportModuleExports","str","addExport","declaration","defaultExportPropertyAssignments","args","names","defaultExport","named","exportBlock","trim","prepend","append","injectExportBlock","toString","generateMap","syntheticNamedExports","getDynamicRequirePaths","patterns","Array","isArray","pattern","isNegated","modifySet","prototype","bind","glob","sync","dynamicRequireModuleDirPaths","from","values","statSync","isDirectory","ignored","isCjsPromises","Map","getIsCjsPromise","isCjsPromise","get","promise","Promise","set","setIsCjsPromise","resolution","getCandidatesForExtension","resolved","extension","getCandidates","extensions","reduce","paths","getResolveId","resolveExtensions","importee","importer","candidates","stats","isFile","resolveId","isProxyModule","skipSelf","then","external","commonjs","options","createFilter","include","exclude","dynamicRequireTargets","size","getCommonDir","process","cwd","esModulesWithoutDefaultExport","esModulesWithDefaultExport","ignore","includes","transformAndCheckExports","isDynamicRequireModule","transformMixedEsModules","transformed","getModuleInfo","Boolean","buildStart","warn","meta","rollupVersion","Number","major","minor","minVersion","peerDependencies","rollup","minMajor","minMinor","error","load","actualId","dir","entryPoint","existsSync","readFileSync","encoding","main","isDynamicJson","normalizedPath","isCjs","dynamicImports","dynamicId","transform","indexOf","call","loc"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAGA,MAAMA,SAAS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AAE,CAACY,UAAH,CAAcE,mBAAd,CAAnC,EAAuE;AACrE,YAAI,CAACsJ,MAAM,CAACpK,EAAD,CAAP,IAAe0N,UAAU,CAAC8D,OAAX,CAAmBjQ,YAAO,CAACvB,EAAD,CAA1B,MAAoC,CAAC,CAAxD,EAA2D;AACzDoN,UAAAA,eAAe,CAACpN,EAAD,EAAK,IAAL,CAAf;AACA,iBAAO,IAAP;AACD;AACF;;AAED,UAAI0P,WAAJ;;AACA,UAAI;AACFA,QAAAA,WAAW,GAAGH,wBAAwB,CAACkC,IAAzB,CAA8B,IAA9B,EAAoCxO,IAApC,EAA0CjD,EAA1C,CAAd;AACD,OAFD,CAEE,OAAOmD,GAAP,EAAY;AACZuM,QAAAA,WAAW,GAAG,IAAd;AACAtC,QAAAA,eAAe,CAACpN,EAAD,EAAK,KAAL,CAAf;AACA,aAAKyQ,KAAL,CAAWtN,GAAX,EAAgBA,GAAG,CAACuO,GAApB;AACD;;AAED,aAAOhC,WAAP;AACD;;AA1KI,GAAP;AA4KD;;;;"} \ No newline at end of file diff --git a/frontend/node_modules/@rollup/plugin-commonjs/package.json b/frontend/node_modules/@rollup/plugin-commonjs/package.json new file mode 100644 index 0000000000000000000000000000000000000000..ad77e7429a0b4a962135f3589af832c0c721b131 --- /dev/null +++ b/frontend/node_modules/@rollup/plugin-commonjs/package.json @@ -0,0 +1,87 @@ +{ + "name": "@rollup/plugin-commonjs", + "version": "12.0.0", + "publishConfig": { + "access": "public" + }, + "description": "Convert CommonJS modules to ES2015", + "license": "MIT", + "repository": "rollup/plugins", + "author": "Rich Harris ", + "homepage": "https://github.com/rollup/plugins/tree/master/packages/commonjs/#readme", + "bugs": "https://github.com/rollup/plugins/issues", + "main": "dist/index.js", + "engines": { + "node": ">= 8.0.0" + }, + "scripts": { + "build": "rollup -c", + "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov", + "ci:lint": "pnpm run build && pnpm run lint", + "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", + "ci:test": "pnpm run test -- --verbose && pnpm run test:ts", + "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", + "lint:docs": "prettier --single-quote --write README.md", + "lint:js": "eslint --fix --cache src test types --ext .js,.ts", + "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", + "prebuild": "del-cli dist", + "prepare": "pnpm run build", + "prepublishOnly": "pnpm run lint && pnpm run test:ts", + "pretest": "pnpm run build", + "test": "ava", + "test:ts": "tsc types/index.d.ts test/types.ts --noEmit" + }, + "files": [ + "dist", + "types", + "README.md", + "LICENSE" + ], + "keywords": [ + "rollup", + "plugin", + "npm", + "modules", + "commonjs", + "require" + ], + "peerDependencies": { + "rollup": "^2.3.4" + }, + "dependencies": { + "@rollup/pluginutils": "^3.0.8", + "commondir": "^1.0.1", + "estree-walker": "^1.0.1", + "glob": "^7.1.2", + "is-reference": "^1.1.2", + "magic-string": "^0.25.2", + "resolve": "^1.11.0" + }, + "devDependencies": { + "@babel/core": "^7.9.0", + "@babel/preset-env": "^7.9.0", + "@babel/register": "^7.9.0", + "@rollup/plugin-json": "^4.0.1", + "@rollup/plugin-node-resolve": "^7.0.0", + "acorn": "^7.1.1", + "locate-character": "^2.0.5", + "prettier": "^1.19.1", + "require-relative": "^0.8.7", + "rollup": "^2.3.4", + "rollup-plugin-babel": "^4.3.3", + "shx": "^0.3.2", + "source-map": "^0.6.1", + "source-map-support": "^0.5.16", + "typescript": "^3.7.4" + }, + "ava": { + "files": [ + "!**/fixtures/**", + "!**/helpers/**", + "!**/recipes/**", + "!**/types.ts" + ] + }, + "module": "dist/index.es.js", + "types": "types/index.d.ts" +} diff --git a/frontend/node_modules/@rollup/plugin-commonjs/types/index.d.ts b/frontend/node_modules/@rollup/plugin-commonjs/types/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1b124fdd279466247a0a46e47a1f9fb6f8ebd08b --- /dev/null +++ b/frontend/node_modules/@rollup/plugin-commonjs/types/index.d.ts @@ -0,0 +1,69 @@ +import { FilterPattern } from '@rollup/pluginutils'; +import { Plugin } from 'rollup'; + +interface RollupCommonJSOptions { + /** + * non-CommonJS modules will be ignored, but you can also + * specifically include/exclude files + * @default undefined + */ + include?: FilterPattern; + /** + * non-CommonJS modules will be ignored, but you can also + * specifically include/exclude files + * @default undefined + */ + exclude?: FilterPattern; + /** + * search for files other than .js files (must already + * be transpiled by a previous plugin!) + * @default [ '.js' ] + */ + extensions?: ReadonlyArray; + /** + * if true then uses of `global` won't be dealt with by this plugin + * @default false + */ + ignoreGlobal?: boolean; + /** + * if false then skip sourceMap generation for CommonJS modules + * @default true + */ + sourceMap?: boolean; + /** + * Instructs the plugin whether or not to enable mixed module transformations. This is useful in scenarios with mixed ES and CommonJS modules. Set to `true` if it's known that `require` calls should be transformed, or `false` if the code contains env detection and the `require` should survive a transformation. + * @default false + */ + transformMixedEsModules?: boolean; + /** + * explicitly specify unresolvable named exports + * ([see below for more details](https://github.com/rollup/plugins/tree/master/packages/commonjs#named-exports)) + * @default undefined + */ + namedExports?: { [package: string]: ReadonlyArray }; + /** + * sometimes you have to leave require statements + * unconverted. Pass an array containing the IDs + * or a `id => boolean` function. Only use this + * option if you know what you're doing! + */ + ignore?: ReadonlyArray boolean)>; + /** + * Some modules contain dynamic `require` calls, or require modules that contain + * circular dependencies, which are not handled well by static imports. + * Including those modules as `dynamicRequireTargets` will simulate a CommonJS (NodeJS-like) + * environment for them with support for dynamic and circular dependencies. + * + * Note: In extreme cases, this feature may result in some paths being rendered as + * absolute in the final bundle. The plugin tries to avoid exposing paths from + * the local machine, but if you are `dynamicRequirePaths` with paths that are + * far away from your project's folder, that may require replacing strings + * like `"/Users/John/Desktop/foo-project/"` -> `"/"`. + */ + dynamicRequireTargets?: string | ReadonlyArray; +} + +/** + * Convert CommonJS modules to ES6, so they can be included in a Rollup bundle + */ +export default function commonjs(options?: RollupCommonJSOptions): Plugin; diff --git a/frontend/node_modules/@rollup/plugin-node-resolve/CHANGELOG.md b/frontend/node_modules/@rollup/plugin-node-resolve/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..607c4caff31864d5cc4741f6cf56573db5bc386a --- /dev/null +++ b/frontend/node_modules/@rollup/plugin-node-resolve/CHANGELOG.md @@ -0,0 +1,345 @@ +# @rollup/plugin-node-resolve ChangeLog + +## v8.4.0 + +_2020-07-12_ + +### Features + +- feat: preserve search params and hashes (#487) +- feat: support .js imports in TypeScript (#480) + +### Updates + +- docs: fix named export use in readme (#456) +- docs: correct mainFields valid values (#469) + +## v8.3.0 + +_2020-07-12_ + +### Features + +- feat: preserve search params and hashes (#487) +- feat: support .js imports in TypeScript (#480) + +### Updates + +- docs: fix named export use in readme (#456) +- docs: correct mainFields valid values (#469) + +## v8.2.0 + +_2020-07-12_ + +### Features + +- feat: preserve search params and hashes (#487) +- feat: support .js imports in TypeScript (#480) + +### Updates + +- docs: fix named export use in readme (#456) +- docs: correct mainFields valid values (#469) + +## v8.1.0 + +_2020-06-22_ + +### Features + +- feat: add native node es modules support (#413) + +## v8.0.1 + +_2020-06-05_ + +### Bugfixes + +- fix: handle nested entry modules with the resolveOnly option (#430) + +## v8.0.0 + +_2020-05-20_ + +### Breaking Changes + +- feat: Add default export (#361) +- feat: export defaults (#301) + +### Bugfixes + +- fix: resolve local files if `resolveOption` is set (#337) + +### Updates + +- docs: correct misspelling (#343) + +## v7.1.3 + +_2020-04-12_ + +### Bugfixes + +- fix: resolve symlinked entry point properly (#291) + +## v7.1.2 + +_2020-04-12_ + +### Updates + +- docs: fix url (#289) + +## v7.1.1 + +_2020-02-03_ + +### Bugfixes + +- fix: main fields regression (#196) + +## v7.1.0 + +_2020-02-01_ + +### Updates + +- refactor: clean codebase and fix external warnings (#155) + +## v7.0.0 + +_2020-01-07_ + +### Breaking Changes + +- feat: dedupe by package name (#99) + +## v6.1.0 + +_2020-01-04_ + +### Bugfixes + +- fix: allow deduplicating custom module dirs (#101) + +### Features + +- feat: add rootDir option (#98) + +### Updates + +- docs: improve doc related to mainFields (#138) + +## 6.0.0 + +_2019-11-25_ + +- **Breaking:** Minimum compatible Rollup version is 1.20.0 +- **Breaking:** Minimum supported Node version is 8.0.0 +- Published as @rollup/plugin-node-resolve + +## 5.2.1 (unreleased) + +- add missing MIT license file ([#233](https://github.com/rollup/rollup-plugin-node-resolve/pull/233) by @kenjiO) +- Fix incorrect example of config ([#239](https://github.com/rollup/rollup-plugin-node-resolve/pull/240) by @myshov) +- Fix typo in readme ([#240](https://github.com/rollup/rollup-plugin-node-resolve/pull/240) by @LinusU) + +## 5.2.0 (2019-06-29) + +- dedupe accepts a function ([#225](https://github.com/rollup/rollup-plugin-node-resolve/pull/225) by @manucorporat) + +## 5.1.1 (2019-06-29) + +- Move Rollup version check to buildStart hook to avoid issues ([#232](https://github.com/rollup/rollup-plugin-node-resolve/pull/232) by @lukastaegert) + +## 5.1.0 (2019-06-22) + +- Fix path fragment inputs ([#229](https://github.com/rollup/rollup-plugin-node-resolve/pull/229) by @bterlson) + +## 5.0.4 (2019-06-22) + +- Treat sideEffects array as inclusion list ([#227](https://github.com/rollup/rollup-plugin-node-resolve/pull/227) by @mikeharder) + +## 5.0.3 (2019-06-16) + +- Make empty.js a virtual module ([#224](https://github.com/rollup/rollup-plugin-node-resolve/pull/224) by @manucorporat) + +## 5.0.2 (2019-06-13) + +- Support resolve 1.11.1, add built-in test ([#223](https://github.com/rollup/rollup-plugin-node-resolve/pull/223) by @bterlson) + +## 5.0.1 (2019-05-31) + +- Update to resolve@1.11.0 for better performance ([#220](https://github.com/rollup/rollup-plugin-node-resolve/pull/220) by @keithamus) + +## 5.0.0 (2019-05-15) + +- Replace bublé with babel, update dependencies ([#216](https://github.com/rollup/rollup-plugin-node-resolve/pull/216) by @mecurc) +- Handle module side-effects ([#219](https://github.com/rollup/rollup-plugin-node-resolve/pull/219) by @lukastaegert) + +### Breaking Changes + +- Requires at least rollup@1.11.0 to work (v1.12.0 for module side-effects to be respected) +- If used with rollup-plugin-commonjs, it should be at least v10.0.0 + +## 4.2.4 (2019-05-11) + +- Add note on builtins to Readme ([#215](https://github.com/rollup/rollup-plugin-node-resolve/pull/215) by @keithamus) +- Add issue templates ([#217](https://github.com/rollup/rollup-plugin-node-resolve/pull/217) by @mecurc) +- Improve performance by caching `isDir` ([#218](https://github.com/rollup/rollup-plugin-node-resolve/pull/218) by @keithamus) + +## 4.2.3 (2019-04-11) + +- Fix ordering of jsnext:main when using the jsnext option ([#209](https://github.com/rollup/rollup-plugin-node-resolve/pull/209) by @lukastaegert) + +## 4.2.2 (2019-04-10) + +- Fix TypeScript typings (rename and export Options interface) ([#206](https://github.com/rollup/rollup-plugin-node-resolve/pull/206) by @Kocal) +- Fix mainfields typing ([#207](https://github.com/rollup/rollup-plugin-node-resolve/pull/207) by @nicolashenry) + +## 4.2.1 (2019-04-06) + +- Respect setting the deprecated fields "module", "main", and "jsnext" ([#204](https://github.com/rollup/rollup-plugin-node-resolve/pull/204) by @nick-woodward) + +## 4.2.0 (2019-04-06) + +- Add new mainfields option ([#182](https://github.com/rollup/rollup-plugin-node-resolve/pull/182) by @keithamus) +- Added dedupe option to prevent bundling the same package multiple times ([#201](https://github.com/rollup/rollup-plugin-node-resolve/pull/182) by @sormy) + +## 4.1.0 (2019-04-05) + +- Add TypeScript typings ([#189](https://github.com/rollup/rollup-plugin-node-resolve/pull/189) by @NotWoods) +- Update dependencies ([#202](https://github.com/rollup/rollup-plugin-node-resolve/pull/202) by @lukastaegert) + +## 4.0.1 (2019-02-22) + +- Fix issue when external modules are specified in `package.browser` ([#143](https://github.com/rollup/rollup-plugin-node-resolve/pull/143) by @keithamus) +- Fix `package.browser` mapping issue when `false` is specified ([#183](https://github.com/rollup/rollup-plugin-node-resolve/pull/183) by @allex) + +## 4.0.0 (2018-12-09) + +This release will support rollup@1.0 + +### Features + +- Resolve modules used to define manual chunks ([#185](https://github.com/rollup/rollup-plugin-node-resolve/pull/185) by @mcshaman) +- Update dependencies and plugin hook usage ([#187](https://github.com/rollup/rollup-plugin-node-resolve/pull/187) by @lukastaegert) + +## 3.4.0 (2018-09-04) + +This release now supports `.mjs` files by default + +### Features + +- feat: Support .mjs files by default (https://github.com/rollup/rollup-plugin-node-resolve/pull/151, by @leebyron) + +## 3.3.0 (2018-03-17) + +This release adds the `only` option + +### New Features + +- feat: add `only` option (#83; @arantes555) + +### Docs + +- docs: correct description of `jail` option (#120; @GeorgeTaveras1231) + +## 3.2.0 (2018-03-07) + +This release caches reading/statting of files, to improve speed. + +### Performance Improvements + +- perf: cache file stats/reads (#126; @keithamus) + +## 3.0.4 (unreleased) + +- Update lockfile [#137](https://github.com/rollup/rollup-plugin-node-resolve/issues/137) +- Update rollup dependency [#138](https://github.com/rollup/rollup-plugin-node-resolve/issues/138) +- Enable installation from Github [#142](https://github.com/rollup/rollup-plugin-node-resolve/issues/142) + +## 3.0.3 + +- Fix [#130](https://github.com/rollup/rollup-plugin-node-resolve/issues/130) and [#131](https://github.com/rollup/rollup-plugin-node-resolve/issues/131) + +## 3.0.2 + +- Ensure `pkg.browser` is an object if necessary ([#129](https://github.com/rollup/rollup-plugin-node-resolve/pull/129)) + +## 3.0.1 + +- Remove `browser-resolve` dependency ([#127](https://github.com/rollup/rollup-plugin-node-resolve/pull/127)) + +## 3.0.0 + +- [BREAKING] Remove `options.skip` ([#90](https://github.com/rollup/rollup-plugin-node-resolve/pull/90)) +- Add `modulesOnly` option ([#96](https://github.com/rollup/rollup-plugin-node-resolve/pull/96)) + +## 2.1.1 + +- Prevent `jail` from breaking builds on Windows ([#93](https://github.com/rollup/rollup-plugin-node-resolve/issues/93)) + +## 2.1.0 + +- Add `jail` option ([#53](https://github.com/rollup/rollup-plugin-node-resolve/pull/53)) +- Add `customResolveOptions` option ([#79](https://github.com/rollup/rollup-plugin-node-resolve/pull/79)) +- Support symlinked packages ([#82](https://github.com/rollup/rollup-plugin-node-resolve/pull/82)) + +## 2.0.0 + +- Add support `module` field in package.json as an official alternative to jsnext + +## 1.7.3 + +- Error messages are more descriptive ([#50](https://github.com/rollup/rollup-plugin-node-resolve/issues/50)) + +## 1.7.2 + +- Allow entry point paths beginning with ./ + +## 1.7.1 + +- Return a `name` + +## 1.7.0 + +- Allow relative IDs to be external ([#32](https://github.com/rollup/rollup-plugin-node-resolve/pull/32)) + +## 1.6.0 + +- Skip IDs containing null character + +## 1.5.0 + +- Prefer built-in options, but allow opting out ([#28](https://github.com/rollup/rollup-plugin-node-resolve/pull/28)) + +## 1.4.0 + +- Pass `options.extensions` through to `node-resolve` + +## 1.3.0 + +- `skip: true` skips all packages that don't satisfy the `main` or `jsnext` options ([#16](https://github.com/rollup/rollup-plugin-node-resolve/pull/16)) + +## 1.2.1 + +- Support scoped packages in `skip` option ([#15](https://github.com/rollup/rollup-plugin-node-resolve/issues/15)) + +## 1.2.0 + +- Support `browser` field ([#8](https://github.com/rollup/rollup-plugin-node-resolve/issues/8)) +- Get tests to pass on Windows + +## 1.1.0 + +- Use node-resolve to handle various corner cases + +## 1.0.0 + +- Add ES6 build, use Rollup 0.20.0 + +## 0.1.0 + +- First release diff --git a/frontend/node_modules/@rollup/plugin-node-resolve/LICENSE b/frontend/node_modules/@rollup/plugin-node-resolve/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..5e46702cbdea74f8a8139094f5a1ff1f0e486f45 --- /dev/null +++ b/frontend/node_modules/@rollup/plugin-node-resolve/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/contributors) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/frontend/node_modules/@rollup/plugin-node-resolve/README.md b/frontend/node_modules/@rollup/plugin-node-resolve/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9f093239ebb5d82635ee71d26bb6e808c93f9658 --- /dev/null +++ b/frontend/node_modules/@rollup/plugin-node-resolve/README.md @@ -0,0 +1,194 @@ +[npm]: https://img.shields.io/npm/v/@rollup/plugin-node-resolve +[npm-url]: https://www.npmjs.com/package/@rollup/plugin-node-resolve +[size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-node-resolve +[size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-node-resolve + +[![npm][npm]][npm-url] +[![size][size]][size-url] +[![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com) + +# @rollup/plugin-node-resolve + +🍣 A Rollup plugin which locates modules using the [Node resolution algorithm](https://nodejs.org/api/modules.html#modules_all_together), for using third party modules in `node_modules` + +## Requirements + +This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+. + +## Install + +Using npm: + +```console +npm install @rollup/plugin-node-resolve --save-dev +``` + +## Usage + +Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin: + +```js +import { nodeResolve } from '@rollup/plugin-node-resolve'; + +export default { + input: 'src/index.js', + output: { + dir: 'output', + format: 'cjs' + }, + plugins: [nodeResolve()] +}; +``` + +Then call `rollup` either via the [CLI](https://www.rollupjs.org/guide/en/#command-line-reference) or the [API](https://www.rollupjs.org/guide/en/#javascript-api). + +## Options + +### `browser` + +Type: `Boolean`
+Default: `false` + +If `true`, instructs the plugin to use the `"browser"` property in `package.json` files to specify alternative files to load for bundling. This is useful when bundling for a browser environment. Alternatively, a value of `'browser'` can be added to the `mainFields` option. If `false`, any `"browser"` properties in package files will be ignored. This option takes precedence over `mainFields`. + +### `customResolveOptions` + +Type: `Object`
+Default: `null` + +An `Object` that specifies additional options that should be passed through to [`resolve`](https://www.npmjs.com/package/resolve). + +``` +customResolveOptions: { + moduleDirectory: 'js_modules' +} +``` + +### `dedupe` + +Type: `Array[...String]`
+Default: `[]` + +An `Array` of modules names, which instructs the plugin to force resolving for the specified modules to the root `node_modules`. Helps to prevent bundling the same package multiple times if package is imported from dependencies. + +```js +dedupe: ['my-package', '@namespace/my-package']; +``` + +This will deduplicate bare imports such as: + +```js +import 'my-package'; +import '@namespace/my-package'; +``` + +And it will deduplicate deep imports such as: + +```js +import 'my-package/foo.js'; +import '@namespace/my-package/bar.js'; +``` + +### `extensions` + +Type: `Array[...String]`
+Default: `['.mjs', '.js', '.json', '.node']` + +Specifies the extensions of files that the plugin will operate on. + +### `jail` + +Type: `String`
+Default: `'/'` + +Locks the module search within specified path (e.g. chroot). Modules defined outside this path will be marked as external. + +### `mainFields` + +Type: `Array[...String]`
+Default: `['module', 'main']`
+Valid values: `['browser', 'jsnext:main', 'module', 'main']` + +Specifies the properties to scan within a `package.json`, used to determine the bundle entry point. The order of property names is significant, as the first-found property is used as the resolved entry point. If the array contains `'browser'`, key/values specified in the `package.json` `browser` property will be used. + +### `only` + +DEPRECATED: use "resolveOnly" instead + +### `preferBuiltins` + +Type: `Boolean`
+Default: `true` + +If `true`, the plugin will prefer built-in modules (e.g. `fs`, `path`). If `false`, the plugin will look for locally installed modules of the same name. + +### `modulesOnly` + +Type: `Boolean`
+Default: `false` + +If `true`, inspect resolved files to assert that they are ES2015 modules. + +### `resolveOnly` + +Type: `Array[...String|RegExp]`
+Default: `null` + +An `Array` which instructs the plugin to limit module resolution to those whose names match patterns in the array. _Note: Modules not matching any patterns will be marked as external._ + +Example: `resolveOnly: ['batman', /^@batcave\/.*$/]` + +### `rootDir` + +Type: `String`
+Default: `process.cwd()` + +Specifies the root directory from which to resolve modules. Typically used when resolving entry-point imports, and when resolving deduplicated modules. Useful when executing rollup in a package of a mono-repository. + +``` +// Set the root directory to be the parent folder +rootDir: path.join(process.cwd(), '..') +``` + +## Using with @rollup/plugin-commonjs + +Since most packages in your node_modules folder are probably legacy CommonJS rather than JavaScript modules, you may need to use [@rollup/plugin-commonjs](https://github.com/rollup/plugins/tree/master/packages/commonjs): + +```js +// rollup.config.js +import resolve from '@rollup/plugin-node-resolve'; +import commonjs from '@rollup/plugin-commonjs'; + +export default { + input: 'main.js', + output: { + file: 'bundle.js', + format: 'iife', + name: 'MyModule' + }, + plugins: [resolve(), commonjs()] +}; +``` + +## Resolving Built-Ins (like `fs`) + +This plugin won't resolve any builtins (e.g. `fs`). If you need to resolve builtins you can install local modules and set `preferBuiltins` to `false`, or install a plugin like [rollup-plugin-node-polyfills](https://github.com/ionic-team/rollup-plugin-node-polyfills) which provides stubbed versions of these methods. + +If you want to silence warnings about builtins, you can add the list of builtins to the `externals` option; like so: + +```js +import resolve from '@rollup/plugin-node-resolve'; +import builtins from 'builtin-modules' +export default ({ + input: ..., + plugins: [resolve()], + external: builtins, + output: ... +}) +``` + +## Meta + +[CONTRIBUTING](/.github/CONTRIBUTING.md) + +[LICENSE (MIT)](/LICENSE) diff --git a/frontend/node_modules/@rollup/plugin-node-resolve/dist/cjs/index.js b/frontend/node_modules/@rollup/plugin-node-resolve/dist/cjs/index.js new file mode 100644 index 0000000000000000000000000000000000000000..d8a288e6cbc9c0591d856c250b25af7be1d3d057 --- /dev/null +++ b/frontend/node_modules/@rollup/plugin-node-resolve/dist/cjs/index.js @@ -0,0 +1,717 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var path = require('path'); +var builtinList = _interopDefault(require('builtin-modules')); +var deepFreeze = _interopDefault(require('deep-freeze')); +var deepMerge = _interopDefault(require('deepmerge')); +var isModule = _interopDefault(require('is-module')); +var fs = require('fs'); +var fs__default = _interopDefault(fs); +var util = require('util'); +var pluginutils = require('@rollup/pluginutils'); +var resolveModule = _interopDefault(require('resolve')); + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + + if (info.done) { + resolve(value); + } else { + Promise.resolve(value).then(_next, _throw); + } +} + +function _asyncToGenerator(fn) { + return function () { + var self = this, + args = arguments; + return new Promise(function (resolve, reject) { + var gen = fn.apply(self, args); + + function _next(value) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); + } + + function _throw(err) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); + } + + _next(undefined); + }); + }; +} + +function _slicedToArray(arr, i) { + return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); +} + +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} + +function _iterableToArrayLimit(arr, i) { + if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; +} + +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(n); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); +} + +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + + return arr2; +} + +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} + +function _createForOfIteratorHelper(o) { + if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { + if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { + var i = 0; + + var F = function () {}; + + return { + s: F, + n: function () { + if (i >= o.length) return { + done: true + }; + return { + done: false, + value: o[i++] + }; + }, + e: function (e) { + throw e; + }, + f: F + }; + } + + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + + var it, + normalCompletion = true, + didErr = false, + err; + return { + s: function () { + it = o[Symbol.iterator](); + }, + n: function () { + var step = it.next(); + normalCompletion = step.done; + return step; + }, + e: function (e) { + didErr = true; + err = e; + }, + f: function () { + try { + if (!normalCompletion && it.return != null) it.return(); + } finally { + if (didErr) throw err; + } + } + }; +} + +const exists = util.promisify(fs__default.exists); +const readFile = util.promisify(fs__default.readFile); +const realpath = util.promisify(fs__default.realpath); +const stat = util.promisify(fs__default.stat); + +const onError = error => { + if (error.code === 'ENOENT') { + return false; + } + + throw error; +}; + +const makeCache = fn => { + const cache = new Map(); + + const wrapped = /*#__PURE__*/function () { + var _ref = _asyncToGenerator(function* (param, done) { + if (cache.has(param) === false) { + cache.set(param, fn(param).catch(err => { + cache.delete(param); + throw err; + })); + } + + try { + const result = cache.get(param); + const value = yield result; + return done(null, value); + } catch (error) { + return done(error); + } + }); + + return function wrapped(_x, _x2) { + return _ref.apply(this, arguments); + }; + }(); + + wrapped.clear = () => cache.clear(); + + return wrapped; +}; + +const isDirCached = makeCache( /*#__PURE__*/function () { + var _ref2 = _asyncToGenerator(function* (file) { + try { + const stats = yield stat(file); + return stats.isDirectory(); + } catch (error) { + return onError(error); + } + }); + + return function (_x3) { + return _ref2.apply(this, arguments); + }; +}()); +const isFileCached = makeCache( /*#__PURE__*/function () { + var _ref3 = _asyncToGenerator(function* (file) { + try { + const stats = yield stat(file); + return stats.isFile(); + } catch (error) { + return onError(error); + } + }); + + return function (_x4) { + return _ref3.apply(this, arguments); + }; +}()); +const readCachedFile = makeCache(readFile); + +const resolveId = util.promisify(resolveModule); // returns the imported package name for bare module imports + +function getPackageName(id) { + if (id.startsWith('.') || id.startsWith('/')) { + return null; + } + + const split = id.split('/'); // @my-scope/my-package/foo.js -> @my-scope/my-package + // @my-scope/my-package -> @my-scope/my-package + + if (split[0][0] === '@') { + return `${split[0]}/${split[1]}`; + } // my-package/foo.js -> my-package + // my-package -> my-package + + + return split[0]; +} +function getMainFields(options) { + let mainFields; + + if (options.mainFields) { + mainFields = options.mainFields; + } else { + mainFields = ['module', 'main']; + } + + if (options.browser && mainFields.indexOf('browser') === -1) { + return ['browser'].concat(mainFields); + } + + if (!mainFields.length) { + throw new Error('Please ensure at least one `mainFields` value is specified'); + } + + return mainFields; +} +function getPackageInfo(options) { + const cache = options.cache, + extensions = options.extensions, + pkg = options.pkg, + mainFields = options.mainFields, + preserveSymlinks = options.preserveSymlinks, + useBrowserOverrides = options.useBrowserOverrides; + let pkgPath = options.pkgPath; + + if (cache.has(pkgPath)) { + return cache.get(pkgPath); + } // browserify/resolve doesn't realpath paths returned in its packageFilter callback + + + if (!preserveSymlinks) { + pkgPath = fs.realpathSync(pkgPath); + } + + const pkgRoot = path.dirname(pkgPath); + const packageInfo = { + // copy as we are about to munge the `main` field of `pkg`. + packageJson: Object.assign({}, pkg), + // path to package.json file + packageJsonPath: pkgPath, + // directory containing the package.json + root: pkgRoot, + // which main field was used during resolution of this module (main, module, or browser) + resolvedMainField: 'main', + // whether the browser map was used to resolve the entry point to this module + browserMappedMain: false, + // the entry point of the module with respect to the selected main field and any + // relevant browser mappings. + resolvedEntryPoint: '' + }; + let overriddenMain = false; + + for (let i = 0; i < mainFields.length; i++) { + const field = mainFields[i]; + + if (typeof pkg[field] === 'string') { + pkg.main = pkg[field]; + packageInfo.resolvedMainField = field; + overriddenMain = true; + break; + } + } + + const internalPackageInfo = { + cachedPkg: pkg, + hasModuleSideEffects: () => null, + hasPackageEntry: overriddenMain !== false || mainFields.indexOf('main') !== -1, + packageBrowserField: useBrowserOverrides && typeof pkg.browser === 'object' && Object.keys(pkg.browser).reduce((browser, key) => { + let resolved = pkg.browser[key]; + + if (resolved && resolved[0] === '.') { + resolved = path.resolve(pkgRoot, resolved); + } + /* eslint-disable no-param-reassign */ + + + browser[key] = resolved; + + if (key[0] === '.') { + const absoluteKey = path.resolve(pkgRoot, key); + browser[absoluteKey] = resolved; + + if (!path.extname(key)) { + extensions.reduce((subBrowser, ext) => { + subBrowser[absoluteKey + ext] = subBrowser[key]; + return subBrowser; + }, browser); + } + } + + return browser; + }, {}), + packageInfo + }; + const browserMap = internalPackageInfo.packageBrowserField; + + if (useBrowserOverrides && typeof pkg.browser === 'object' && // eslint-disable-next-line no-prototype-builtins + browserMap.hasOwnProperty(pkg.main)) { + packageInfo.resolvedEntryPoint = browserMap[pkg.main]; + packageInfo.browserMappedMain = true; + } else { + // index.node is technically a valid default entrypoint as well... + packageInfo.resolvedEntryPoint = path.resolve(pkgRoot, pkg.main || 'index.js'); + packageInfo.browserMappedMain = false; + } + + const packageSideEffects = pkg.sideEffects; + + if (typeof packageSideEffects === 'boolean') { + internalPackageInfo.hasModuleSideEffects = () => packageSideEffects; + } else if (Array.isArray(packageSideEffects)) { + internalPackageInfo.hasModuleSideEffects = pluginutils.createFilter(packageSideEffects, null, { + resolve: pkgRoot + }); + } + + cache.set(pkgPath, internalPackageInfo); + return internalPackageInfo; +} +function normalizeInput(input) { + if (Array.isArray(input)) { + return input; + } else if (typeof input === 'object') { + return Object.values(input); + } // otherwise it's a string + + + return [input]; +} // Resolve module specifiers in order. Promise resolves to the first module that resolves +// successfully, or the error that resulted from the last attempted module resolution. + +function resolveImportSpecifiers(importSpecifierList, resolveOptions) { + let promise = Promise.resolve(); + + for (let i = 0; i < importSpecifierList.length; i++) { + promise = promise.then(value => { + // if we've already resolved to something, just return it. + if (value) { + return value; + } + + return resolveId(importSpecifierList[i], resolveOptions).then(result => { + if (!resolveOptions.preserveSymlinks) { + result = fs.realpathSync(result); + } + + return result; + }); + }); + + if (i < importSpecifierList.length - 1) { + // swallow MODULE_NOT_FOUND errors from all but the last resolution + promise = promise.catch(error => { + if (error.code !== 'MODULE_NOT_FOUND') { + throw error; + } + }); + } + } + + return promise; +} + +const builtins = new Set(builtinList); +const ES6_BROWSER_EMPTY = '\0node-resolve:empty.js'; + +const nullFn = () => null; + +const defaults = { + customResolveOptions: {}, + dedupe: [], + // It's important that .mjs is listed before .js so that Rollup will interpret npm modules + // which deploy both ESM .mjs and CommonJS .js files as ESM. + extensions: ['.mjs', '.js', '.json', '.node'], + resolveOnly: [] +}; +const DEFAULTS = deepFreeze(deepMerge({}, defaults)); +function nodeResolve(opts = {}) { + const options = Object.assign({}, defaults, opts); + const customResolveOptions = options.customResolveOptions, + extensions = options.extensions, + jail = options.jail; + const warnings = []; + const packageInfoCache = new Map(); + const idToPackageInfo = new Map(); + const mainFields = getMainFields(options); + const useBrowserOverrides = mainFields.indexOf('browser') !== -1; + const isPreferBuiltinsSet = options.preferBuiltins === true || options.preferBuiltins === false; + const preferBuiltins = isPreferBuiltinsSet ? options.preferBuiltins : true; + const rootDir = options.rootDir || process.cwd(); + let dedupe = options.dedupe; + let rollupOptions; + + if (options.only) { + warnings.push('node-resolve: The `only` options is deprecated, please use `resolveOnly`'); + options.resolveOnly = options.only; + } + + if (typeof dedupe !== 'function') { + dedupe = importee => options.dedupe.includes(importee) || options.dedupe.includes(getPackageName(importee)); + } + + const resolveOnly = options.resolveOnly.map(pattern => { + if (pattern instanceof RegExp) { + return pattern; + } + + const normalized = pattern.replace(/[\\^$*+?.()|[\]{}]/g, '\\$&'); + return new RegExp(`^${normalized}$`); + }); + const browserMapCache = new Map(); + let preserveSymlinks; + return { + name: 'node-resolve', + + buildStart(options) { + rollupOptions = options; + + var _iterator = _createForOfIteratorHelper(warnings), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + const warning = _step.value; + this.warn(warning); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + preserveSymlinks = options.preserveSymlinks; + }, + + generateBundle() { + readCachedFile.clear(); + isFileCached.clear(); + isDirCached.clear(); + }, + + resolveId(importee, importer) { + var _this = this; + + return _asyncToGenerator(function* () { + if (importee === ES6_BROWSER_EMPTY) { + return importee; + } // ignore IDs with null character, these belong to other plugins + + + if (/\0/.test(importee)) return null; // strip hash and query params from import + + const _importee$split = importee.split('#'), + _importee$split2 = _slicedToArray(_importee$split, 2), + withoutHash = _importee$split2[0], + hash = _importee$split2[1]; + + const _withoutHash$split = withoutHash.split('?'), + _withoutHash$split2 = _slicedToArray(_withoutHash$split, 2), + importPath = _withoutHash$split2[0], + params = _withoutHash$split2[1]; + + const importSuffix = `${params ? `?${params}` : ''}${hash ? `#${hash}` : ''}`; + importee = importPath; + const basedir = !importer || dedupe(importee) ? rootDir : path.dirname(importer); // https://github.com/defunctzombie/package-browser-field-spec + + const browser = browserMapCache.get(importer); + + if (useBrowserOverrides && browser) { + const resolvedImportee = path.resolve(basedir, importee); + + if (browser[importee] === false || browser[resolvedImportee] === false) { + return ES6_BROWSER_EMPTY; + } + + const browserImportee = browser[importee] || browser[resolvedImportee] || browser[`${resolvedImportee}.js`] || browser[`${resolvedImportee}.json`]; + + if (browserImportee) { + importee = browserImportee; + } + } + + const parts = importee.split(/[/\\]/); + let id = parts.shift(); + let isRelativeImport = false; + + if (id[0] === '@' && parts.length > 0) { + // scoped packages + id += `/${parts.shift()}`; + } else if (id[0] === '.') { + // an import relative to the parent dir of the importer + id = path.resolve(basedir, importee); + isRelativeImport = true; + } + + if (!isRelativeImport && resolveOnly.length && !resolveOnly.some(pattern => pattern.test(id))) { + if (normalizeInput(rollupOptions.input).includes(importee)) { + return null; + } + + return false; + } + + let hasModuleSideEffects = nullFn; + let hasPackageEntry = true; + let packageBrowserField = false; + let packageInfo; + + const filter = (pkg, pkgPath) => { + const info = getPackageInfo({ + cache: packageInfoCache, + extensions, + pkg, + pkgPath, + mainFields, + preserveSymlinks, + useBrowserOverrides + }); + packageInfo = info.packageInfo; + hasModuleSideEffects = info.hasModuleSideEffects; + hasPackageEntry = info.hasPackageEntry; + packageBrowserField = info.packageBrowserField; + return info.cachedPkg; + }; + + let resolveOptions = { + basedir, + packageFilter: filter, + readFile: readCachedFile, + isFile: isFileCached, + isDirectory: isDirCached, + extensions + }; + + if (preserveSymlinks !== undefined) { + resolveOptions.preserveSymlinks = preserveSymlinks; + } + + const importSpecifierList = []; + + if (importer === undefined && !importee[0].match(/^\.?\.?\//)) { + // For module graph roots (i.e. when importer is undefined), we + // need to handle 'path fragments` like `foo/bar` that are commonly + // found in rollup config files. If importee doesn't look like a + // relative or absolute path, we make it relative and attempt to + // resolve it. If we don't find anything, we try resolving it as we + // got it. + importSpecifierList.push(`./${importee}`); + } + + const importeeIsBuiltin = builtins.has(importee); + + if (importeeIsBuiltin && (!preferBuiltins || !isPreferBuiltinsSet)) { + // The `resolve` library will not resolve packages with the same + // name as a node built-in module. If we're resolving something + // that's a builtin, and we don't prefer to find built-ins, we + // first try to look up a local module with that name. If we don't + // find anything, we resolve the builtin which just returns back + // the built-in's name. + importSpecifierList.push(`${importee}/`); + } // TypeScript files may import '.js' to refer to either '.ts' or '.tsx' + + + if (importer && importee.endsWith('.js')) { + for (var _i = 0, _arr = ['.ts', '.tsx']; _i < _arr.length; _i++) { + const ext = _arr[_i]; + + if (importer.endsWith(ext) && extensions.includes(ext)) { + importSpecifierList.push(importee.replace(/.js$/, ext)); + } + } + } + + importSpecifierList.push(importee); + resolveOptions = Object.assign(resolveOptions, customResolveOptions); + + try { + let resolved = yield resolveImportSpecifiers(importSpecifierList, resolveOptions); + + if (resolved && packageBrowserField) { + if (Object.prototype.hasOwnProperty.call(packageBrowserField, resolved)) { + if (!packageBrowserField[resolved]) { + browserMapCache.set(resolved, packageBrowserField); + return ES6_BROWSER_EMPTY; + } + + resolved = packageBrowserField[resolved]; + } + + browserMapCache.set(resolved, packageBrowserField); + } + + if (hasPackageEntry && !preserveSymlinks && resolved) { + const fileExists = yield exists(resolved); + + if (fileExists) { + resolved = yield realpath(resolved); + } + } + + idToPackageInfo.set(resolved, packageInfo); + + if (hasPackageEntry) { + if (builtins.has(resolved) && preferBuiltins && isPreferBuiltinsSet) { + return null; + } else if (importeeIsBuiltin && preferBuiltins) { + if (!isPreferBuiltinsSet) { + _this.warn(`preferring built-in module '${importee}' over local alternative at '${resolved}', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning`); + } + + return null; + } else if (jail && resolved.indexOf(path.normalize(jail.trim(path.sep))) !== 0) { + return null; + } + } + + if (resolved && options.modulesOnly) { + const code = yield readFile(resolved, 'utf-8'); + + if (isModule(code)) { + return { + id: `${resolved}${importSuffix}`, + moduleSideEffects: hasModuleSideEffects(resolved) + }; + } + + return null; + } + + const result = { + id: `${resolved}${importSuffix}`, + moduleSideEffects: hasModuleSideEffects(resolved) + }; + return result; + } catch (error) { + return null; + } + })(); + }, + + load(importee) { + if (importee === ES6_BROWSER_EMPTY) { + return 'export default {};'; + } + + return null; + }, + + getPackageInfoForId(id) { + return idToPackageInfo.get(id); + } + + }; +} + +exports.DEFAULTS = DEFAULTS; +exports.default = nodeResolve; +exports.nodeResolve = nodeResolve; diff --git a/frontend/node_modules/@rollup/plugin-node-resolve/dist/es/index.js b/frontend/node_modules/@rollup/plugin-node-resolve/dist/es/index.js new file mode 100644 index 0000000000000000000000000000000000000000..be12fe14bb1a07f8b6e1eb8c5e32b018b3e68362 --- /dev/null +++ b/frontend/node_modules/@rollup/plugin-node-resolve/dist/es/index.js @@ -0,0 +1,709 @@ +import { dirname, resolve, extname, normalize, sep } from 'path'; +import builtinList from 'builtin-modules'; +import deepFreeze from 'deep-freeze'; +import deepMerge from 'deepmerge'; +import isModule from 'is-module'; +import fs, { realpathSync } from 'fs'; +import { promisify } from 'util'; +import { createFilter } from '@rollup/pluginutils'; +import resolveModule from 'resolve'; + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + + if (info.done) { + resolve(value); + } else { + Promise.resolve(value).then(_next, _throw); + } +} + +function _asyncToGenerator(fn) { + return function () { + var self = this, + args = arguments; + return new Promise(function (resolve, reject) { + var gen = fn.apply(self, args); + + function _next(value) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); + } + + function _throw(err) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); + } + + _next(undefined); + }); + }; +} + +function _slicedToArray(arr, i) { + return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); +} + +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} + +function _iterableToArrayLimit(arr, i) { + if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; +} + +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(n); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); +} + +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + + return arr2; +} + +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} + +function _createForOfIteratorHelper(o) { + if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { + if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { + var i = 0; + + var F = function () {}; + + return { + s: F, + n: function () { + if (i >= o.length) return { + done: true + }; + return { + done: false, + value: o[i++] + }; + }, + e: function (e) { + throw e; + }, + f: F + }; + } + + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + + var it, + normalCompletion = true, + didErr = false, + err; + return { + s: function () { + it = o[Symbol.iterator](); + }, + n: function () { + var step = it.next(); + normalCompletion = step.done; + return step; + }, + e: function (e) { + didErr = true; + err = e; + }, + f: function () { + try { + if (!normalCompletion && it.return != null) it.return(); + } finally { + if (didErr) throw err; + } + } + }; +} + +const exists = promisify(fs.exists); +const readFile = promisify(fs.readFile); +const realpath = promisify(fs.realpath); +const stat = promisify(fs.stat); + +const onError = error => { + if (error.code === 'ENOENT') { + return false; + } + + throw error; +}; + +const makeCache = fn => { + const cache = new Map(); + + const wrapped = /*#__PURE__*/function () { + var _ref = _asyncToGenerator(function* (param, done) { + if (cache.has(param) === false) { + cache.set(param, fn(param).catch(err => { + cache.delete(param); + throw err; + })); + } + + try { + const result = cache.get(param); + const value = yield result; + return done(null, value); + } catch (error) { + return done(error); + } + }); + + return function wrapped(_x, _x2) { + return _ref.apply(this, arguments); + }; + }(); + + wrapped.clear = () => cache.clear(); + + return wrapped; +}; + +const isDirCached = makeCache( /*#__PURE__*/function () { + var _ref2 = _asyncToGenerator(function* (file) { + try { + const stats = yield stat(file); + return stats.isDirectory(); + } catch (error) { + return onError(error); + } + }); + + return function (_x3) { + return _ref2.apply(this, arguments); + }; +}()); +const isFileCached = makeCache( /*#__PURE__*/function () { + var _ref3 = _asyncToGenerator(function* (file) { + try { + const stats = yield stat(file); + return stats.isFile(); + } catch (error) { + return onError(error); + } + }); + + return function (_x4) { + return _ref3.apply(this, arguments); + }; +}()); +const readCachedFile = makeCache(readFile); + +const resolveId = promisify(resolveModule); // returns the imported package name for bare module imports + +function getPackageName(id) { + if (id.startsWith('.') || id.startsWith('/')) { + return null; + } + + const split = id.split('/'); // @my-scope/my-package/foo.js -> @my-scope/my-package + // @my-scope/my-package -> @my-scope/my-package + + if (split[0][0] === '@') { + return `${split[0]}/${split[1]}`; + } // my-package/foo.js -> my-package + // my-package -> my-package + + + return split[0]; +} +function getMainFields(options) { + let mainFields; + + if (options.mainFields) { + mainFields = options.mainFields; + } else { + mainFields = ['module', 'main']; + } + + if (options.browser && mainFields.indexOf('browser') === -1) { + return ['browser'].concat(mainFields); + } + + if (!mainFields.length) { + throw new Error('Please ensure at least one `mainFields` value is specified'); + } + + return mainFields; +} +function getPackageInfo(options) { + const cache = options.cache, + extensions = options.extensions, + pkg = options.pkg, + mainFields = options.mainFields, + preserveSymlinks = options.preserveSymlinks, + useBrowserOverrides = options.useBrowserOverrides; + let pkgPath = options.pkgPath; + + if (cache.has(pkgPath)) { + return cache.get(pkgPath); + } // browserify/resolve doesn't realpath paths returned in its packageFilter callback + + + if (!preserveSymlinks) { + pkgPath = realpathSync(pkgPath); + } + + const pkgRoot = dirname(pkgPath); + const packageInfo = { + // copy as we are about to munge the `main` field of `pkg`. + packageJson: Object.assign({}, pkg), + // path to package.json file + packageJsonPath: pkgPath, + // directory containing the package.json + root: pkgRoot, + // which main field was used during resolution of this module (main, module, or browser) + resolvedMainField: 'main', + // whether the browser map was used to resolve the entry point to this module + browserMappedMain: false, + // the entry point of the module with respect to the selected main field and any + // relevant browser mappings. + resolvedEntryPoint: '' + }; + let overriddenMain = false; + + for (let i = 0; i < mainFields.length; i++) { + const field = mainFields[i]; + + if (typeof pkg[field] === 'string') { + pkg.main = pkg[field]; + packageInfo.resolvedMainField = field; + overriddenMain = true; + break; + } + } + + const internalPackageInfo = { + cachedPkg: pkg, + hasModuleSideEffects: () => null, + hasPackageEntry: overriddenMain !== false || mainFields.indexOf('main') !== -1, + packageBrowserField: useBrowserOverrides && typeof pkg.browser === 'object' && Object.keys(pkg.browser).reduce((browser, key) => { + let resolved = pkg.browser[key]; + + if (resolved && resolved[0] === '.') { + resolved = resolve(pkgRoot, resolved); + } + /* eslint-disable no-param-reassign */ + + + browser[key] = resolved; + + if (key[0] === '.') { + const absoluteKey = resolve(pkgRoot, key); + browser[absoluteKey] = resolved; + + if (!extname(key)) { + extensions.reduce((subBrowser, ext) => { + subBrowser[absoluteKey + ext] = subBrowser[key]; + return subBrowser; + }, browser); + } + } + + return browser; + }, {}), + packageInfo + }; + const browserMap = internalPackageInfo.packageBrowserField; + + if (useBrowserOverrides && typeof pkg.browser === 'object' && // eslint-disable-next-line no-prototype-builtins + browserMap.hasOwnProperty(pkg.main)) { + packageInfo.resolvedEntryPoint = browserMap[pkg.main]; + packageInfo.browserMappedMain = true; + } else { + // index.node is technically a valid default entrypoint as well... + packageInfo.resolvedEntryPoint = resolve(pkgRoot, pkg.main || 'index.js'); + packageInfo.browserMappedMain = false; + } + + const packageSideEffects = pkg.sideEffects; + + if (typeof packageSideEffects === 'boolean') { + internalPackageInfo.hasModuleSideEffects = () => packageSideEffects; + } else if (Array.isArray(packageSideEffects)) { + internalPackageInfo.hasModuleSideEffects = createFilter(packageSideEffects, null, { + resolve: pkgRoot + }); + } + + cache.set(pkgPath, internalPackageInfo); + return internalPackageInfo; +} +function normalizeInput(input) { + if (Array.isArray(input)) { + return input; + } else if (typeof input === 'object') { + return Object.values(input); + } // otherwise it's a string + + + return [input]; +} // Resolve module specifiers in order. Promise resolves to the first module that resolves +// successfully, or the error that resulted from the last attempted module resolution. + +function resolveImportSpecifiers(importSpecifierList, resolveOptions) { + let promise = Promise.resolve(); + + for (let i = 0; i < importSpecifierList.length; i++) { + promise = promise.then(value => { + // if we've already resolved to something, just return it. + if (value) { + return value; + } + + return resolveId(importSpecifierList[i], resolveOptions).then(result => { + if (!resolveOptions.preserveSymlinks) { + result = realpathSync(result); + } + + return result; + }); + }); + + if (i < importSpecifierList.length - 1) { + // swallow MODULE_NOT_FOUND errors from all but the last resolution + promise = promise.catch(error => { + if (error.code !== 'MODULE_NOT_FOUND') { + throw error; + } + }); + } + } + + return promise; +} + +const builtins = new Set(builtinList); +const ES6_BROWSER_EMPTY = '\0node-resolve:empty.js'; + +const nullFn = () => null; + +const defaults = { + customResolveOptions: {}, + dedupe: [], + // It's important that .mjs is listed before .js so that Rollup will interpret npm modules + // which deploy both ESM .mjs and CommonJS .js files as ESM. + extensions: ['.mjs', '.js', '.json', '.node'], + resolveOnly: [] +}; +const DEFAULTS = deepFreeze(deepMerge({}, defaults)); +function nodeResolve(opts = {}) { + const options = Object.assign({}, defaults, opts); + const customResolveOptions = options.customResolveOptions, + extensions = options.extensions, + jail = options.jail; + const warnings = []; + const packageInfoCache = new Map(); + const idToPackageInfo = new Map(); + const mainFields = getMainFields(options); + const useBrowserOverrides = mainFields.indexOf('browser') !== -1; + const isPreferBuiltinsSet = options.preferBuiltins === true || options.preferBuiltins === false; + const preferBuiltins = isPreferBuiltinsSet ? options.preferBuiltins : true; + const rootDir = options.rootDir || process.cwd(); + let dedupe = options.dedupe; + let rollupOptions; + + if (options.only) { + warnings.push('node-resolve: The `only` options is deprecated, please use `resolveOnly`'); + options.resolveOnly = options.only; + } + + if (typeof dedupe !== 'function') { + dedupe = importee => options.dedupe.includes(importee) || options.dedupe.includes(getPackageName(importee)); + } + + const resolveOnly = options.resolveOnly.map(pattern => { + if (pattern instanceof RegExp) { + return pattern; + } + + const normalized = pattern.replace(/[\\^$*+?.()|[\]{}]/g, '\\$&'); + return new RegExp(`^${normalized}$`); + }); + const browserMapCache = new Map(); + let preserveSymlinks; + return { + name: 'node-resolve', + + buildStart(options) { + rollupOptions = options; + + var _iterator = _createForOfIteratorHelper(warnings), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + const warning = _step.value; + this.warn(warning); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + preserveSymlinks = options.preserveSymlinks; + }, + + generateBundle() { + readCachedFile.clear(); + isFileCached.clear(); + isDirCached.clear(); + }, + + resolveId(importee, importer) { + var _this = this; + + return _asyncToGenerator(function* () { + if (importee === ES6_BROWSER_EMPTY) { + return importee; + } // ignore IDs with null character, these belong to other plugins + + + if (/\0/.test(importee)) return null; // strip hash and query params from import + + const _importee$split = importee.split('#'), + _importee$split2 = _slicedToArray(_importee$split, 2), + withoutHash = _importee$split2[0], + hash = _importee$split2[1]; + + const _withoutHash$split = withoutHash.split('?'), + _withoutHash$split2 = _slicedToArray(_withoutHash$split, 2), + importPath = _withoutHash$split2[0], + params = _withoutHash$split2[1]; + + const importSuffix = `${params ? `?${params}` : ''}${hash ? `#${hash}` : ''}`; + importee = importPath; + const basedir = !importer || dedupe(importee) ? rootDir : dirname(importer); // https://github.com/defunctzombie/package-browser-field-spec + + const browser = browserMapCache.get(importer); + + if (useBrowserOverrides && browser) { + const resolvedImportee = resolve(basedir, importee); + + if (browser[importee] === false || browser[resolvedImportee] === false) { + return ES6_BROWSER_EMPTY; + } + + const browserImportee = browser[importee] || browser[resolvedImportee] || browser[`${resolvedImportee}.js`] || browser[`${resolvedImportee}.json`]; + + if (browserImportee) { + importee = browserImportee; + } + } + + const parts = importee.split(/[/\\]/); + let id = parts.shift(); + let isRelativeImport = false; + + if (id[0] === '@' && parts.length > 0) { + // scoped packages + id += `/${parts.shift()}`; + } else if (id[0] === '.') { + // an import relative to the parent dir of the importer + id = resolve(basedir, importee); + isRelativeImport = true; + } + + if (!isRelativeImport && resolveOnly.length && !resolveOnly.some(pattern => pattern.test(id))) { + if (normalizeInput(rollupOptions.input).includes(importee)) { + return null; + } + + return false; + } + + let hasModuleSideEffects = nullFn; + let hasPackageEntry = true; + let packageBrowserField = false; + let packageInfo; + + const filter = (pkg, pkgPath) => { + const info = getPackageInfo({ + cache: packageInfoCache, + extensions, + pkg, + pkgPath, + mainFields, + preserveSymlinks, + useBrowserOverrides + }); + packageInfo = info.packageInfo; + hasModuleSideEffects = info.hasModuleSideEffects; + hasPackageEntry = info.hasPackageEntry; + packageBrowserField = info.packageBrowserField; + return info.cachedPkg; + }; + + let resolveOptions = { + basedir, + packageFilter: filter, + readFile: readCachedFile, + isFile: isFileCached, + isDirectory: isDirCached, + extensions + }; + + if (preserveSymlinks !== undefined) { + resolveOptions.preserveSymlinks = preserveSymlinks; + } + + const importSpecifierList = []; + + if (importer === undefined && !importee[0].match(/^\.?\.?\//)) { + // For module graph roots (i.e. when importer is undefined), we + // need to handle 'path fragments` like `foo/bar` that are commonly + // found in rollup config files. If importee doesn't look like a + // relative or absolute path, we make it relative and attempt to + // resolve it. If we don't find anything, we try resolving it as we + // got it. + importSpecifierList.push(`./${importee}`); + } + + const importeeIsBuiltin = builtins.has(importee); + + if (importeeIsBuiltin && (!preferBuiltins || !isPreferBuiltinsSet)) { + // The `resolve` library will not resolve packages with the same + // name as a node built-in module. If we're resolving something + // that's a builtin, and we don't prefer to find built-ins, we + // first try to look up a local module with that name. If we don't + // find anything, we resolve the builtin which just returns back + // the built-in's name. + importSpecifierList.push(`${importee}/`); + } // TypeScript files may import '.js' to refer to either '.ts' or '.tsx' + + + if (importer && importee.endsWith('.js')) { + for (var _i = 0, _arr = ['.ts', '.tsx']; _i < _arr.length; _i++) { + const ext = _arr[_i]; + + if (importer.endsWith(ext) && extensions.includes(ext)) { + importSpecifierList.push(importee.replace(/.js$/, ext)); + } + } + } + + importSpecifierList.push(importee); + resolveOptions = Object.assign(resolveOptions, customResolveOptions); + + try { + let resolved = yield resolveImportSpecifiers(importSpecifierList, resolveOptions); + + if (resolved && packageBrowserField) { + if (Object.prototype.hasOwnProperty.call(packageBrowserField, resolved)) { + if (!packageBrowserField[resolved]) { + browserMapCache.set(resolved, packageBrowserField); + return ES6_BROWSER_EMPTY; + } + + resolved = packageBrowserField[resolved]; + } + + browserMapCache.set(resolved, packageBrowserField); + } + + if (hasPackageEntry && !preserveSymlinks && resolved) { + const fileExists = yield exists(resolved); + + if (fileExists) { + resolved = yield realpath(resolved); + } + } + + idToPackageInfo.set(resolved, packageInfo); + + if (hasPackageEntry) { + if (builtins.has(resolved) && preferBuiltins && isPreferBuiltinsSet) { + return null; + } else if (importeeIsBuiltin && preferBuiltins) { + if (!isPreferBuiltinsSet) { + _this.warn(`preferring built-in module '${importee}' over local alternative at '${resolved}', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning`); + } + + return null; + } else if (jail && resolved.indexOf(normalize(jail.trim(sep))) !== 0) { + return null; + } + } + + if (resolved && options.modulesOnly) { + const code = yield readFile(resolved, 'utf-8'); + + if (isModule(code)) { + return { + id: `${resolved}${importSuffix}`, + moduleSideEffects: hasModuleSideEffects(resolved) + }; + } + + return null; + } + + const result = { + id: `${resolved}${importSuffix}`, + moduleSideEffects: hasModuleSideEffects(resolved) + }; + return result; + } catch (error) { + return null; + } + })(); + }, + + load(importee) { + if (importee === ES6_BROWSER_EMPTY) { + return 'export default {};'; + } + + return null; + }, + + getPackageInfoForId(id) { + return idToPackageInfo.get(id); + } + + }; +} + +export default nodeResolve; +export { DEFAULTS, nodeResolve }; diff --git a/frontend/node_modules/@rollup/plugin-node-resolve/dist/es/package.json b/frontend/node_modules/@rollup/plugin-node-resolve/dist/es/package.json new file mode 100644 index 0000000000000000000000000000000000000000..7c34deb5837d8d5e168b54f95f7872b2c50eca13 --- /dev/null +++ b/frontend/node_modules/@rollup/plugin-node-resolve/dist/es/package.json @@ -0,0 +1 @@ +{"type":"module"} \ No newline at end of file diff --git a/frontend/node_modules/@rollup/plugin-node-resolve/package.json b/frontend/node_modules/@rollup/plugin-node-resolve/package.json new file mode 100644 index 0000000000000000000000000000000000000000..3e6f4fed6c7910f7ee68a899ce692ce1de57a251 --- /dev/null +++ b/frontend/node_modules/@rollup/plugin-node-resolve/package.json @@ -0,0 +1,86 @@ +{ + "name": "@rollup/plugin-node-resolve", + "version": "8.4.0", + "publishConfig": { + "access": "public" + }, + "description": "Locate and bundle third-party dependencies in node_modules", + "license": "MIT", + "repository": "rollup/plugins", + "author": "Rich Harris ", + "homepage": "https://github.com/rollup/plugins/tree/master/packages/node-resolve/#readme", + "bugs": "https://github.com/rollup/plugins/issues", + "main": "./dist/cjs/index.js", + "engines": { + "node": ">= 8.0.0" + }, + "scripts": { + "build": "rollup -c", + "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov", + "ci:lint": "pnpm run build && pnpm run lint", + "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", + "ci:test": "pnpm run test -- --verbose && pnpm run test:ts", + "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", + "lint:docs": "prettier --single-quote --write README.md", + "lint:js": "eslint --fix --cache src test types --ext .js,.ts", + "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", + "prebuild": "del-cli dist", + "prepare": "pnpm run build", + "prepublishOnly": "pnpm run lint && pnpm run test && pnpm run test:ts", + "pretest": "pnpm run build", + "test": "ava", + "test:ts": "tsc types/index.d.ts test/types.ts --noEmit" + }, + "files": [ + "dist", + "types", + "README.md", + "LICENSE" + ], + "keywords": [ + "rollup", + "plugin", + "es2015", + "npm", + "modules" + ], + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0" + }, + "dependencies": { + "@rollup/pluginutils": "^3.1.0", + "@types/resolve": "1.17.1", + "builtin-modules": "^3.1.0", + "deep-freeze": "^0.0.1", + "deepmerge": "^4.2.2", + "is-module": "^1.0.0", + "resolve": "^1.17.0" + }, + "devDependencies": { + "@babel/core": "^7.10.4", + "@babel/plugin-transform-typescript": "^7.10.4", + "@babel/preset-env": "^7.10.4", + "@rollup/plugin-babel": "^5.0.4", + "@rollup/plugin-commonjs": "^13.0.0", + "@rollup/plugin-json": "^4.1.0", + "es5-ext": "^0.10.53", + "rollup": "^2.12.0", + "source-map": "^0.7.3", + "string-capitalize": "^1.0.1" + }, + "ava": { + "files": [ + "!**/fixtures/**", + "!**/helpers/**", + "!**/recipes/**", + "!**/types.ts" + ] + }, + "exports": { + "require": "./dist/cjs/index.js", + "import": "./dist/es/index.js" + }, + "module": "./dist/es/index.js", + "type": "commonjs", + "types": "types/index.d.ts" +} diff --git a/frontend/node_modules/@rollup/plugin-node-resolve/types/index.d.ts b/frontend/node_modules/@rollup/plugin-node-resolve/types/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d2fed0f77621359a0b438d348b10cc1fc62264ad --- /dev/null +++ b/frontend/node_modules/@rollup/plugin-node-resolve/types/index.d.ts @@ -0,0 +1,92 @@ +import { Plugin } from 'rollup'; +import { AsyncOpts } from 'resolve'; + +export const DEFAULTS: { + customResolveOptions: {}; + dedupe: []; + extensions: ['.mjs', '.js', '.json', '.node']; + resolveOnly: []; +}; + +export interface RollupNodeResolveOptions { + /** + * If `true`, instructs the plugin to use the `"browser"` property in `package.json` + * files to specify alternative files to load for bundling. This is useful when + * bundling for a browser environment. Alternatively, a value of `'browser'` can be + * added to the `mainFields` option. If `false`, any `"browser"` properties in + * package files will be ignored. This option takes precedence over `mainFields`. + * @default false + */ + browser?: boolean; + + /** + * An `Object` that specifies additional options that should be passed through to `node-resolve`. + */ + customResolveOptions?: AsyncOpts; + + /** + * An `Array` of modules names, which instructs the plugin to force resolving for the + * specified modules to the root `node_modules`. Helps to prevent bundling the same + * package multiple times if package is imported from dependencies. + */ + dedupe?: string[] | ((importee: string) => boolean); + + /** + * Specifies the extensions of files that the plugin will operate on. + * @default [ '.mjs', '.js', '.json', '.node' ] + */ + extensions?: readonly string[]; + + /** + * Locks the module search within specified path (e.g. chroot). Modules defined + * outside this path will be marked as external. + * @default '/' + */ + jail?: string; + + /** + * Specifies the properties to scan within a `package.json`, used to determine the + * bundle entry point. + * @default ['module', 'main'] + */ + mainFields?: readonly string[]; + + /** + * If `true`, inspect resolved files to assert that they are ES2015 modules. + * @default false + */ + modulesOnly?: boolean; + + /** + * @deprecated use "resolveOnly" instead + * @default null + */ + only?: ReadonlyArray | null; + + /** + * If `true`, the plugin will prefer built-in modules (e.g. `fs`, `path`). If `false`, + * the plugin will look for locally installed modules of the same name. + * @default true + */ + preferBuiltins?: boolean; + + /** + * An `Array` which instructs the plugin to limit module resolution to those whose + * names match patterns in the array. + * @default [] + */ + resolveOnly?: ReadonlyArray | null; + + /** + * Specifies the root directory from which to resolve modules. Typically used when + * resolving entry-point imports, and when resolving deduplicated modules. + * @default process.cwd() + */ + rootDir?: string; +} + +/** + * Locate modules using the Node resolution algorithm, for using third party modules in node_modules + */ +export function nodeResolve(options?: RollupNodeResolveOptions): Plugin; +export default nodeResolve; diff --git a/frontend/node_modules/@rollup/plugin-typescript/CHANGELOG.md b/frontend/node_modules/@rollup/plugin-typescript/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..275972f05a1e5149a755f50bbd8d998ba20da207 --- /dev/null +++ b/frontend/node_modules/@rollup/plugin-typescript/CHANGELOG.md @@ -0,0 +1,220 @@ +# @rollup/plugin-typescript ChangeLog + +## v4.1.2 + +_2020-05-20_ + +### Bugfixes + +- fix: memory leak. fixes #322 (#352) + +### Updates + +- docs: update readme examples (#391) +- docs: update link to @rollup/plugin-babel in README.md (#372) + +## v4.1.1 + +_2020-04-12_ + +### Bugfixes + +- fix: sourcemap generated as null (#276) +- fix: use parsedOptions.fileNames for emit declaration files (#270) (#271) + +## v4.1.0 + +_2020-04-12_ + +### Features + +- feat: Refine options interface (#284) + +## v4.0.0 + +### Bugfixes + +- fix: Use builtin extends resolution (#199) + +### Features + +- feat: Move to BuilderProgram API (#217) + +### Breaking Changes + +Please see https://github.com/rollup/plugins/pull/217 for more information. + +## v3.1.0 + +_2020-03-05_ + +_Note: This was a bad release due to breaking changes. v3.1.1 has been published to revert the latest 3.x.x version to a non-breaking state. For the changes in this erroneous version, please use v4.0.0._ + +### Updates + +- test: Add preserveModules test (#234) +- chore: refactor compiler host (#214) +- test: Add test for optional chaining (#207) +- chore: Use typechecking (4bb8753) + +## v3.0.0 + +_2020-01-27_ + +### Breaking Changes + +- feat: Add typechecking! (#177) + +### Bugfixes + +- fix: extended config file path (#157) + +### Updates + +- core: Add note about old behaviour (#181) +- chore: Always use ParsedCommandLine (#162) +- chore: update devDeps (96c45ff) +- chore: Remove resolveHost (#148) + +## v2.1.0 + +_2020-01-07_ + +### Features + +- feat: Warning objects for type errors (#144) +- feat: Find tslib asynchronously (#131) + +### Updates + +- chore: Use ts.findConfigFile helper (#145) + +## v2.0.2 + +_2020-01-04_ + +### Bugfixes + +- fix: Use this.warn for ts errors (#129) + +### Updates + +- refactor: use typescript in typescript plugin (#122) +- chore: update changelog (b723f92) +- chore: misc linting updates (4de10f0) + +## 2.0.1 + +_2019-12-04_ + +- fix(typescript): import from scoped utils (#78) + +## 2.0.0 + +_2019-11-25_ + +- **Breaking:** Minimum compatible Rollup version is 1.20.0 +- **Breaking:** Minimum supported Node version is 8.0.0 +- Published as @rollup/plugin-typescript + +## 1.0.1 + +_2019-03-24_ + +- Update dependencies ([#136](https://github.com/rollup/rollup-plugin-typescript/issues/136)) + +## 1.0.0 + +_2018-09-16_ + +- Major update for TypeScript 2/3, Rollup 1 compatibility, lots of fixes ([#124](https://github.com/rollup/rollup-plugin-typescript/issues/124)) +- Require TypeScript as peer dependency ([#121](https://github.com/rollup/rollup-plugin-typescript/issues/121)) +- Also test on Node 10 ([#119](https://github.com/rollup/rollup-plugin-typescript/issues/119)) +- Fix example in readme ([#98](https://github.com/rollup/rollup-plugin-typescript/issues/98)) + +## 0.8.1 + +- Ignore typescript-helpers in source maps ([#61](https://github.com/rollup/rollup-plugin-typescript/issues/61)) + +## 0.8.0 + +- Fix the rollup breaking change with paths ([#52](https://github.com/rollup/rollup-plugin-typescript/issues/52)) +- Don't fail without source maps ([#57](https://github.com/rollup/rollup-plugin-typescript/pull/57)) + +## 0.7.7 + +- Add missing `__assign` helper ([#49](https://github.com/rollup/rollup-plugin-typescript/issues/49)) + +## 0.7.6 + +- Ignore the `declaration` option ([#45](https://github.com/rollup/rollup-plugin-typescript/issues/45)) +- Disable `strictNullChecks` with a warning for TypeScript versions that don't support it ([#46](https://github.com/rollup/rollup-plugin-typescript/issues/46)) + +## 0.7.5 + +- Ensure NPM doesn't ignore typescript-helpers + +## 0.7.4 + +- Resolve typescript-helpers to a file in the filesystem. + +## 0.7.3 + +- Update Tippex to ^2.1.1 + +## 0.7.2 + +- Don't error if both `sourceMap` and `inlineSourceMap` are specified + +## 0.7.1 + +- No plugin specific options should be forwarded to TypeScript + +## 0.7.0 + +- Use `compilerOptions` from `tsconfig.json` if found ([#39](https://github.com/rollup/rollup-plugin-typescript/pull/32)) + +## 0.6.1 + +- Upgrade Tippex to ^2.1.0 +- Upgrade TypeScript to ^1.8.9 + +## 0.6.0 + +- Upgrade to TypeScript ^1.8.7 +- Update `__awaiter` helper to support TypeScript 1.8.x ([#32](https://github.com/rollup/rollup-plugin-typescript/pull/32)) +- Update `ts.nodeModuleNameResolver` to support both 1.7.x and 1.8.x ([#31](https://github.com/rollup/rollup-plugin-typescript/issues/31)) + +## 0.5.0 + +- Do not duplicate TypeScript's helpers ([#24](https://github.com/rollup/rollup-plugin-typescript/issues/24)) +- Handle `export abstract class` ([#23](https://github.com/rollup/rollup-plugin-typescript/issues/23)) + +## 0.4.1 + +- Does not attempt resolve or transform `.d.ts` files ([#22](https://github.com/rollup/rollup-plugin-typescript/pull/22)) + +## 0.4.0 + +- Work around TypeScript 1.7.5's transpilation issues ([#9](https://github.com/rollup/rollup-plugin-typescript/issues/9)) +- Overridable TypeScript version when transpiling ([#4](https://github.com/rollup/rollup-plugin-typescript/issues/4)) +- Add `jsx` support ([#11](https://github.com/rollup/rollup-plugin-typescript/issues/11)) + +## 0.3.0 + +- Author plugin in TypeScript +- Report diagnostics +- Resolve identifiers using `ts.nodeModuleNameResolver` + +## 0.2.1 + +- Upgrade to TypeScript ^1.7.5 +- Enable source maps per default + +## 0.2.0 + +- Use (_prerelease version of_) TypeScript 1.7.0 to generate ES5 while preserving ES2015 imports for efficient bundling. + +## 0.1.0 + +- Initial release diff --git a/frontend/node_modules/@rollup/plugin-typescript/LICENSE b/frontend/node_modules/@rollup/plugin-typescript/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..5e46702cbdea74f8a8139094f5a1ff1f0e486f45 --- /dev/null +++ b/frontend/node_modules/@rollup/plugin-typescript/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/contributors) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/frontend/node_modules/@rollup/plugin-typescript/README.md b/frontend/node_modules/@rollup/plugin-typescript/README.md new file mode 100644 index 0000000000000000000000000000000000000000..feb219ce36b7eb009f1d4cdcf9cb1b7f627b16df --- /dev/null +++ b/frontend/node_modules/@rollup/plugin-typescript/README.md @@ -0,0 +1,195 @@ +[npm]: https://img.shields.io/npm/v/@rollup/plugin-typescript +[npm-url]: https://www.npmjs.com/package/@rollup/plugin-typescript +[size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-typescript +[size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-typescript + +[![npm][npm]][npm-url] +[![size][size]][size-url] +[![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com) + +# @rollup/plugin-typescript + +🍣 A Rollup plugin for seamless integration between Rollup and Typescript. + +## Requirements + +This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+. Due to the use of `tslib` to inject helpers, this plugin requires at least [TypeScript 2.1](https://github.com/Microsoft/TypeScript/wiki/Roadmap#21-december-2016). See also [here](https://blog.mariusschulz.com/2016/12/16/typescript-2-1-external-helpers-library#the-importhelpers-flag-and-tslib). + +## Install + +Using npm: + +```console +npm install @rollup/plugin-typescript --save-dev +``` + +Note that both `typescript` and `tslib` are peer dependencies of this plugin that need to be installed separately. + +## Why? + +See [@rollup/plugin-babel](https://github.com/rollup/plugins/tree/master/packages/babel). + +## Usage + +Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin: + +```js +// rollup.config.js +import typescript from '@rollup/plugin-typescript'; + +export default { + input: 'src/index.ts', + output: { + dir: 'output', + format: 'cjs' + }, + plugins: [typescript()] +}; +``` + +Then call `rollup` either via the [CLI](https://www.rollupjs.org/guide/en/#command-line-reference) or the [API](https://www.rollupjs.org/guide/en/#javascript-api). + +## Options + +The plugin loads any [`compilerOptions`](http://www.typescriptlang.org/docs/handbook/compiler-options.html) from the `tsconfig.json` file by default. Passing options to the plugin directly overrides those options: + +```js +... +export default { + input: './main.ts', + plugins: [ + typescript({lib: ["es5", "es6", "dom"], target: "es5"}) + ] +} +``` + +The following options are unique to `rollup-plugin-typescript`: + +### `exclude` + +Type: `String` | `Array[...String]`
+Default: `null` + +A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should _ignore_. By default no files are ignored. + +### `include` + +Type: `String` | `Array[...String]`
+Default: `null` + +A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default all `.ts` and `.tsx` files are targeted. + +### `tsconfig` + +Type: `String` | `Boolean`
+Default: `true` + +When set to false, ignores any options specified in the config file. If set to a string that corresponds to a file path, the specified file will be used as config file. + +### `typescript` + +Type: `import('typescript')`
+Default: _peer dependency_ + +Overrides the TypeScript module used for transpilation. + +```js +typescript({ + typescript: require('some-fork-of-typescript') +}); +``` + +### `tslib` + +Type: `String`
+Default: _peer dependency_ + +Overrides the injected TypeScript helpers with a custom version. + +```js +typescript({ + tslib: require.resolve('some-fork-of-tslib') +}); +``` + +### Typescript compiler options + +Some of Typescript's [CompilerOptions](https://www.typescriptlang.org/docs/handbook/compiler-options.html) affect how Rollup builds files. + +#### `noEmitOnError` + +Type: `Boolean`
+Default: `true` + +If a type error is detected, the Rollup build is aborted when this option is set to true. + +#### `files`, `include`, `exclude` + +Type: `Array[...String]`
+Default: `[]` + +Declaration files are automatically included if they are listed in the `files` field in your `tsconfig.json` file. Source files in these fields are ignored as Rollup's configuration is used instead. + +#### Ignored options + +These compiler options are ignored by Rollup: + +- `noEmitHelpers`, `importHelpers`: The `tslib` helper module always must be used. +- `noEmit`, `emitDeclarationOnly`: Typescript needs to emit code for the plugin to work with. +- `noResolve`: Preventing Typescript from resolving code may break compilation + +### Importing CommonJS + +Though it is not recommended, it is possible to configure this plugin to handle imports of CommonJS files from TypeScript. For this, you need to specify `CommonJS` as the module format and add `rollup-plugin-commonjs` to transpile the CommonJS output generated by TypeScript to ES Modules so that rollup can process it. + +```js +// rollup.config.js +import typescript from '@rollup/plugin-typescript'; +import commonjs from '@rollup/plugin-commonjs'; + +export default { + input: './main.ts', + plugins: [ + typescript({ module: 'CommonJS' }), + commonjs({ extensions: ['.js', '.ts'] }) // the ".ts" extension is required + ] +}; +``` + +Note that this will often result in less optimal output. + +### Preserving JSX output + +Whenever choosing to preserve JSX output to be further consumed by another transform step via `tsconfig` `compilerOptions` by setting `jsx: 'preserve'` or [overriding options](#options), please bear in mind that, by itself, this plugin won't be able to preserve JSX output, usually failing with: + +```sh +[!] Error: Unexpected token (Note that you need plugins to import files that are not JavaScript) +file.tsx (1:15) +1: export default Foobar + ^ +``` + +To prevent that, make sure to use the acorn plugin, namely `acorn-jsx`, which will make Rollup's parser acorn handle JSX tokens. (See https://rollupjs.org/guide/en/#acorninjectplugins) + +After adding `acorn-jsx` plugin, your Rollup config would look like the following, correctly preserving your JSX output. + +```js +import jsx from 'acorn-jsx'; +import typescript from '@rollup/plugin-typescript'; + +export default { + // … other options … + acornInjectPlugins: [jsx()], + plugins: [typescript({ jsx: 'preserve' })] +}; +``` + +### Faster compiling + +Previous versions of this plugin used Typescript's `transpileModule` API, which is faster but does not perform typechecking and does not support cross-file features like `const enum`s and emit-less types. If you want this behaviour, you can use [@rollup/plugin-sucrase](https://github.com/rollup/plugins/tree/master/packages/sucrase) instead. + +## Meta + +[CONTRIBUTING](/.github/CONTRIBUTING.md) + +[LICENSE (MIT)](/LICENSE) diff --git a/frontend/node_modules/@rollup/plugin-typescript/dist/index.es.js b/frontend/node_modules/@rollup/plugin-typescript/dist/index.es.js new file mode 100644 index 0000000000000000000000000000000000000000..7e6704fd2662f54efd495d2103ff43464a780a5b --- /dev/null +++ b/frontend/node_modules/@rollup/plugin-typescript/dist/index.es.js @@ -0,0 +1,538 @@ +import { resolve, dirname, relative, win32, posix } from 'path'; +import { createFilter } from '@rollup/pluginutils'; +import * as defaultTs from 'typescript'; +import resolveId from 'resolve'; +import { readFileSync } from 'fs'; + +/** + * Create a format diagnostics host to use with the Typescript type checking APIs. + * Typescript hosts are used to represent the user's system, + * with an API for checking case sensitivity etc. + * @param compilerOptions Typescript compiler options. Affects functions such as `getNewLine`. + * @see https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API + */ +function createFormattingHost(ts, compilerOptions) { + return { + /** Returns the compiler options for the project. */ + getCompilationSettings: () => compilerOptions, + /** Returns the current working directory. */ + getCurrentDirectory: () => process.cwd(), + /** Returns the string that corresponds with the selected `NewLineKind`. */ + getNewLine() { + switch (compilerOptions.newLine) { + case ts.NewLineKind.CarriageReturnLineFeed: + return '\r\n'; + case ts.NewLineKind.LineFeed: + return '\n'; + default: + return ts.sys.newLine; + } + }, + /** Returns a lower case name on case insensitive systems, otherwise the original name. */ + getCanonicalFileName: (fileName) => ts.sys.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase() + }; +} + +/** + * Create a helper for resolving modules using Typescript. + * @param host Typescript host that extends `ModuleResolutionHost` + * with methods for sanitizing filenames and getting compiler options. + */ +function createModuleResolver(ts, host) { + const compilerOptions = host.getCompilationSettings(); + const cache = ts.createModuleResolutionCache(process.cwd(), host.getCanonicalFileName, compilerOptions); + const moduleHost = Object.assign(Object.assign({}, ts.sys), host); + return (moduleName, containingFile) => { + const resolved = ts.nodeModuleNameResolver(moduleName, containingFile, compilerOptions, moduleHost, cache); + return resolved.resolvedModule; + }; +} + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +const resolveIdAsync = (file, opts) => new Promise((fulfil, reject) => resolveId(file, opts, (err, contents) => (err ? reject(err) : fulfil(contents)))); +/** + * Returns code asynchronously for the tslib helper library. + */ +function getTsLibPath() { + return resolveIdAsync('tslib/tslib.es6.js', { basedir: __dirname }); +} + +/** + * Separate the Rollup plugin options from the Typescript compiler options, + * and normalize the Rollup options. + * @returns Object with normalized options: + * - `filter`: Checks if a file should be included. + * - `tsconfig`: Path to a tsconfig, or directive to ignore tsconfig. + * - `compilerOptions`: Custom Typescript compiler options that override tsconfig. + * - `typescript`: Instance of Typescript library (possibly custom). + * - `tslib`: ESM code from the tslib helper library (possibly custom). + */ +function getPluginOptions(options) { + const { include, exclude, tsconfig, typescript, tslib } = options, compilerOptions = __rest(options, ["include", "exclude", "tsconfig", "typescript", "tslib"]); + const filter = createFilter(include || ['*.ts+(|x)', '**/*.ts+(|x)'], exclude); + return { + filter, + tsconfig, + compilerOptions: compilerOptions, + typescript: typescript || defaultTs, + tslib: tslib || getTsLibPath() + }; +} + +/** + * Converts a Typescript type error into an equivalent Rollup warning object. + */ +function diagnosticToWarning(ts, host, diagnostic) { + const pluginCode = `TS${diagnostic.code}`; + const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n'); + // Build a Rollup warning object from the diagnostics object. + const warning = { + pluginCode, + message: `@rollup/plugin-typescript ${pluginCode}: ${message}` + }; + if (diagnostic.file) { + // Add information about the file location + const { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start); + warning.loc = { + column: character + 1, + line: line + 1, + file: diagnostic.file.fileName + }; + if (host) { + // Extract a code frame from Typescript + const formatted = ts.formatDiagnosticsWithColorAndContext([diagnostic], host); + // Typescript only exposes this formatter as a string prefixed with the flattened message. + // We need to remove it here since Rollup treats the properties as separate parts. + let frame = formatted.slice(formatted.indexOf(message) + message.length); + const newLine = host.getNewLine(); + if (frame.startsWith(newLine)) { + frame = frame.slice(frame.indexOf(newLine) + newLine.length); + } + warning.frame = frame; + } + } + return warning; +} + +const DEFAULT_COMPILER_OPTIONS = { + module: 'esnext', + noEmitOnError: true, + skipLibCheck: true +}; +const FORCED_COMPILER_OPTIONS = { + // Always use tslib + noEmitHelpers: true, + importHelpers: true, + // Typescript needs to emit the code for us to work with + noEmit: false, + emitDeclarationOnly: false, + // Preventing Typescript from resolving code may break compilation + noResolve: false +}; + +/* eslint-disable no-param-reassign */ +const DIRECTORY_PROPS = ['outDir', 'declarationDir']; +/** + * Mutates the compiler options to convert paths from relative to absolute. + * This should be used with compiler options passed through the Rollup plugin options, + * not those found from loading a tsconfig.json file. + * @param compilerOptions Compiler options to _mutate_. + * @param relativeTo Paths are resolved relative to this path. + */ +function makePathsAbsolute(compilerOptions, relativeTo) { + for (const pathProp of DIRECTORY_PROPS) { + if (compilerOptions[pathProp]) { + compilerOptions[pathProp] = resolve(relativeTo, compilerOptions[pathProp]); + } + } +} +/** + * Mutates the compiler options to normalize some values for Rollup. + * @param compilerOptions Compiler options to _mutate_. + * @returns True if the source map compiler option was not initially set. + */ +function normalizeCompilerOptions(ts, compilerOptions) { + let autoSetSourceMap = false; + if (compilerOptions.inlineSourceMap) { + // Force separate source map files for Rollup to work with. + compilerOptions.sourceMap = true; + compilerOptions.inlineSourceMap = false; + } + else if (typeof compilerOptions.sourceMap !== 'boolean') { + // Default to using source maps. + // If the plugin user sets sourceMap to false we keep that option. + compilerOptions.sourceMap = true; + // Using inlineSources to make sure typescript generate source content + // instead of source path. + compilerOptions.inlineSources = true; + autoSetSourceMap = true; + } + switch (compilerOptions.module) { + case ts.ModuleKind.ES2015: + case ts.ModuleKind.ESNext: + case ts.ModuleKind.CommonJS: + // OK module type + return autoSetSourceMap; + case ts.ModuleKind.None: + case ts.ModuleKind.AMD: + case ts.ModuleKind.UMD: + case ts.ModuleKind.System: { + // Invalid module type + const moduleType = ts.ModuleKind[compilerOptions.module]; + throw new Error(`@rollup/plugin-typescript: The module kind should be 'ES2015' or 'ESNext, found: '${moduleType}'`); + } + default: + // Unknown or unspecified module type, force ESNext + compilerOptions.module = ts.ModuleKind.ESNext; + } + return autoSetSourceMap; +} + +/** + * Finds the path to the tsconfig file relative to the current working directory. + * @param relativePath Relative tsconfig path given by the user. + * If `false` is passed, then a null path is returned. + * @returns The absolute path, or null if the file does not exist. + */ +function getTsConfigPath(ts, relativePath) { + if (relativePath === false) + return null; + // Resolve path to file. `tsConfigOption` defaults to 'tsconfig.json'. + const tsConfigPath = resolve(process.cwd(), relativePath || 'tsconfig.json'); + if (!ts.sys.fileExists(tsConfigPath)) { + if (relativePath) { + // If an explicit path was provided but no file was found, throw + throw new Error(`Could not find specified tsconfig.json at ${tsConfigPath}`); + } + else { + return null; + } + } + return tsConfigPath; +} +/** + * Tries to read the tsconfig file at `tsConfigPath`. + * @param tsConfigPath Absolute path to tsconfig JSON file. + * @param explicitPath If true, the path was set by the plugin user. + * If false, the path was computed automatically. + */ +function readTsConfigFile(ts, tsConfigPath) { + const { config, error } = ts.readConfigFile(tsConfigPath, (path) => readFileSync(path, 'utf8')); + if (error) { + throw Object.assign(Error(), diagnosticToWarning(ts, null, error)); + } + return config || {}; +} +/** + * Returns true if any of the `compilerOptions` contain an enum value (i.e.: ts.ScriptKind) rather than a string. + * This indicates that the internal CompilerOptions type is used rather than the JsonCompilerOptions. + */ +function containsEnumOptions(compilerOptions) { + const enums = [ + 'module', + 'target', + 'jsx', + 'moduleResolution', + 'newLine' + ]; + return enums.some((prop) => prop in compilerOptions && typeof compilerOptions[prop] === 'number'); +} +const configCache = new Map(); +/** + * Parse the Typescript config to use with the plugin. + * @param ts Typescript library instance. + * @param tsconfig Path to the tsconfig file, or `false` to ignore the file. + * @param compilerOptions Options passed to the plugin directly for Typescript. + * + * @returns Parsed tsconfig.json file with some important properties: + * - `options`: Parsed compiler options. + * - `fileNames` Type definition files that should be included in the build. + * - `errors`: Any errors from parsing the config file. + */ +function parseTypescriptConfig(ts, tsconfig, compilerOptions) { + /* eslint-disable no-undefined */ + const cwd = process.cwd(); + makePathsAbsolute(compilerOptions, cwd); + let parsedConfig; + // Resolve path to file. If file is not found, pass undefined path to `parseJsonConfigFileContent`. + // eslint-disable-next-line no-undefined + const tsConfigPath = getTsConfigPath(ts, tsconfig) || undefined; + const tsConfigFile = tsConfigPath ? readTsConfigFile(ts, tsConfigPath) : {}; + const basePath = tsConfigPath ? dirname(tsConfigPath) : cwd; + // If compilerOptions has enums, it represents an CompilerOptions object instead of parsed JSON. + // This determines where the data is passed to the parser. + if (containsEnumOptions(compilerOptions)) { + parsedConfig = ts.parseJsonConfigFileContent(Object.assign(Object.assign({}, tsConfigFile), { compilerOptions: Object.assign(Object.assign({}, DEFAULT_COMPILER_OPTIONS), tsConfigFile.compilerOptions) }), ts.sys, basePath, Object.assign(Object.assign({}, compilerOptions), FORCED_COMPILER_OPTIONS), tsConfigPath, undefined, undefined, configCache); + } + else { + parsedConfig = ts.parseJsonConfigFileContent(Object.assign(Object.assign({}, tsConfigFile), { compilerOptions: Object.assign(Object.assign(Object.assign({}, DEFAULT_COMPILER_OPTIONS), tsConfigFile.compilerOptions), compilerOptions) }), ts.sys, basePath, FORCED_COMPILER_OPTIONS, tsConfigPath, undefined, undefined, configCache); + } + const autoSetSourceMap = normalizeCompilerOptions(ts, parsedConfig.options); + return Object.assign(Object.assign({}, parsedConfig), { autoSetSourceMap }); +} +/** + * If errors are detected in the parsed options, + * display all of them as warnings then emit an error. + */ +function emitParsedOptionsErrors(ts, context, parsedOptions) { + if (parsedOptions.errors.length > 0) { + parsedOptions.errors.forEach((error) => context.warn(diagnosticToWarning(ts, null, error))); + context.error(`@rollup/plugin-typescript: Couldn't process compiler options`); + } +} + +/** + * Validate that the `compilerOptions.sourceMap` option matches `outputOptions.sourcemap`. + * @param context Rollup plugin context used to emit warnings. + * @param compilerOptions Typescript compiler options. + * @param outputOptions Rollup output options. + * @param autoSetSourceMap True if the `compilerOptions.sourceMap` property was set to `true` + * by the plugin, not the user. + */ +function validateSourceMap(context, compilerOptions, outputOptions, autoSetSourceMap) { + if (compilerOptions.sourceMap && !outputOptions.sourcemap && !autoSetSourceMap) { + context.warn(`@rollup/plugin-typescript: Rollup 'sourcemap' option must be set to generate source maps.`); + } + else if (!compilerOptions.sourceMap && outputOptions.sourcemap) { + context.warn(`@rollup/plugin-typescript: Typescript 'sourceMap' compiler option must be set to generate source maps.`); + } +} +/** + * Validate that the out directory used by Typescript can be controlled by Rollup. + * @param context Rollup plugin context used to emit errors. + * @param compilerOptions Typescript compiler options. + * @param outputOptions Rollup output options. + */ +function validatePaths(ts, context, compilerOptions, outputOptions) { + if (compilerOptions.out) { + context.error(`@rollup/plugin-typescript: Deprecated 'out' option is not supported. Use 'outDir' instead.`); + } + else if (compilerOptions.outFile) { + context.error(`@rollup/plugin-typescript: 'outFile' option is not supported. Use 'outDir' instead.`); + } + for (const dirProperty of DIRECTORY_PROPS) { + if (compilerOptions[dirProperty]) { + if (!outputOptions.dir) { + context.error(`@rollup/plugin-typescript: 'dir' must be used when '${dirProperty}' is specified.`); + } + // Checks if the given path lies within Rollup output dir + const fromRollupDirToTs = relative(outputOptions.dir, compilerOptions[dirProperty]); + if (fromRollupDirToTs.startsWith('..')) { + context.error(`@rollup/plugin-typescript: '${dirProperty}' must be located inside 'dir'.`); + } + } + } + const tsBuildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(compilerOptions); + if (tsBuildInfoPath && compilerOptions.incremental) { + if (!outputOptions.dir) { + context.error(`@rollup/plugin-typescript: 'dir' must be used when 'tsBuildInfoFile' or 'incremental' are specified.`); + } + // Checks if the given path lies within Rollup output dir + const fromRollupDirToTs = relative(outputOptions.dir, tsBuildInfoPath); + if (fromRollupDirToTs.startsWith('..')) { + context.error(`@rollup/plugin-typescript: 'tsBuildInfoFile' must be located inside 'dir'.`); + } + } + if (compilerOptions.declaration || compilerOptions.declarationMap) { + if (DIRECTORY_PROPS.every((dirProperty) => !compilerOptions[dirProperty])) { + context.error(`@rollup/plugin-typescript: 'outDir' or 'declarationDir' must be specified to generate declaration files.`); + } + } +} + +/** + * Checks if the given OutputFile represents some code + */ +function isCodeOutputFile(name) { + return !isMapOutputFile(name) && !name.endsWith('.d.ts'); +} +/** + * Checks if the given OutputFile represents some source map + */ +function isMapOutputFile(name) { + return name.endsWith('.map'); +} +/** + * Finds the corresponding emitted Javascript files for a given Typescript file. + * @param id Path to the Typescript file. + * @param emittedFiles Map of file names to source code, + * containing files emitted by the Typescript compiler. + */ +function findTypescriptOutput(ts, parsedOptions, id, emittedFiles) { + const emittedFileNames = ts.getOutputFileNames(parsedOptions, id, !ts.sys.useCaseSensitiveFileNames); + const codeFile = emittedFileNames.find(isCodeOutputFile); + const mapFile = emittedFileNames.find(isMapOutputFile); + return { + code: emittedFiles.get(codeFile), + map: emittedFiles.get(mapFile), + declarations: emittedFileNames.filter((name) => name !== codeFile && name !== mapFile) + }; +} + +// `Cannot compile modules into 'es6' when targeting 'ES5' or lower.` +const CANNOT_COMPILE_ESM = 1204; +/** + * Emit a Rollup warning or error for a Typescript type error. + */ +function emitDiagnostic(ts, context, host, diagnostic) { + if (diagnostic.code === CANNOT_COMPILE_ESM) + return; + const { noEmitOnError } = host.getCompilationSettings(); + // Build a Rollup warning object from the diagnostics object. + const warning = diagnosticToWarning(ts, host, diagnostic); + // Errors are fatal. Otherwise emit warnings. + if (noEmitOnError && diagnostic.category === ts.DiagnosticCategory.Error) { + context.error(warning); + } + else { + context.warn(warning); + } +} +function buildDiagnosticReporter(ts, context, host) { + return function reportDiagnostics(diagnostic) { + emitDiagnostic(ts, context, host, diagnostic); + }; +} + +/** + * Create a language service host to use with the Typescript compiler & type checking APIs. + * Typescript hosts are used to represent the user's system, + * with an API for reading files, checking directories and case sensitivity etc. + * @see https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API + */ +function createWatchHost(ts, context, { formatHost, parsedOptions, writeFile, resolveModule }) { + const createProgram = ts.createEmitAndSemanticDiagnosticsBuilderProgram; + const baseHost = ts.createWatchCompilerHost(parsedOptions.fileNames, parsedOptions.options, ts.sys, createProgram, buildDiagnosticReporter(ts, context, formatHost), + // Ignore watch status changes + () => { }, parsedOptions.projectReferences); + return Object.assign(Object.assign({}, baseHost), { + /** Override the created program so an in-memory emit is used */ + afterProgramCreate(program) { + const origEmit = program.emit; + // eslint-disable-next-line no-param-reassign + program.emit = (targetSourceFile, _, ...args) => origEmit(targetSourceFile, writeFile, ...args); + return baseHost.afterProgramCreate(program); + }, + /** Add helper to deal with module resolution */ + resolveModuleNames(moduleNames, containingFile) { + return moduleNames.map((moduleName) => resolveModule(moduleName, containingFile)); + } }); +} +function createWatchProgram(ts, context, options) { + return ts.createWatchProgram(createWatchHost(ts, context, options)); +} + +function typescript(options = {}) { + const { filter, tsconfig, compilerOptions, tslib, typescript: ts } = getPluginOptions(options); + const emittedFiles = new Map(); + const parsedOptions = parseTypescriptConfig(ts, tsconfig, compilerOptions); + parsedOptions.fileNames = parsedOptions.fileNames.filter(filter); + const formatHost = createFormattingHost(ts, parsedOptions.options); + const resolveModule = createModuleResolver(ts, formatHost); + let program = null; + function normalizePath(fileName) { + return fileName.split(win32.sep).join(posix.sep); + } + return { + name: 'typescript', + buildStart() { + emitParsedOptionsErrors(ts, this, parsedOptions); + // Fixes a memory leak https://github.com/rollup/plugins/issues/322 + if (!program) { + program = createWatchProgram(ts, this, { + formatHost, + resolveModule, + parsedOptions, + writeFile(fileName, data) { + emittedFiles.set(fileName, data); + } + }); + } + }, + buildEnd() { + var _a; + if (process.env.ROLLUP_WATCH !== 'true') { + // ESLint doesn't understand optional chaining + // eslint-disable-next-line + (_a = program) === null || _a === void 0 ? void 0 : _a.close(); + } + }, + renderStart(outputOptions) { + validateSourceMap(this, parsedOptions.options, outputOptions, parsedOptions.autoSetSourceMap); + validatePaths(ts, this, parsedOptions.options, outputOptions); + }, + resolveId(importee, importer) { + if (importee === 'tslib') { + return tslib; + } + if (!importer) + return null; + // Convert path from windows separators to posix separators + const containingFile = normalizePath(importer); + const resolved = resolveModule(importee, containingFile); + if (resolved) { + if (resolved.extension === '.d.ts') + return null; + return resolved.resolvedFileName; + } + return null; + }, + load(id) { + if (!filter(id)) + return null; + const output = findTypescriptOutput(ts, parsedOptions, id, emittedFiles); + return output.code ? output : null; + }, + generateBundle(outputOptions) { + parsedOptions.fileNames.forEach((fileName) => { + const output = findTypescriptOutput(ts, parsedOptions, fileName, emittedFiles); + output.declarations.forEach((id) => { + const code = emittedFiles.get(id); + if (!code) + return; + this.emitFile({ + type: 'asset', + fileName: normalizePath(relative(outputOptions.dir, id)), + source: code + }); + }); + }); + const tsBuildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(parsedOptions.options); + if (tsBuildInfoPath) { + this.emitFile({ + type: 'asset', + fileName: normalizePath(relative(outputOptions.dir, tsBuildInfoPath)), + source: emittedFiles.get(tsBuildInfoPath) + }); + } + } + }; +} + +export default typescript; diff --git a/frontend/node_modules/@rollup/plugin-typescript/dist/index.js b/frontend/node_modules/@rollup/plugin-typescript/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..b2e2310ef005b87083af8ee58225feb758ede0a3 --- /dev/null +++ b/frontend/node_modules/@rollup/plugin-typescript/dist/index.js @@ -0,0 +1,542 @@ +'use strict'; + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var path = require('path'); +var pluginutils = require('@rollup/pluginutils'); +var defaultTs = require('typescript'); +var resolveId = _interopDefault(require('resolve')); +var fs = require('fs'); + +/** + * Create a format diagnostics host to use with the Typescript type checking APIs. + * Typescript hosts are used to represent the user's system, + * with an API for checking case sensitivity etc. + * @param compilerOptions Typescript compiler options. Affects functions such as `getNewLine`. + * @see https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API + */ +function createFormattingHost(ts, compilerOptions) { + return { + /** Returns the compiler options for the project. */ + getCompilationSettings: () => compilerOptions, + /** Returns the current working directory. */ + getCurrentDirectory: () => process.cwd(), + /** Returns the string that corresponds with the selected `NewLineKind`. */ + getNewLine() { + switch (compilerOptions.newLine) { + case ts.NewLineKind.CarriageReturnLineFeed: + return '\r\n'; + case ts.NewLineKind.LineFeed: + return '\n'; + default: + return ts.sys.newLine; + } + }, + /** Returns a lower case name on case insensitive systems, otherwise the original name. */ + getCanonicalFileName: (fileName) => ts.sys.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase() + }; +} + +/** + * Create a helper for resolving modules using Typescript. + * @param host Typescript host that extends `ModuleResolutionHost` + * with methods for sanitizing filenames and getting compiler options. + */ +function createModuleResolver(ts, host) { + const compilerOptions = host.getCompilationSettings(); + const cache = ts.createModuleResolutionCache(process.cwd(), host.getCanonicalFileName, compilerOptions); + const moduleHost = Object.assign(Object.assign({}, ts.sys), host); + return (moduleName, containingFile) => { + const resolved = ts.nodeModuleNameResolver(moduleName, containingFile, compilerOptions, moduleHost, cache); + return resolved.resolvedModule; + }; +} + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +const resolveIdAsync = (file, opts) => new Promise((fulfil, reject) => resolveId(file, opts, (err, contents) => (err ? reject(err) : fulfil(contents)))); +/** + * Returns code asynchronously for the tslib helper library. + */ +function getTsLibPath() { + return resolveIdAsync('tslib/tslib.es6.js', { basedir: __dirname }); +} + +/** + * Separate the Rollup plugin options from the Typescript compiler options, + * and normalize the Rollup options. + * @returns Object with normalized options: + * - `filter`: Checks if a file should be included. + * - `tsconfig`: Path to a tsconfig, or directive to ignore tsconfig. + * - `compilerOptions`: Custom Typescript compiler options that override tsconfig. + * - `typescript`: Instance of Typescript library (possibly custom). + * - `tslib`: ESM code from the tslib helper library (possibly custom). + */ +function getPluginOptions(options) { + const { include, exclude, tsconfig, typescript, tslib } = options, compilerOptions = __rest(options, ["include", "exclude", "tsconfig", "typescript", "tslib"]); + const filter = pluginutils.createFilter(include || ['*.ts+(|x)', '**/*.ts+(|x)'], exclude); + return { + filter, + tsconfig, + compilerOptions: compilerOptions, + typescript: typescript || defaultTs, + tslib: tslib || getTsLibPath() + }; +} + +/** + * Converts a Typescript type error into an equivalent Rollup warning object. + */ +function diagnosticToWarning(ts, host, diagnostic) { + const pluginCode = `TS${diagnostic.code}`; + const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n'); + // Build a Rollup warning object from the diagnostics object. + const warning = { + pluginCode, + message: `@rollup/plugin-typescript ${pluginCode}: ${message}` + }; + if (diagnostic.file) { + // Add information about the file location + const { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start); + warning.loc = { + column: character + 1, + line: line + 1, + file: diagnostic.file.fileName + }; + if (host) { + // Extract a code frame from Typescript + const formatted = ts.formatDiagnosticsWithColorAndContext([diagnostic], host); + // Typescript only exposes this formatter as a string prefixed with the flattened message. + // We need to remove it here since Rollup treats the properties as separate parts. + let frame = formatted.slice(formatted.indexOf(message) + message.length); + const newLine = host.getNewLine(); + if (frame.startsWith(newLine)) { + frame = frame.slice(frame.indexOf(newLine) + newLine.length); + } + warning.frame = frame; + } + } + return warning; +} + +const DEFAULT_COMPILER_OPTIONS = { + module: 'esnext', + noEmitOnError: true, + skipLibCheck: true +}; +const FORCED_COMPILER_OPTIONS = { + // Always use tslib + noEmitHelpers: true, + importHelpers: true, + // Typescript needs to emit the code for us to work with + noEmit: false, + emitDeclarationOnly: false, + // Preventing Typescript from resolving code may break compilation + noResolve: false +}; + +/* eslint-disable no-param-reassign */ +const DIRECTORY_PROPS = ['outDir', 'declarationDir']; +/** + * Mutates the compiler options to convert paths from relative to absolute. + * This should be used with compiler options passed through the Rollup plugin options, + * not those found from loading a tsconfig.json file. + * @param compilerOptions Compiler options to _mutate_. + * @param relativeTo Paths are resolved relative to this path. + */ +function makePathsAbsolute(compilerOptions, relativeTo) { + for (const pathProp of DIRECTORY_PROPS) { + if (compilerOptions[pathProp]) { + compilerOptions[pathProp] = path.resolve(relativeTo, compilerOptions[pathProp]); + } + } +} +/** + * Mutates the compiler options to normalize some values for Rollup. + * @param compilerOptions Compiler options to _mutate_. + * @returns True if the source map compiler option was not initially set. + */ +function normalizeCompilerOptions(ts, compilerOptions) { + let autoSetSourceMap = false; + if (compilerOptions.inlineSourceMap) { + // Force separate source map files for Rollup to work with. + compilerOptions.sourceMap = true; + compilerOptions.inlineSourceMap = false; + } + else if (typeof compilerOptions.sourceMap !== 'boolean') { + // Default to using source maps. + // If the plugin user sets sourceMap to false we keep that option. + compilerOptions.sourceMap = true; + // Using inlineSources to make sure typescript generate source content + // instead of source path. + compilerOptions.inlineSources = true; + autoSetSourceMap = true; + } + switch (compilerOptions.module) { + case ts.ModuleKind.ES2015: + case ts.ModuleKind.ESNext: + case ts.ModuleKind.CommonJS: + // OK module type + return autoSetSourceMap; + case ts.ModuleKind.None: + case ts.ModuleKind.AMD: + case ts.ModuleKind.UMD: + case ts.ModuleKind.System: { + // Invalid module type + const moduleType = ts.ModuleKind[compilerOptions.module]; + throw new Error(`@rollup/plugin-typescript: The module kind should be 'ES2015' or 'ESNext, found: '${moduleType}'`); + } + default: + // Unknown or unspecified module type, force ESNext + compilerOptions.module = ts.ModuleKind.ESNext; + } + return autoSetSourceMap; +} + +/** + * Finds the path to the tsconfig file relative to the current working directory. + * @param relativePath Relative tsconfig path given by the user. + * If `false` is passed, then a null path is returned. + * @returns The absolute path, or null if the file does not exist. + */ +function getTsConfigPath(ts, relativePath) { + if (relativePath === false) + return null; + // Resolve path to file. `tsConfigOption` defaults to 'tsconfig.json'. + const tsConfigPath = path.resolve(process.cwd(), relativePath || 'tsconfig.json'); + if (!ts.sys.fileExists(tsConfigPath)) { + if (relativePath) { + // If an explicit path was provided but no file was found, throw + throw new Error(`Could not find specified tsconfig.json at ${tsConfigPath}`); + } + else { + return null; + } + } + return tsConfigPath; +} +/** + * Tries to read the tsconfig file at `tsConfigPath`. + * @param tsConfigPath Absolute path to tsconfig JSON file. + * @param explicitPath If true, the path was set by the plugin user. + * If false, the path was computed automatically. + */ +function readTsConfigFile(ts, tsConfigPath) { + const { config, error } = ts.readConfigFile(tsConfigPath, (path) => fs.readFileSync(path, 'utf8')); + if (error) { + throw Object.assign(Error(), diagnosticToWarning(ts, null, error)); + } + return config || {}; +} +/** + * Returns true if any of the `compilerOptions` contain an enum value (i.e.: ts.ScriptKind) rather than a string. + * This indicates that the internal CompilerOptions type is used rather than the JsonCompilerOptions. + */ +function containsEnumOptions(compilerOptions) { + const enums = [ + 'module', + 'target', + 'jsx', + 'moduleResolution', + 'newLine' + ]; + return enums.some((prop) => prop in compilerOptions && typeof compilerOptions[prop] === 'number'); +} +const configCache = new Map(); +/** + * Parse the Typescript config to use with the plugin. + * @param ts Typescript library instance. + * @param tsconfig Path to the tsconfig file, or `false` to ignore the file. + * @param compilerOptions Options passed to the plugin directly for Typescript. + * + * @returns Parsed tsconfig.json file with some important properties: + * - `options`: Parsed compiler options. + * - `fileNames` Type definition files that should be included in the build. + * - `errors`: Any errors from parsing the config file. + */ +function parseTypescriptConfig(ts, tsconfig, compilerOptions) { + /* eslint-disable no-undefined */ + const cwd = process.cwd(); + makePathsAbsolute(compilerOptions, cwd); + let parsedConfig; + // Resolve path to file. If file is not found, pass undefined path to `parseJsonConfigFileContent`. + // eslint-disable-next-line no-undefined + const tsConfigPath = getTsConfigPath(ts, tsconfig) || undefined; + const tsConfigFile = tsConfigPath ? readTsConfigFile(ts, tsConfigPath) : {}; + const basePath = tsConfigPath ? path.dirname(tsConfigPath) : cwd; + // If compilerOptions has enums, it represents an CompilerOptions object instead of parsed JSON. + // This determines where the data is passed to the parser. + if (containsEnumOptions(compilerOptions)) { + parsedConfig = ts.parseJsonConfigFileContent(Object.assign(Object.assign({}, tsConfigFile), { compilerOptions: Object.assign(Object.assign({}, DEFAULT_COMPILER_OPTIONS), tsConfigFile.compilerOptions) }), ts.sys, basePath, Object.assign(Object.assign({}, compilerOptions), FORCED_COMPILER_OPTIONS), tsConfigPath, undefined, undefined, configCache); + } + else { + parsedConfig = ts.parseJsonConfigFileContent(Object.assign(Object.assign({}, tsConfigFile), { compilerOptions: Object.assign(Object.assign(Object.assign({}, DEFAULT_COMPILER_OPTIONS), tsConfigFile.compilerOptions), compilerOptions) }), ts.sys, basePath, FORCED_COMPILER_OPTIONS, tsConfigPath, undefined, undefined, configCache); + } + const autoSetSourceMap = normalizeCompilerOptions(ts, parsedConfig.options); + return Object.assign(Object.assign({}, parsedConfig), { autoSetSourceMap }); +} +/** + * If errors are detected in the parsed options, + * display all of them as warnings then emit an error. + */ +function emitParsedOptionsErrors(ts, context, parsedOptions) { + if (parsedOptions.errors.length > 0) { + parsedOptions.errors.forEach((error) => context.warn(diagnosticToWarning(ts, null, error))); + context.error(`@rollup/plugin-typescript: Couldn't process compiler options`); + } +} + +/** + * Validate that the `compilerOptions.sourceMap` option matches `outputOptions.sourcemap`. + * @param context Rollup plugin context used to emit warnings. + * @param compilerOptions Typescript compiler options. + * @param outputOptions Rollup output options. + * @param autoSetSourceMap True if the `compilerOptions.sourceMap` property was set to `true` + * by the plugin, not the user. + */ +function validateSourceMap(context, compilerOptions, outputOptions, autoSetSourceMap) { + if (compilerOptions.sourceMap && !outputOptions.sourcemap && !autoSetSourceMap) { + context.warn(`@rollup/plugin-typescript: Rollup 'sourcemap' option must be set to generate source maps.`); + } + else if (!compilerOptions.sourceMap && outputOptions.sourcemap) { + context.warn(`@rollup/plugin-typescript: Typescript 'sourceMap' compiler option must be set to generate source maps.`); + } +} +/** + * Validate that the out directory used by Typescript can be controlled by Rollup. + * @param context Rollup plugin context used to emit errors. + * @param compilerOptions Typescript compiler options. + * @param outputOptions Rollup output options. + */ +function validatePaths(ts, context, compilerOptions, outputOptions) { + if (compilerOptions.out) { + context.error(`@rollup/plugin-typescript: Deprecated 'out' option is not supported. Use 'outDir' instead.`); + } + else if (compilerOptions.outFile) { + context.error(`@rollup/plugin-typescript: 'outFile' option is not supported. Use 'outDir' instead.`); + } + for (const dirProperty of DIRECTORY_PROPS) { + if (compilerOptions[dirProperty]) { + if (!outputOptions.dir) { + context.error(`@rollup/plugin-typescript: 'dir' must be used when '${dirProperty}' is specified.`); + } + // Checks if the given path lies within Rollup output dir + const fromRollupDirToTs = path.relative(outputOptions.dir, compilerOptions[dirProperty]); + if (fromRollupDirToTs.startsWith('..')) { + context.error(`@rollup/plugin-typescript: '${dirProperty}' must be located inside 'dir'.`); + } + } + } + const tsBuildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(compilerOptions); + if (tsBuildInfoPath && compilerOptions.incremental) { + if (!outputOptions.dir) { + context.error(`@rollup/plugin-typescript: 'dir' must be used when 'tsBuildInfoFile' or 'incremental' are specified.`); + } + // Checks if the given path lies within Rollup output dir + const fromRollupDirToTs = path.relative(outputOptions.dir, tsBuildInfoPath); + if (fromRollupDirToTs.startsWith('..')) { + context.error(`@rollup/plugin-typescript: 'tsBuildInfoFile' must be located inside 'dir'.`); + } + } + if (compilerOptions.declaration || compilerOptions.declarationMap) { + if (DIRECTORY_PROPS.every((dirProperty) => !compilerOptions[dirProperty])) { + context.error(`@rollup/plugin-typescript: 'outDir' or 'declarationDir' must be specified to generate declaration files.`); + } + } +} + +/** + * Checks if the given OutputFile represents some code + */ +function isCodeOutputFile(name) { + return !isMapOutputFile(name) && !name.endsWith('.d.ts'); +} +/** + * Checks if the given OutputFile represents some source map + */ +function isMapOutputFile(name) { + return name.endsWith('.map'); +} +/** + * Finds the corresponding emitted Javascript files for a given Typescript file. + * @param id Path to the Typescript file. + * @param emittedFiles Map of file names to source code, + * containing files emitted by the Typescript compiler. + */ +function findTypescriptOutput(ts, parsedOptions, id, emittedFiles) { + const emittedFileNames = ts.getOutputFileNames(parsedOptions, id, !ts.sys.useCaseSensitiveFileNames); + const codeFile = emittedFileNames.find(isCodeOutputFile); + const mapFile = emittedFileNames.find(isMapOutputFile); + return { + code: emittedFiles.get(codeFile), + map: emittedFiles.get(mapFile), + declarations: emittedFileNames.filter((name) => name !== codeFile && name !== mapFile) + }; +} + +// `Cannot compile modules into 'es6' when targeting 'ES5' or lower.` +const CANNOT_COMPILE_ESM = 1204; +/** + * Emit a Rollup warning or error for a Typescript type error. + */ +function emitDiagnostic(ts, context, host, diagnostic) { + if (diagnostic.code === CANNOT_COMPILE_ESM) + return; + const { noEmitOnError } = host.getCompilationSettings(); + // Build a Rollup warning object from the diagnostics object. + const warning = diagnosticToWarning(ts, host, diagnostic); + // Errors are fatal. Otherwise emit warnings. + if (noEmitOnError && diagnostic.category === ts.DiagnosticCategory.Error) { + context.error(warning); + } + else { + context.warn(warning); + } +} +function buildDiagnosticReporter(ts, context, host) { + return function reportDiagnostics(diagnostic) { + emitDiagnostic(ts, context, host, diagnostic); + }; +} + +/** + * Create a language service host to use with the Typescript compiler & type checking APIs. + * Typescript hosts are used to represent the user's system, + * with an API for reading files, checking directories and case sensitivity etc. + * @see https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API + */ +function createWatchHost(ts, context, { formatHost, parsedOptions, writeFile, resolveModule }) { + const createProgram = ts.createEmitAndSemanticDiagnosticsBuilderProgram; + const baseHost = ts.createWatchCompilerHost(parsedOptions.fileNames, parsedOptions.options, ts.sys, createProgram, buildDiagnosticReporter(ts, context, formatHost), + // Ignore watch status changes + () => { }, parsedOptions.projectReferences); + return Object.assign(Object.assign({}, baseHost), { + /** Override the created program so an in-memory emit is used */ + afterProgramCreate(program) { + const origEmit = program.emit; + // eslint-disable-next-line no-param-reassign + program.emit = (targetSourceFile, _, ...args) => origEmit(targetSourceFile, writeFile, ...args); + return baseHost.afterProgramCreate(program); + }, + /** Add helper to deal with module resolution */ + resolveModuleNames(moduleNames, containingFile) { + return moduleNames.map((moduleName) => resolveModule(moduleName, containingFile)); + } }); +} +function createWatchProgram(ts, context, options) { + return ts.createWatchProgram(createWatchHost(ts, context, options)); +} + +function typescript(options = {}) { + const { filter, tsconfig, compilerOptions, tslib, typescript: ts } = getPluginOptions(options); + const emittedFiles = new Map(); + const parsedOptions = parseTypescriptConfig(ts, tsconfig, compilerOptions); + parsedOptions.fileNames = parsedOptions.fileNames.filter(filter); + const formatHost = createFormattingHost(ts, parsedOptions.options); + const resolveModule = createModuleResolver(ts, formatHost); + let program = null; + function normalizePath(fileName) { + return fileName.split(path.win32.sep).join(path.posix.sep); + } + return { + name: 'typescript', + buildStart() { + emitParsedOptionsErrors(ts, this, parsedOptions); + // Fixes a memory leak https://github.com/rollup/plugins/issues/322 + if (!program) { + program = createWatchProgram(ts, this, { + formatHost, + resolveModule, + parsedOptions, + writeFile(fileName, data) { + emittedFiles.set(fileName, data); + } + }); + } + }, + buildEnd() { + var _a; + if (process.env.ROLLUP_WATCH !== 'true') { + // ESLint doesn't understand optional chaining + // eslint-disable-next-line + (_a = program) === null || _a === void 0 ? void 0 : _a.close(); + } + }, + renderStart(outputOptions) { + validateSourceMap(this, parsedOptions.options, outputOptions, parsedOptions.autoSetSourceMap); + validatePaths(ts, this, parsedOptions.options, outputOptions); + }, + resolveId(importee, importer) { + if (importee === 'tslib') { + return tslib; + } + if (!importer) + return null; + // Convert path from windows separators to posix separators + const containingFile = normalizePath(importer); + const resolved = resolveModule(importee, containingFile); + if (resolved) { + if (resolved.extension === '.d.ts') + return null; + return resolved.resolvedFileName; + } + return null; + }, + load(id) { + if (!filter(id)) + return null; + const output = findTypescriptOutput(ts, parsedOptions, id, emittedFiles); + return output.code ? output : null; + }, + generateBundle(outputOptions) { + parsedOptions.fileNames.forEach((fileName) => { + const output = findTypescriptOutput(ts, parsedOptions, fileName, emittedFiles); + output.declarations.forEach((id) => { + const code = emittedFiles.get(id); + if (!code) + return; + this.emitFile({ + type: 'asset', + fileName: normalizePath(path.relative(outputOptions.dir, id)), + source: code + }); + }); + }); + const tsBuildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(parsedOptions.options); + if (tsBuildInfoPath) { + this.emitFile({ + type: 'asset', + fileName: normalizePath(path.relative(outputOptions.dir, tsBuildInfoPath)), + source: emittedFiles.get(tsBuildInfoPath) + }); + } + } + }; +} + +module.exports = typescript; diff --git a/frontend/node_modules/@rollup/plugin-typescript/package.json b/frontend/node_modules/@rollup/plugin-typescript/package.json new file mode 100644 index 0000000000000000000000000000000000000000..e22230a6a2fe32de2d92ced328720edf7b775c18 --- /dev/null +++ b/frontend/node_modules/@rollup/plugin-typescript/package.json @@ -0,0 +1,82 @@ +{ + "name": "@rollup/plugin-typescript", + "version": "4.1.2", + "publishConfig": { + "access": "public" + }, + "description": "Seamless integration between Rollup and TypeScript.", + "license": "MIT", + "repository": "rollup/plugins", + "author": "Oskar Segersvärd", + "homepage": "https://github.com/rollup/plugins/tree/master/packages/typescript/#readme", + "bugs": "https://github.com/rollup/plugins/issues", + "main": "dist/index.js", + "engines": { + "node": ">=8.0.0" + }, + "scripts": { + "build": "rollup -c", + "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov", + "ci:lint": "pnpm run build && pnpm run lint", + "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", + "ci:test": "pnpm run test -- --verbose --serial", + "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:json && pnpm run lint:package", + "lint:docs": "prettier --single-quote --write README.md", + "lint:js": "eslint --fix --cache src test --ext .js,.ts", + "lint:json": "prettier --write **/tsconfig.json", + "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", + "prebuild": "del-cli dist", + "prepare": "pnpm run build", + "prepublishOnly": "pnpm run lint", + "pretest": "pnpm run build", + "test": "ava" + }, + "files": [ + "dist", + "types", + "README.md", + "LICENSE" + ], + "keywords": [ + "rollup", + "plugin", + "typescript", + "es2015" + ], + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0", + "tslib": "*", + "typescript": ">=2.1.0" + }, + "dependencies": { + "@rollup/pluginutils": "^3.0.1", + "resolve": "^1.14.1" + }, + "devDependencies": { + "@rollup/plugin-buble": "^0.21.0", + "@rollup/plugin-commonjs": "^11.0.1", + "@rollup/plugin-typescript": "^3.0.0", + "buble": "^0.19.8", + "rollup": "^2.0.0", + "tslib": "^1.10.0", + "typescript": "^3.7.4" + }, + "ava": { + "compileEnhancements": false, + "extensions": [ + "ts" + ], + "require": [ + "ts-node/register" + ], + "files": [ + "!**/fixtures/**", + "!**/output/**", + "!**/helpers/**", + "!**/recipes/**", + "!**/types.ts" + ] + }, + "module": "dist/index.es.js", + "types": "types/index.d.ts" +} diff --git a/frontend/node_modules/@rollup/plugin-typescript/types/index.d.ts b/frontend/node_modules/@rollup/plugin-typescript/types/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..adffe1e71e2d84d051757012a90e8744d8e43b4f --- /dev/null +++ b/frontend/node_modules/@rollup/plugin-typescript/types/index.d.ts @@ -0,0 +1,47 @@ +import { FilterPattern } from '@rollup/pluginutils'; +import { Plugin } from 'rollup'; +import { CompilerOptions } from 'typescript'; + +export interface RollupTypescriptPluginOptions { + /** + * Determine which files are transpiled by Typescript (all `.ts` and + * `.tsx` files by default). + */ + include?: FilterPattern; + /** + * Determine which files are transpiled by Typescript (all `.ts` and + * `.tsx` files by default). + */ + exclude?: FilterPattern; + /** + * When set to false, ignores any options specified in the config file. + * If set to a string that corresponds to a file path, the specified file + * will be used as config file. + */ + tsconfig?: string | false; + /** + * Overrides TypeScript used for transpilation + */ + typescript?: typeof import('typescript'); + /** + * Overrides the injected TypeScript helpers with a custom version. + */ + tslib?: Promise | string; +} + +/** Properties of `CompilerOptions` that are normally enums */ +export type EnumCompilerOptions = 'module' | 'moduleResolution' | 'newLine' | 'jsx' | 'target'; + +/** JSON representation of Typescript compiler options */ +export type JsonCompilerOptions = Omit & + Record; + +/** Compiler options set by the plugin user. */ +export type PartialCompilerOptions = Partial | Partial; + +export type RollupTypescriptOptions = RollupTypescriptPluginOptions & PartialCompilerOptions; + +/** + * Seamless integration between Rollup and Typescript. + */ +export default function typescript(options?: RollupTypescriptOptions): Plugin; diff --git a/frontend/node_modules/@rollup/pluginutils/CHANGELOG.md b/frontend/node_modules/@rollup/pluginutils/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..d286908b4c22d8e451ee6092e8ff26bc81c7bf07 --- /dev/null +++ b/frontend/node_modules/@rollup/pluginutils/CHANGELOG.md @@ -0,0 +1,315 @@ +# @rollup/pluginutils ChangeLog + +## v3.1.0 + +_2020-06-05_ + +### Bugfixes + +- fix: resolve relative paths starting with "./" (#180) + +### Features + +- feat: add native node es modules support (#419) + +### Updates + +- refactor: replace micromatch with picomatch. (#306) +- chore: Don't bundle micromatch (#220) +- chore: add missing typescript devDep (238b140) +- chore: Use readonly arrays, add TSDoc (#187) +- chore: Use typechecking (2ae08eb) + +## v3.0.10 + +_2020-05-02_ + +### Bugfixes + +- fix: resolve relative paths starting with "./" (#180) + +### Updates + +- refactor: replace micromatch with picomatch. (#306) +- chore: Don't bundle micromatch (#220) +- chore: add missing typescript devDep (238b140) +- chore: Use readonly arrays, add TSDoc (#187) +- chore: Use typechecking (2ae08eb) + +## v3.0.9 + +_2020-04-12_ + +### Updates + +- chore: support Rollup v2 + +## v3.0.8 + +_2020-02-01_ + +### Bugfixes + +- fix: resolve relative paths starting with "./" (#180) + +### Updates + +- chore: add missing typescript devDep (238b140) +- chore: Use readonly arrays, add TSDoc (#187) +- chore: Use typechecking (2ae08eb) + +## v3.0.7 + +_2020-02-01_ + +### Bugfixes + +- fix: resolve relative paths starting with "./" (#180) + +### Updates + +- chore: Use readonly arrays, add TSDoc (#187) +- chore: Use typechecking (2ae08eb) + +## v3.0.6 + +_2020-01-27_ + +### Bugfixes + +- fix: resolve relative paths starting with "./" (#180) + +## v3.0.5 + +_2020-01-25_ + +### Bugfixes + +- fix: bring back named exports (#176) + +## v3.0.4 + +_2020-01-10_ + +### Bugfixes + +- fix: keep for(const..) out of scope (#151) + +## v3.0.3 + +_2020-01-07_ + +### Bugfixes + +- fix: createFilter Windows regression (#141) + +### Updates + +- test: fix windows path failure (0a0de65) +- chore: fix test script (5eae320) + +## v3.0.2 + +_2020-01-04_ + +### Bugfixes + +- fix: makeLegalIdentifier - potentially unsafe input for blacklisted identifier (#116) + +### Updates + +- docs: Fix documented type of createFilter's include/exclude (#123) +- chore: update minor linting correction (bcbf9d2) + +## 3.0.1 + +- fix: Escape glob characters in folder (#84) + +## 3.0.0 + +_2019-11-25_ + +- **Breaking:** Minimum compatible Rollup version is 1.20.0 +- **Breaking:** Minimum supported Node version is 8.0.0 +- Published as @rollup/plugins-image + +## 2.8.2 + +_2019-09-13_ + +- Handle optional catch parameter in attachScopes ([#70](https://github.com/rollup/rollup-pluginutils/pulls/70)) + +## 2.8.1 + +_2019-06-04_ + +- Support serialization of many edge cases ([#64](https://github.com/rollup/rollup-pluginutils/issues/64)) + +## 2.8.0 + +_2019-05-30_ + +- Bundle updated micromatch dependency ([#60](https://github.com/rollup/rollup-pluginutils/issues/60)) + +## 2.7.1 + +_2019-05-17_ + +- Do not ignore files with a leading "." in createFilter ([#62](https://github.com/rollup/rollup-pluginutils/issues/62)) + +## 2.7.0 + +_2019-05-15_ + +- Add `resolve` option to createFilter ([#59](https://github.com/rollup/rollup-pluginutils/issues/59)) + +## 2.6.0 + +_2019-04-04_ + +- Add `extractAssignedNames` ([#59](https://github.com/rollup/rollup-pluginutils/issues/59)) +- Provide dedicated TypeScript typings file ([#58](https://github.com/rollup/rollup-pluginutils/issues/58)) + +## 2.5.0 + +_2019-03-18_ + +- Generalize dataToEsm type ([#55](https://github.com/rollup/rollup-pluginutils/issues/55)) +- Handle empty keys in dataToEsm ([#56](https://github.com/rollup/rollup-pluginutils/issues/56)) + +## 2.4.1 + +_2019-02-16_ + +- Remove unnecessary dependency + +## 2.4.0 + +_2019-02-16_ +Update dependencies to solve micromatch vulnerability ([#53](https://github.com/rollup/rollup-pluginutils/issues/53)) + +## 2.3.3 + +_2018-09-19_ + +- Revert micromatch update ([#43](https://github.com/rollup/rollup-pluginutils/issues/43)) + +## 2.3.2 + +_2018-09-18_ + +- Bumb micromatch dependency ([#36](https://github.com/rollup/rollup-pluginutils/issues/36)) +- Bumb dependencies ([#41](https://github.com/rollup/rollup-pluginutils/issues/41)) +- Split up tests ([#40](https://github.com/rollup/rollup-pluginutils/issues/40)) + +## 2.3.1 + +_2018-08-06_ + +- Fixed ObjectPattern scope in attachScopes to recognise { ...rest } syntax ([#37](https://github.com/rollup/rollup-pluginutils/issues/37)) + +## 2.3.0 + +_2018-05-21_ + +- Add option to not generate named exports ([#32](https://github.com/rollup/rollup-pluginutils/issues/32)) + +## 2.2.1 + +_2018-05-21_ + +- Support `null` serialization ([#34](https://github.com/rollup/rollup-pluginutils/issues/34)) + +## 2.2.0 + +_2018-05-11_ + +- Improve white-space handling in `dataToEsm` and add `prepare` script ([#31](https://github.com/rollup/rollup-pluginutils/issues/31)) + +## 2.1.1 + +_2018-05-09_ + +- Update dependencies + +## 2.1.0 + +_2018-05-08_ + +- Add `dataToEsm` helper to create named exports from objects ([#29](https://github.com/rollup/rollup-pluginutils/issues/29)) +- Support literal keys in object patterns ([#27](https://github.com/rollup/rollup-pluginutils/issues/27)) +- Support function declarations without id in `attachScopes` ([#28](https://github.com/rollup/rollup-pluginutils/issues/28)) + +## 2.0.1 + +_2017-01-03_ + +- Don't add extension to file with trailing dot ([#14](https://github.com/rollup/rollup-pluginutils/issues/14)) + +## 2.0.0 + +_2017-01-03_ + +- Use `micromatch` instead of `minimatch` ([#19](https://github.com/rollup/rollup-pluginutils/issues/19)) +- Allow `createFilter` to take regexes ([#5](https://github.com/rollup/rollup-pluginutils/issues/5)) + +## 1.5.2 + +_2016-08-29_ + +- Treat `arguments` as a reserved word ([#10](https://github.com/rollup/rollup-pluginutils/issues/10)) + +## 1.5.1 + +_2016-06-24_ + +- Add all declarators in a var declaration to scope, not just the first + +## 1.5.0 + +_2016-06-07_ + +- Exclude IDs with null character (`\0`) + +## 1.4.0 + +_2016-06-07_ + +- Workaround minimatch issue ([#6](https://github.com/rollup/rollup-pluginutils/pull/6)) +- Exclude non-string IDs in `createFilter` + +## 1.3.1 + +_2015-12-16_ + +- Build with Rollup directly, rather than via Gobble + +## 1.3.0 + +_2015-12-16_ + +- Use correct path separator on Windows + +## 1.2.0 + +_2015-11-02_ + +- Add `attachScopes` and `makeLegalIdentifier` + +## 1.1.0 + +2015-10-24\* + +- Add `addExtension` function + +## 1.0.1 + +_2015-10-24_ + +- Include dist files in package + +## 1.0.0 + +_2015-10-24_ + +- First release diff --git a/frontend/node_modules/@rollup/pluginutils/LICENSE b/frontend/node_modules/@rollup/pluginutils/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..5e46702cbdea74f8a8139094f5a1ff1f0e486f45 --- /dev/null +++ b/frontend/node_modules/@rollup/pluginutils/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/contributors) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/frontend/node_modules/@rollup/pluginutils/README.md b/frontend/node_modules/@rollup/pluginutils/README.md new file mode 100644 index 0000000000000000000000000000000000000000..2a103e6bd696860b005ed594301926732871da25 --- /dev/null +++ b/frontend/node_modules/@rollup/pluginutils/README.md @@ -0,0 +1,237 @@ +[npm]: https://img.shields.io/npm/v/@rollup/pluginutils +[npm-url]: https://www.npmjs.com/package/@rollup/pluginutils +[size]: https://packagephobia.now.sh/badge?p=@rollup/pluginutils +[size-url]: https://packagephobia.now.sh/result?p=@rollup/pluginutils + +[![npm][npm]][npm-url] +[![size][size]][size-url] +[![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com) + +# @rollup/pluginutils + +A set of utility functions commonly used by 🍣 Rollup plugins. + +## Requirements + +This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v8.0.0+) and Rollup v1.20.0+. + +## Install + +Using npm: + +```console +npm install @rollup/pluginutils --save-dev +``` + +## Usage + +```js +import utils from '@rollup/pluginutils'; +//... +``` + +## API + +Available utility functions are listed below: + +_Note: Parameter names immediately followed by a `?` indicate that the parameter is optional._ + +### addExtension + +Adds an extension to a module ID if one does not exist. + +Parameters: `(filename: String, ext?: String)`
+Returns: `String` + +```js +import { addExtension } from '@rollup/pluginutils'; + +export default function myPlugin(options = {}) { + return { + resolveId(code, id) { + // only adds an extension if there isn't one already + id = addExtension(id); // `foo` -> `foo.js`, `foo.js -> foo.js` + id = addExtension(id, '.myext'); // `foo` -> `foo.myext`, `foo.js -> `foo.js` + } + }; +} +``` + +### attachScopes + +Attaches `Scope` objects to the relevant nodes of an AST. Each `Scope` object has a `scope.contains(name)` method that returns `true` if a given name is defined in the current scope or a parent scope. + +Parameters: `(ast: Node, propertyName?: String)`
+Returns: `Object` + +See [rollup-plugin-inject](https://github.com/rollup/rollup-plugin-inject) or [rollup-plugin-commonjs](https://github.com/rollup/rollup-plugin-commonjs) for an example of usage. + +```js +import { attachScopes } from '@rollup/pluginutils'; +import { walk } from 'estree-walker'; + +export default function myPlugin(options = {}) { + return { + transform(code) { + const ast = this.parse(code); + + let scope = attachScopes(ast, 'scope'); + + walk(ast, { + enter(node) { + if (node.scope) scope = node.scope; + + if (!scope.contains('foo')) { + // `foo` is not defined, so if we encounter it, + // we assume it's a global + } + }, + leave(node) { + if (node.scope) scope = scope.parent; + } + }); + } + }; +} +``` + +### createFilter + +Constructs a filter function which can be used to determine whether or not certain modules should be operated upon. + +Parameters: `(include?: , exclude?: , options?: Object)`
+Returns: `String` + +#### `include` and `exclude` + +Type: `String | RegExp | Array[...String|RegExp]`
+ +A valid [`minimatch`](https://www.npmjs.com/package/minimatch) pattern, or array of patterns. If `options.include` is omitted or has zero length, filter will return `true` by default. Otherwise, an ID must match one or more of the `minimatch` patterns, and must not match any of the `options.exclude` patterns. + +#### `options` + +##### `resolve` + +Type: `String | Boolean | null` + +Optionally resolves the patterns against a directory other than `process.cwd()`. If a `String` is specified, then the value will be used as the base directory. Relative paths will be resolved against `process.cwd()` first. If `false`, then the patterns will not be resolved against any directory. This can be useful if you want to create a filter for virtual module names. + +#### Usage + +```js +import { createFilter } from '@rollup/pluginutils'; + +export default function myPlugin(options = {}) { + // assume that the myPlugin accepts options of `options.include` and `options.exclude` + var filter = createFilter(options.include, options.exclude, { + resolve: '/my/base/dir' + }); + + return { + transform(code, id) { + if (!filter(id)) return; + + // proceed with the transformation... + } + }; +} +``` + +### dataToEsm + +Transforms objects into tree-shakable ES Module imports. + +Parameters: `(data: Object)`
+Returns: `String` + +#### `data` + +Type: `Object` + +An object to transform into an ES module. + +#### Usage + +```js +import { dataToEsm } from '@rollup/pluginutils'; + +const esModuleSource = dataToEsm( + { + custom: 'data', + to: ['treeshake'] + }, + { + compact: false, + indent: '\t', + preferConst: false, + objectShorthand: false, + namedExports: true + } +); +/* +Outputs the string ES module source: + export const custom = 'data'; + export const to = ['treeshake']; + export default { custom, to }; +*/ +``` + +### extractAssignedNames + +Extracts the names of all assignment targets based upon specified patterns. + +Parameters: `(param: Node)`
+Returns: `Array[...String]` + +#### `param` + +Type: `Node` + +An `acorn` AST Node. + +#### Usage + +```js +import { extractAssignedNames } from '@rollup/pluginutils'; +import { walk } from 'estree-walker'; + +export default function myPlugin(options = {}) { + return { + transform(code) { + const ast = this.parse(code); + + walk(ast, { + enter(node) { + if (node.type === 'VariableDeclarator') { + const declaredNames = extractAssignedNames(node.id); + // do something with the declared names + // e.g. for `const {x, y: z} = ... => declaredNames = ['x', 'z'] + } + } + }); + } + }; +} +``` + +### makeLegalIdentifier + +Constructs a bundle-safe identifier from a `String`. + +Parameters: `(str: String)`
+Returns: `String` + +#### Usage + +```js +import { makeLegalIdentifier } from '@rollup/pluginutils'; + +makeLegalIdentifier('foo-bar'); // 'foo_bar' +makeLegalIdentifier('typeof'); // '_typeof' +``` + +## Meta + +[CONTRIBUTING](/.github/CONTRIBUTING.md) + +[LICENSE (MIT)](/LICENSE) diff --git a/frontend/node_modules/@rollup/pluginutils/dist/cjs/index.js b/frontend/node_modules/@rollup/pluginutils/dist/cjs/index.js new file mode 100644 index 0000000000000000000000000000000000000000..c980d90e1c3617f3fbecb9ff42b135819c00420b --- /dev/null +++ b/frontend/node_modules/@rollup/pluginutils/dist/cjs/index.js @@ -0,0 +1,447 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var path = require('path'); +var pm = _interopDefault(require('picomatch')); + +const addExtension = function addExtension(filename, ext = '.js') { + let result = `${filename}`; + if (!path.extname(filename)) + result += ext; + return result; +}; + +function walk(ast, { enter, leave }) { + return visit(ast, null, enter, leave); +} + +let should_skip = false; +let should_remove = false; +let replacement = null; +const context = { + skip: () => should_skip = true, + remove: () => should_remove = true, + replace: (node) => replacement = node +}; + +function replace(parent, prop, index, node) { + if (parent) { + if (index !== null) { + parent[prop][index] = node; + } else { + parent[prop] = node; + } + } +} + +function remove(parent, prop, index) { + if (parent) { + if (index !== null) { + parent[prop].splice(index, 1); + } else { + delete parent[prop]; + } + } +} + +function visit( + node, + parent, + enter, + leave, + prop, + index +) { + if (node) { + if (enter) { + const _should_skip = should_skip; + const _should_remove = should_remove; + const _replacement = replacement; + should_skip = false; + should_remove = false; + replacement = null; + + enter.call(context, node, parent, prop, index); + + if (replacement) { + node = replacement; + replace(parent, prop, index, node); + } + + if (should_remove) { + remove(parent, prop, index); + } + + const skipped = should_skip; + const removed = should_remove; + + should_skip = _should_skip; + should_remove = _should_remove; + replacement = _replacement; + + if (skipped) return node; + if (removed) return null; + } + + for (const key in node) { + const value = (node )[key]; + + if (typeof value !== 'object') { + continue; + } + + else if (Array.isArray(value)) { + for (let j = 0, k = 0; j < value.length; j += 1, k += 1) { + if (value[j] !== null && typeof value[j].type === 'string') { + if (!visit(value[j], node, enter, leave, key, k)) { + // removed + j--; + } + } + } + } + + else if (value !== null && typeof value.type === 'string') { + visit(value, node, enter, leave, key, null); + } + } + + if (leave) { + const _replacement = replacement; + const _should_remove = should_remove; + replacement = null; + should_remove = false; + + leave.call(context, node, parent, prop, index); + + if (replacement) { + node = replacement; + replace(parent, prop, index, node); + } + + if (should_remove) { + remove(parent, prop, index); + } + + const removed = should_remove; + + replacement = _replacement; + should_remove = _should_remove; + + if (removed) return null; + } + } + + return node; +} + +const extractors = { + ArrayPattern(names, param) { + for (const element of param.elements) { + if (element) + extractors[element.type](names, element); + } + }, + AssignmentPattern(names, param) { + extractors[param.left.type](names, param.left); + }, + Identifier(names, param) { + names.push(param.name); + }, + MemberExpression() { }, + ObjectPattern(names, param) { + for (const prop of param.properties) { + // @ts-ignore Typescript reports that this is not a valid type + if (prop.type === 'RestElement') { + extractors.RestElement(names, prop); + } + else { + extractors[prop.value.type](names, prop.value); + } + } + }, + RestElement(names, param) { + extractors[param.argument.type](names, param.argument); + } +}; +const extractAssignedNames = function extractAssignedNames(param) { + const names = []; + extractors[param.type](names, param); + return names; +}; + +const blockDeclarations = { + const: true, + let: true +}; +class Scope { + constructor(options = {}) { + this.parent = options.parent; + this.isBlockScope = !!options.block; + this.declarations = Object.create(null); + if (options.params) { + options.params.forEach((param) => { + extractAssignedNames(param).forEach((name) => { + this.declarations[name] = true; + }); + }); + } + } + addDeclaration(node, isBlockDeclaration, isVar) { + if (!isBlockDeclaration && this.isBlockScope) { + // it's a `var` or function node, and this + // is a block scope, so we need to go up + this.parent.addDeclaration(node, isBlockDeclaration, isVar); + } + else if (node.id) { + extractAssignedNames(node.id).forEach((name) => { + this.declarations[name] = true; + }); + } + } + contains(name) { + return this.declarations[name] || (this.parent ? this.parent.contains(name) : false); + } +} +const attachScopes = function attachScopes(ast, propertyName = 'scope') { + let scope = new Scope(); + walk(ast, { + enter(n, parent) { + const node = n; + // function foo () {...} + // class Foo {...} + if (/(Function|Class)Declaration/.test(node.type)) { + scope.addDeclaration(node, false, false); + } + // var foo = 1 + if (node.type === 'VariableDeclaration') { + const { kind } = node; + const isBlockDeclaration = blockDeclarations[kind]; + // don't add const/let declarations in the body of a for loop #113 + const parentType = parent ? parent.type : ''; + if (!(isBlockDeclaration && /ForOfStatement/.test(parentType))) { + node.declarations.forEach((declaration) => { + scope.addDeclaration(declaration, isBlockDeclaration, true); + }); + } + } + let newScope; + // create new function scope + if (/Function/.test(node.type)) { + const func = node; + newScope = new Scope({ + parent: scope, + block: false, + params: func.params + }); + // named function expressions - the name is considered + // part of the function's scope + if (func.type === 'FunctionExpression' && func.id) { + newScope.addDeclaration(func, false, false); + } + } + // create new block scope + if (node.type === 'BlockStatement' && !/Function/.test(parent.type)) { + newScope = new Scope({ + parent: scope, + block: true + }); + } + // catch clause has its own block scope + if (node.type === 'CatchClause') { + newScope = new Scope({ + parent: scope, + params: node.param ? [node.param] : [], + block: true + }); + } + if (newScope) { + Object.defineProperty(node, propertyName, { + value: newScope, + configurable: true + }); + scope = newScope; + } + }, + leave(n) { + const node = n; + if (node[propertyName]) + scope = scope.parent; + } + }); + return scope; +}; + +// Helper since Typescript can't detect readonly arrays with Array.isArray +function isArray(arg) { + return Array.isArray(arg); +} +function ensureArray(thing) { + if (isArray(thing)) + return thing; + if (thing == null) + return []; + return [thing]; +} + +function getMatcherString(id, resolutionBase) { + if (resolutionBase === false) { + return id; + } + // resolve('') is valid and will default to process.cwd() + const basePath = path.resolve(resolutionBase || '') + .split(path.sep) + .join('/') + // escape all possible (posix + win) path characters that might interfere with regex + .replace(/[-^$*+?.()|[\]{}]/g, '\\$&'); + // Note that we use posix.join because: + // 1. the basePath has been normalized to use / + // 2. the incoming glob (id) matcher, also uses / + // otherwise Node will force backslash (\) on windows + return path.posix.join(basePath, id); +} +const createFilter = function createFilter(include, exclude, options) { + const resolutionBase = options && options.resolve; + const getMatcher = (id) => id instanceof RegExp + ? id + : { + test: (what) => { + // this refactor is a tad overly verbose but makes for easy debugging + const pattern = getMatcherString(id, resolutionBase); + const fn = pm(pattern, { dot: true }); + const result = fn(what); + return result; + } + }; + const includeMatchers = ensureArray(include).map(getMatcher); + const excludeMatchers = ensureArray(exclude).map(getMatcher); + return function result(id) { + if (typeof id !== 'string') + return false; + if (/\0/.test(id)) + return false; + const pathId = id.split(path.sep).join('/'); + for (let i = 0; i < excludeMatchers.length; ++i) { + const matcher = excludeMatchers[i]; + if (matcher.test(pathId)) + return false; + } + for (let i = 0; i < includeMatchers.length; ++i) { + const matcher = includeMatchers[i]; + if (matcher.test(pathId)) + return true; + } + return !includeMatchers.length; + }; +}; + +const reservedWords = 'break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public'; +const builtins = 'arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl'; +const forbiddenIdentifiers = new Set(`${reservedWords} ${builtins}`.split(' ')); +forbiddenIdentifiers.add(''); +const makeLegalIdentifier = function makeLegalIdentifier(str) { + let identifier = str + .replace(/-(\w)/g, (_, letter) => letter.toUpperCase()) + .replace(/[^$_a-zA-Z0-9]/g, '_'); + if (/\d/.test(identifier[0]) || forbiddenIdentifiers.has(identifier)) { + identifier = `_${identifier}`; + } + return identifier || '_'; +}; + +function stringify(obj) { + return (JSON.stringify(obj) || 'undefined').replace(/[\u2028\u2029]/g, (char) => `\\u${`000${char.charCodeAt(0).toString(16)}`.slice(-4)}`); +} +function serializeArray(arr, indent, baseIndent) { + let output = '['; + const separator = indent ? `\n${baseIndent}${indent}` : ''; + for (let i = 0; i < arr.length; i++) { + const key = arr[i]; + output += `${i > 0 ? ',' : ''}${separator}${serialize(key, indent, baseIndent + indent)}`; + } + return `${output}${indent ? `\n${baseIndent}` : ''}]`; +} +function serializeObject(obj, indent, baseIndent) { + let output = '{'; + const separator = indent ? `\n${baseIndent}${indent}` : ''; + const entries = Object.entries(obj); + for (let i = 0; i < entries.length; i++) { + const [key, value] = entries[i]; + const stringKey = makeLegalIdentifier(key) === key ? key : stringify(key); + output += `${i > 0 ? ',' : ''}${separator}${stringKey}:${indent ? ' ' : ''}${serialize(value, indent, baseIndent + indent)}`; + } + return `${output}${indent ? `\n${baseIndent}` : ''}}`; +} +function serialize(obj, indent, baseIndent) { + if (obj === Infinity) + return 'Infinity'; + if (obj === -Infinity) + return '-Infinity'; + if (obj === 0 && 1 / obj === -Infinity) + return '-0'; + if (obj instanceof Date) + return `new Date(${obj.getTime()})`; + if (obj instanceof RegExp) + return obj.toString(); + if (obj !== obj) + return 'NaN'; // eslint-disable-line no-self-compare + if (Array.isArray(obj)) + return serializeArray(obj, indent, baseIndent); + if (obj === null) + return 'null'; + if (typeof obj === 'object') + return serializeObject(obj, indent, baseIndent); + return stringify(obj); +} +const dataToEsm = function dataToEsm(data, options = {}) { + const t = options.compact ? '' : 'indent' in options ? options.indent : '\t'; + const _ = options.compact ? '' : ' '; + const n = options.compact ? '' : '\n'; + const declarationType = options.preferConst ? 'const' : 'var'; + if (options.namedExports === false || + typeof data !== 'object' || + Array.isArray(data) || + data instanceof Date || + data instanceof RegExp || + data === null) { + const code = serialize(data, options.compact ? null : t, ''); + const magic = _ || (/^[{[\-\/]/.test(code) ? '' : ' '); // eslint-disable-line no-useless-escape + return `export default${magic}${code};`; + } + let namedExportCode = ''; + const defaultExportRows = []; + for (const [key, value] of Object.entries(data)) { + if (key === makeLegalIdentifier(key)) { + if (options.objectShorthand) + defaultExportRows.push(key); + else + defaultExportRows.push(`${key}:${_}${key}`); + namedExportCode += `export ${declarationType} ${key}${_}=${_}${serialize(value, options.compact ? null : t, '')};${n}`; + } + else { + defaultExportRows.push(`${stringify(key)}:${_}${serialize(value, options.compact ? null : t, '')}`); + } + } + return `${namedExportCode}export default${_}{${n}${t}${defaultExportRows.join(`,${n}${t}`)}${n}};${n}`; +}; + +// TODO: remove this in next major +var index = { + addExtension, + attachScopes, + createFilter, + dataToEsm, + extractAssignedNames, + makeLegalIdentifier +}; + +exports.addExtension = addExtension; +exports.attachScopes = attachScopes; +exports.createFilter = createFilter; +exports.dataToEsm = dataToEsm; +exports.default = index; +exports.extractAssignedNames = extractAssignedNames; +exports.makeLegalIdentifier = makeLegalIdentifier; diff --git a/frontend/node_modules/@rollup/pluginutils/dist/es/index.js b/frontend/node_modules/@rollup/pluginutils/dist/es/index.js new file mode 100644 index 0000000000000000000000000000000000000000..a4230529334cc85529d038b6858a9ce45f55fd6d --- /dev/null +++ b/frontend/node_modules/@rollup/pluginutils/dist/es/index.js @@ -0,0 +1,436 @@ +import { extname, sep, resolve, posix } from 'path'; +import pm from 'picomatch'; + +const addExtension = function addExtension(filename, ext = '.js') { + let result = `${filename}`; + if (!extname(filename)) + result += ext; + return result; +}; + +function walk(ast, { enter, leave }) { + return visit(ast, null, enter, leave); +} + +let should_skip = false; +let should_remove = false; +let replacement = null; +const context = { + skip: () => should_skip = true, + remove: () => should_remove = true, + replace: (node) => replacement = node +}; + +function replace(parent, prop, index, node) { + if (parent) { + if (index !== null) { + parent[prop][index] = node; + } else { + parent[prop] = node; + } + } +} + +function remove(parent, prop, index) { + if (parent) { + if (index !== null) { + parent[prop].splice(index, 1); + } else { + delete parent[prop]; + } + } +} + +function visit( + node, + parent, + enter, + leave, + prop, + index +) { + if (node) { + if (enter) { + const _should_skip = should_skip; + const _should_remove = should_remove; + const _replacement = replacement; + should_skip = false; + should_remove = false; + replacement = null; + + enter.call(context, node, parent, prop, index); + + if (replacement) { + node = replacement; + replace(parent, prop, index, node); + } + + if (should_remove) { + remove(parent, prop, index); + } + + const skipped = should_skip; + const removed = should_remove; + + should_skip = _should_skip; + should_remove = _should_remove; + replacement = _replacement; + + if (skipped) return node; + if (removed) return null; + } + + for (const key in node) { + const value = (node )[key]; + + if (typeof value !== 'object') { + continue; + } + + else if (Array.isArray(value)) { + for (let j = 0, k = 0; j < value.length; j += 1, k += 1) { + if (value[j] !== null && typeof value[j].type === 'string') { + if (!visit(value[j], node, enter, leave, key, k)) { + // removed + j--; + } + } + } + } + + else if (value !== null && typeof value.type === 'string') { + visit(value, node, enter, leave, key, null); + } + } + + if (leave) { + const _replacement = replacement; + const _should_remove = should_remove; + replacement = null; + should_remove = false; + + leave.call(context, node, parent, prop, index); + + if (replacement) { + node = replacement; + replace(parent, prop, index, node); + } + + if (should_remove) { + remove(parent, prop, index); + } + + const removed = should_remove; + + replacement = _replacement; + should_remove = _should_remove; + + if (removed) return null; + } + } + + return node; +} + +const extractors = { + ArrayPattern(names, param) { + for (const element of param.elements) { + if (element) + extractors[element.type](names, element); + } + }, + AssignmentPattern(names, param) { + extractors[param.left.type](names, param.left); + }, + Identifier(names, param) { + names.push(param.name); + }, + MemberExpression() { }, + ObjectPattern(names, param) { + for (const prop of param.properties) { + // @ts-ignore Typescript reports that this is not a valid type + if (prop.type === 'RestElement') { + extractors.RestElement(names, prop); + } + else { + extractors[prop.value.type](names, prop.value); + } + } + }, + RestElement(names, param) { + extractors[param.argument.type](names, param.argument); + } +}; +const extractAssignedNames = function extractAssignedNames(param) { + const names = []; + extractors[param.type](names, param); + return names; +}; + +const blockDeclarations = { + const: true, + let: true +}; +class Scope { + constructor(options = {}) { + this.parent = options.parent; + this.isBlockScope = !!options.block; + this.declarations = Object.create(null); + if (options.params) { + options.params.forEach((param) => { + extractAssignedNames(param).forEach((name) => { + this.declarations[name] = true; + }); + }); + } + } + addDeclaration(node, isBlockDeclaration, isVar) { + if (!isBlockDeclaration && this.isBlockScope) { + // it's a `var` or function node, and this + // is a block scope, so we need to go up + this.parent.addDeclaration(node, isBlockDeclaration, isVar); + } + else if (node.id) { + extractAssignedNames(node.id).forEach((name) => { + this.declarations[name] = true; + }); + } + } + contains(name) { + return this.declarations[name] || (this.parent ? this.parent.contains(name) : false); + } +} +const attachScopes = function attachScopes(ast, propertyName = 'scope') { + let scope = new Scope(); + walk(ast, { + enter(n, parent) { + const node = n; + // function foo () {...} + // class Foo {...} + if (/(Function|Class)Declaration/.test(node.type)) { + scope.addDeclaration(node, false, false); + } + // var foo = 1 + if (node.type === 'VariableDeclaration') { + const { kind } = node; + const isBlockDeclaration = blockDeclarations[kind]; + // don't add const/let declarations in the body of a for loop #113 + const parentType = parent ? parent.type : ''; + if (!(isBlockDeclaration && /ForOfStatement/.test(parentType))) { + node.declarations.forEach((declaration) => { + scope.addDeclaration(declaration, isBlockDeclaration, true); + }); + } + } + let newScope; + // create new function scope + if (/Function/.test(node.type)) { + const func = node; + newScope = new Scope({ + parent: scope, + block: false, + params: func.params + }); + // named function expressions - the name is considered + // part of the function's scope + if (func.type === 'FunctionExpression' && func.id) { + newScope.addDeclaration(func, false, false); + } + } + // create new block scope + if (node.type === 'BlockStatement' && !/Function/.test(parent.type)) { + newScope = new Scope({ + parent: scope, + block: true + }); + } + // catch clause has its own block scope + if (node.type === 'CatchClause') { + newScope = new Scope({ + parent: scope, + params: node.param ? [node.param] : [], + block: true + }); + } + if (newScope) { + Object.defineProperty(node, propertyName, { + value: newScope, + configurable: true + }); + scope = newScope; + } + }, + leave(n) { + const node = n; + if (node[propertyName]) + scope = scope.parent; + } + }); + return scope; +}; + +// Helper since Typescript can't detect readonly arrays with Array.isArray +function isArray(arg) { + return Array.isArray(arg); +} +function ensureArray(thing) { + if (isArray(thing)) + return thing; + if (thing == null) + return []; + return [thing]; +} + +function getMatcherString(id, resolutionBase) { + if (resolutionBase === false) { + return id; + } + // resolve('') is valid and will default to process.cwd() + const basePath = resolve(resolutionBase || '') + .split(sep) + .join('/') + // escape all possible (posix + win) path characters that might interfere with regex + .replace(/[-^$*+?.()|[\]{}]/g, '\\$&'); + // Note that we use posix.join because: + // 1. the basePath has been normalized to use / + // 2. the incoming glob (id) matcher, also uses / + // otherwise Node will force backslash (\) on windows + return posix.join(basePath, id); +} +const createFilter = function createFilter(include, exclude, options) { + const resolutionBase = options && options.resolve; + const getMatcher = (id) => id instanceof RegExp + ? id + : { + test: (what) => { + // this refactor is a tad overly verbose but makes for easy debugging + const pattern = getMatcherString(id, resolutionBase); + const fn = pm(pattern, { dot: true }); + const result = fn(what); + return result; + } + }; + const includeMatchers = ensureArray(include).map(getMatcher); + const excludeMatchers = ensureArray(exclude).map(getMatcher); + return function result(id) { + if (typeof id !== 'string') + return false; + if (/\0/.test(id)) + return false; + const pathId = id.split(sep).join('/'); + for (let i = 0; i < excludeMatchers.length; ++i) { + const matcher = excludeMatchers[i]; + if (matcher.test(pathId)) + return false; + } + for (let i = 0; i < includeMatchers.length; ++i) { + const matcher = includeMatchers[i]; + if (matcher.test(pathId)) + return true; + } + return !includeMatchers.length; + }; +}; + +const reservedWords = 'break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public'; +const builtins = 'arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl'; +const forbiddenIdentifiers = new Set(`${reservedWords} ${builtins}`.split(' ')); +forbiddenIdentifiers.add(''); +const makeLegalIdentifier = function makeLegalIdentifier(str) { + let identifier = str + .replace(/-(\w)/g, (_, letter) => letter.toUpperCase()) + .replace(/[^$_a-zA-Z0-9]/g, '_'); + if (/\d/.test(identifier[0]) || forbiddenIdentifiers.has(identifier)) { + identifier = `_${identifier}`; + } + return identifier || '_'; +}; + +function stringify(obj) { + return (JSON.stringify(obj) || 'undefined').replace(/[\u2028\u2029]/g, (char) => `\\u${`000${char.charCodeAt(0).toString(16)}`.slice(-4)}`); +} +function serializeArray(arr, indent, baseIndent) { + let output = '['; + const separator = indent ? `\n${baseIndent}${indent}` : ''; + for (let i = 0; i < arr.length; i++) { + const key = arr[i]; + output += `${i > 0 ? ',' : ''}${separator}${serialize(key, indent, baseIndent + indent)}`; + } + return `${output}${indent ? `\n${baseIndent}` : ''}]`; +} +function serializeObject(obj, indent, baseIndent) { + let output = '{'; + const separator = indent ? `\n${baseIndent}${indent}` : ''; + const entries = Object.entries(obj); + for (let i = 0; i < entries.length; i++) { + const [key, value] = entries[i]; + const stringKey = makeLegalIdentifier(key) === key ? key : stringify(key); + output += `${i > 0 ? ',' : ''}${separator}${stringKey}:${indent ? ' ' : ''}${serialize(value, indent, baseIndent + indent)}`; + } + return `${output}${indent ? `\n${baseIndent}` : ''}}`; +} +function serialize(obj, indent, baseIndent) { + if (obj === Infinity) + return 'Infinity'; + if (obj === -Infinity) + return '-Infinity'; + if (obj === 0 && 1 / obj === -Infinity) + return '-0'; + if (obj instanceof Date) + return `new Date(${obj.getTime()})`; + if (obj instanceof RegExp) + return obj.toString(); + if (obj !== obj) + return 'NaN'; // eslint-disable-line no-self-compare + if (Array.isArray(obj)) + return serializeArray(obj, indent, baseIndent); + if (obj === null) + return 'null'; + if (typeof obj === 'object') + return serializeObject(obj, indent, baseIndent); + return stringify(obj); +} +const dataToEsm = function dataToEsm(data, options = {}) { + const t = options.compact ? '' : 'indent' in options ? options.indent : '\t'; + const _ = options.compact ? '' : ' '; + const n = options.compact ? '' : '\n'; + const declarationType = options.preferConst ? 'const' : 'var'; + if (options.namedExports === false || + typeof data !== 'object' || + Array.isArray(data) || + data instanceof Date || + data instanceof RegExp || + data === null) { + const code = serialize(data, options.compact ? null : t, ''); + const magic = _ || (/^[{[\-\/]/.test(code) ? '' : ' '); // eslint-disable-line no-useless-escape + return `export default${magic}${code};`; + } + let namedExportCode = ''; + const defaultExportRows = []; + for (const [key, value] of Object.entries(data)) { + if (key === makeLegalIdentifier(key)) { + if (options.objectShorthand) + defaultExportRows.push(key); + else + defaultExportRows.push(`${key}:${_}${key}`); + namedExportCode += `export ${declarationType} ${key}${_}=${_}${serialize(value, options.compact ? null : t, '')};${n}`; + } + else { + defaultExportRows.push(`${stringify(key)}:${_}${serialize(value, options.compact ? null : t, '')}`); + } + } + return `${namedExportCode}export default${_}{${n}${t}${defaultExportRows.join(`,${n}${t}`)}${n}};${n}`; +}; + +// TODO: remove this in next major +var index = { + addExtension, + attachScopes, + createFilter, + dataToEsm, + extractAssignedNames, + makeLegalIdentifier +}; + +export default index; +export { addExtension, attachScopes, createFilter, dataToEsm, extractAssignedNames, makeLegalIdentifier }; diff --git a/frontend/node_modules/@rollup/pluginutils/dist/es/package.json b/frontend/node_modules/@rollup/pluginutils/dist/es/package.json new file mode 100644 index 0000000000000000000000000000000000000000..7c34deb5837d8d5e168b54f95f7872b2c50eca13 --- /dev/null +++ b/frontend/node_modules/@rollup/pluginutils/dist/es/package.json @@ -0,0 +1 @@ +{"type":"module"} \ No newline at end of file diff --git a/frontend/node_modules/@rollup/pluginutils/package.json b/frontend/node_modules/@rollup/pluginutils/package.json new file mode 100644 index 0000000000000000000000000000000000000000..0f57f4192913c29a2978a4de72d605f1010b32c8 --- /dev/null +++ b/frontend/node_modules/@rollup/pluginutils/package.json @@ -0,0 +1,91 @@ +{ + "name": "@rollup/pluginutils", + "version": "3.1.0", + "publishConfig": { + "access": "public" + }, + "description": "A set of utility functions commonly used by Rollup plugins", + "license": "MIT", + "repository": "rollup/plugins", + "author": "Rich Harris ", + "homepage": "https://github.com/rollup/plugins/tree/master/packages/pluginutils#readme", + "bugs": { + "url": "https://github.com/rollup/plugins/issues" + }, + "main": "./dist/cjs/index.js", + "engines": { + "node": ">= 8.0.0" + }, + "scripts": { + "build": "rollup -c", + "ci:coverage": "nyc pnpm run test && nyc report --reporter=text-lcov > coverage.lcov", + "ci:lint": "pnpm run build && pnpm run lint", + "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", + "ci:test": "pnpm run test -- --verbose", + "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", + "lint:docs": "prettier --single-quote --write README.md", + "lint:js": "eslint --fix --cache src test types --ext .js,.ts", + "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", + "prebuild": "del-cli dist", + "prepare": "pnpm run build", + "prepublishOnly": "pnpm run lint && pnpm run build", + "pretest": "pnpm run build -- --sourcemap", + "test": "ava" + }, + "files": [ + "dist", + "types", + "README.md", + "LICENSE" + ], + "keywords": [ + "rollup", + "plugin", + "utils" + ], + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0" + }, + "dependencies": { + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" + }, + "devDependencies": { + "@rollup/plugin-commonjs": "^11.0.2", + "@rollup/plugin-node-resolve": "^7.1.1", + "@rollup/plugin-typescript": "^3.0.0", + "@types/jest": "^24.9.0", + "@types/node": "^12.12.25", + "@types/picomatch": "^2.2.1", + "typescript": "^3.7.5" + }, + "ava": { + "compileEnhancements": false, + "extensions": [ + "ts" + ], + "require": [ + "ts-node/register" + ], + "files": [ + "!**/fixtures/**", + "!**/helpers/**", + "!**/recipes/**", + "!**/types.ts" + ] + }, + "exports": { + "require": "./dist/cjs/index.js", + "import": "./dist/es/index.js" + }, + "module": "./dist/es/index.js", + "nyc": { + "extension": [ + ".js", + ".ts" + ] + }, + "type": "commonjs", + "types": "types/index.d.ts" +} diff --git a/frontend/node_modules/@rollup/pluginutils/types/index.d.ts b/frontend/node_modules/@rollup/pluginutils/types/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..33d40e50971d89d02012553ac52d10993fefc708 --- /dev/null +++ b/frontend/node_modules/@rollup/pluginutils/types/index.d.ts @@ -0,0 +1,86 @@ +// eslint-disable-next-line import/no-unresolved +import { BaseNode } from 'estree'; + +export interface AttachedScope { + parent?: AttachedScope; + isBlockScope: boolean; + declarations: { [key: string]: boolean }; + addDeclaration(node: BaseNode, isBlockDeclaration: boolean, isVar: boolean): void; + contains(name: string): boolean; +} + +export interface DataToEsmOptions { + compact?: boolean; + indent?: string; + namedExports?: boolean; + objectShorthand?: boolean; + preferConst?: boolean; +} + +/** + * A valid `minimatch` pattern, or array of patterns. + */ +export type FilterPattern = ReadonlyArray | string | RegExp | null; + +/** + * Adds an extension to a module ID if one does not exist. + */ +export function addExtension(filename: string, ext?: string): string; + +/** + * Attaches `Scope` objects to the relevant nodes of an AST. + * Each `Scope` object has a `scope.contains(name)` method that returns `true` + * if a given name is defined in the current scope or a parent scope. + */ +export function attachScopes(ast: BaseNode, propertyName?: string): AttachedScope; + +/** + * Constructs a filter function which can be used to determine whether or not + * certain modules should be operated upon. + * @param include If `include` is omitted or has zero length, filter will return `true` by default. + * @param exclude ID must not match any of the `exclude` patterns. + * @param options Optionally resolves the patterns against a directory other than `process.cwd()`. + * If a `string` is specified, then the value will be used as the base directory. + * Relative paths will be resolved against `process.cwd()` first. + * If `false`, then the patterns will not be resolved against any directory. + * This can be useful if you want to create a filter for virtual module names. + */ +export function createFilter( + include?: FilterPattern, + exclude?: FilterPattern, + options?: { resolve?: string | false | null } +): (id: string | unknown) => boolean; + +/** + * Transforms objects into tree-shakable ES Module imports. + * @param data An object to transform into an ES module. + */ +export function dataToEsm(data: unknown, options?: DataToEsmOptions): string; + +/** + * Extracts the names of all assignment targets based upon specified patterns. + * @param param An `acorn` AST Node. + */ +export function extractAssignedNames(param: BaseNode): string[]; + +/** + * Constructs a bundle-safe identifier from a `string`. + */ +export function makeLegalIdentifier(str: string): string; + +export type AddExtension = typeof addExtension; +export type AttachScopes = typeof attachScopes; +export type CreateFilter = typeof createFilter; +export type ExtractAssignedNames = typeof extractAssignedNames; +export type MakeLegalIdentifier = typeof makeLegalIdentifier; +export type DataToEsm = typeof dataToEsm; + +declare const defaultExport: { + addExtension: AddExtension; + attachScopes: AttachScopes; + createFilter: CreateFilter; + dataToEsm: DataToEsm; + extractAssignedNames: ExtractAssignedNames; + makeLegalIdentifier: MakeLegalIdentifier; +}; +export default defaultExport; diff --git a/frontend/node_modules/@tsconfig/svelte/LICENSE b/frontend/node_modules/@tsconfig/svelte/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..48ea6616b5b8581df3401872996cecf1f8b08a0d --- /dev/null +++ b/frontend/node_modules/@tsconfig/svelte/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Microsoft Corporation. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE diff --git a/frontend/node_modules/@tsconfig/svelte/README.md b/frontend/node_modules/@tsconfig/svelte/README.md new file mode 100644 index 0000000000000000000000000000000000000000..4c88100dc68630fb1bba1e25e7007ffcbb2e5bed --- /dev/null +++ b/frontend/node_modules/@tsconfig/svelte/README.md @@ -0,0 +1,51 @@ +### A base TSConfig for working with Svelte. + +Add the package to your `"devDependencies"`: + +```sh +npm install --save-dev @tsconfig/svelte +yarn add --dev @tsconfig/svelte +``` + +Add to your `tsconfig.json`: + +```json +"extends": "@tsconfig/svelte/tsconfig.json" +``` + +--- + +The `tsconfig.json`: + +```jsonc +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Svelte", + + "compilerOptions": { + "moduleResolution": "node", + "target": "es2017", + /** + Svelte Preprocess cannot figure out whether you have a value or a type, so tell TypeScript + to enforce using `import type` instead of `import` for Types. + */ + "importsNotUsedAsValues": "error", + "isolatedModules": true, + /** + To have warnings/errors of the Svelte compiler at the correct position, + enable source maps by default. + */ + "sourceMap": true, + /** Requests the runtime types from the svelte modules by default. Needed for TS files or else you get errors. */ + "types": ["svelte"], + + "strict": false, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true + } +} + +``` + +You can find the [code here](https://github.com/tsconfig/bases/blob/master/bases/svelte.json). \ No newline at end of file diff --git a/frontend/node_modules/@tsconfig/svelte/package.json b/frontend/node_modules/@tsconfig/svelte/package.json new file mode 100644 index 0000000000000000000000000000000000000000..ef7e002b19479751f97859b12cd03b05971e32ee --- /dev/null +++ b/frontend/node_modules/@tsconfig/svelte/package.json @@ -0,0 +1 @@ +{"name":"@tsconfig/svelte","repository":{"type":"git","url":"https://github.com/tsconfig/bases.git","directory":"bases"},"license":"MIT","description":"A base TSConfig for working with Svelte.","version":"1.0.13"} \ No newline at end of file diff --git a/frontend/node_modules/@tsconfig/svelte/tsconfig.json b/frontend/node_modules/@tsconfig/svelte/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..bc9f0ea60070eb1db0fb44237ede16ede5201fc3 --- /dev/null +++ b/frontend/node_modules/@tsconfig/svelte/tsconfig.json @@ -0,0 +1,27 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Svelte", + + "compilerOptions": { + "moduleResolution": "node", + "target": "es2017", + /** + Svelte Preprocess cannot figure out whether you have a value or a type, so tell TypeScript + to enforce using `import type` instead of `import` for Types. + */ + "importsNotUsedAsValues": "error", + "isolatedModules": true, + /** + To have warnings/errors of the Svelte compiler at the correct position, + enable source maps by default. + */ + "sourceMap": true, + /** Requests the runtime types from the svelte modules by default. Needed for TS files or else you get errors. */ + "types": ["svelte"], + + "strict": false, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true + } +} diff --git a/frontend/node_modules/@types/estree/LICENSE b/frontend/node_modules/@types/estree/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..21071075c24599ee98254f702bcfc504cdc275a6 --- /dev/null +++ b/frontend/node_modules/@types/estree/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/frontend/node_modules/@types/estree/README.md b/frontend/node_modules/@types/estree/README.md new file mode 100644 index 0000000000000000000000000000000000000000..2a22bde8561a9a6235fa478108b7b81dd2676c8d --- /dev/null +++ b/frontend/node_modules/@types/estree/README.md @@ -0,0 +1,16 @@ +# Installation +> `npm install --save @types/estree` + +# Summary +This package contains type definitions for ESTree AST specification (https://github.com/estree/estree). + +# Details +Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree + +Additional Details + * Last updated: Tue, 17 Apr 2018 20:22:09 GMT + * Dependencies: none + * Global values: none + +# Credits +These definitions were written by RReverser . diff --git a/frontend/node_modules/@types/estree/index.d.ts b/frontend/node_modules/@types/estree/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0133991c9fe3ba531d8bff8a74003e0c0f7411db --- /dev/null +++ b/frontend/node_modules/@types/estree/index.d.ts @@ -0,0 +1,548 @@ +// Type definitions for ESTree AST specification +// Project: https://github.com/estree/estree +// Definitions by: RReverser +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +// This definition file follows a somewhat unusual format. ESTree allows +// runtime type checks based on the `type` parameter. In order to explain this +// to typescript we want to use discriminated union types: +// https://github.com/Microsoft/TypeScript/pull/9163 +// +// For ESTree this is a bit tricky because the high level interfaces like +// Node or Function are pulling double duty. We want to pass common fields down +// to the interfaces that extend them (like Identifier or +// ArrowFunctionExpression), but you can't extend a type union or enforce +// common fields on them. So we've split the high level interfaces into two +// types, a base type which passes down inhereted fields, and a type union of +// all types which extend the base type. Only the type union is exported, and +// the union is how other types refer to the collection of inheriting types. +// +// This makes the definitions file here somewhat more difficult to maintain, +// but it has the notable advantage of making ESTree much easier to use as +// an end user. + +interface BaseNodeWithoutComments { + // Every leaf interface that extends BaseNode must specify a type property. + // The type property should be a string literal. For example, Identifier + // has: `type: "Identifier"` + type: string; + loc?: SourceLocation | null; + range?: [number, number]; +} + +interface BaseNode extends BaseNodeWithoutComments { + leadingComments?: Array; + trailingComments?: Array; +} + +export type Node = + Identifier | Literal | Program | Function | SwitchCase | CatchClause | + VariableDeclarator | Statement | Expression | Property | + AssignmentProperty | Super | TemplateElement | SpreadElement | Pattern | + ClassBody | Class | MethodDefinition | ModuleDeclaration | ModuleSpecifier; + +export interface Comment extends BaseNodeWithoutComments { + type: "Line" | "Block"; + value: string; +} + +interface SourceLocation { + source?: string | null; + start: Position; + end: Position; +} + +export interface Position { + /** >= 1 */ + line: number; + /** >= 0 */ + column: number; +} + +export interface Program extends BaseNode { + type: "Program"; + sourceType: "script" | "module"; + body: Array; + comments?: Array; +} + +interface BaseFunction extends BaseNode { + params: Array; + generator?: boolean; + async?: boolean; + // The body is either BlockStatement or Expression because arrow functions + // can have a body that's either. FunctionDeclarations and + // FunctionExpressions have only BlockStatement bodies. + body: BlockStatement | Expression; +} + +export type Function = + FunctionDeclaration | FunctionExpression | ArrowFunctionExpression; + +export type Statement = + ExpressionStatement | BlockStatement | EmptyStatement | + DebuggerStatement | WithStatement | ReturnStatement | LabeledStatement | + BreakStatement | ContinueStatement | IfStatement | SwitchStatement | + ThrowStatement | TryStatement | WhileStatement | DoWhileStatement | + ForStatement | ForInStatement | ForOfStatement | Declaration; + +interface BaseStatement extends BaseNode { } + +export interface EmptyStatement extends BaseStatement { + type: "EmptyStatement"; +} + +export interface BlockStatement extends BaseStatement { + type: "BlockStatement"; + body: Array; + innerComments?: Array; +} + +export interface ExpressionStatement extends BaseStatement { + type: "ExpressionStatement"; + expression: Expression; +} + +export interface IfStatement extends BaseStatement { + type: "IfStatement"; + test: Expression; + consequent: Statement; + alternate?: Statement | null; +} + +export interface LabeledStatement extends BaseStatement { + type: "LabeledStatement"; + label: Identifier; + body: Statement; +} + +export interface BreakStatement extends BaseStatement { + type: "BreakStatement"; + label?: Identifier | null; +} + +export interface ContinueStatement extends BaseStatement { + type: "ContinueStatement"; + label?: Identifier | null; +} + +export interface WithStatement extends BaseStatement { + type: "WithStatement"; + object: Expression; + body: Statement; +} + +export interface SwitchStatement extends BaseStatement { + type: "SwitchStatement"; + discriminant: Expression; + cases: Array; +} + +export interface ReturnStatement extends BaseStatement { + type: "ReturnStatement"; + argument?: Expression | null; +} + +export interface ThrowStatement extends BaseStatement { + type: "ThrowStatement"; + argument: Expression; +} + +export interface TryStatement extends BaseStatement { + type: "TryStatement"; + block: BlockStatement; + handler?: CatchClause | null; + finalizer?: BlockStatement | null; +} + +export interface WhileStatement extends BaseStatement { + type: "WhileStatement"; + test: Expression; + body: Statement; +} + +export interface DoWhileStatement extends BaseStatement { + type: "DoWhileStatement"; + body: Statement; + test: Expression; +} + +export interface ForStatement extends BaseStatement { + type: "ForStatement"; + init?: VariableDeclaration | Expression | null; + test?: Expression | null; + update?: Expression | null; + body: Statement; +} + +interface BaseForXStatement extends BaseStatement { + left: VariableDeclaration | Pattern; + right: Expression; + body: Statement; +} + +export interface ForInStatement extends BaseForXStatement { + type: "ForInStatement"; +} + +export interface DebuggerStatement extends BaseStatement { + type: "DebuggerStatement"; +} + +export type Declaration = + FunctionDeclaration | VariableDeclaration | ClassDeclaration; + +interface BaseDeclaration extends BaseStatement { } + +export interface FunctionDeclaration extends BaseFunction, BaseDeclaration { + type: "FunctionDeclaration"; + /** It is null when a function declaration is a part of the `export default function` statement */ + id: Identifier | null; + body: BlockStatement; +} + +export interface VariableDeclaration extends BaseDeclaration { + type: "VariableDeclaration"; + declarations: Array; + kind: "var" | "let" | "const"; +} + +export interface VariableDeclarator extends BaseNode { + type: "VariableDeclarator"; + id: Pattern; + init?: Expression | null; +} + +type Expression = + ThisExpression | ArrayExpression | ObjectExpression | FunctionExpression | + ArrowFunctionExpression | YieldExpression | Literal | UnaryExpression | + UpdateExpression | BinaryExpression | AssignmentExpression | + LogicalExpression | MemberExpression | ConditionalExpression | + CallExpression | NewExpression | SequenceExpression | TemplateLiteral | + TaggedTemplateExpression | ClassExpression | MetaProperty | Identifier | + AwaitExpression; + +export interface BaseExpression extends BaseNode { } + +export interface ThisExpression extends BaseExpression { + type: "ThisExpression"; +} + +export interface ArrayExpression extends BaseExpression { + type: "ArrayExpression"; + elements: Array; +} + +export interface ObjectExpression extends BaseExpression { + type: "ObjectExpression"; + properties: Array; +} + +export interface Property extends BaseNode { + type: "Property"; + key: Expression; + value: Expression | Pattern; // Could be an AssignmentProperty + kind: "init" | "get" | "set"; + method: boolean; + shorthand: boolean; + computed: boolean; +} + +export interface FunctionExpression extends BaseFunction, BaseExpression { + id?: Identifier | null; + type: "FunctionExpression"; + body: BlockStatement; +} + +export interface SequenceExpression extends BaseExpression { + type: "SequenceExpression"; + expressions: Array; +} + +export interface UnaryExpression extends BaseExpression { + type: "UnaryExpression"; + operator: UnaryOperator; + prefix: true; + argument: Expression; +} + +export interface BinaryExpression extends BaseExpression { + type: "BinaryExpression"; + operator: BinaryOperator; + left: Expression; + right: Expression; +} + +export interface AssignmentExpression extends BaseExpression { + type: "AssignmentExpression"; + operator: AssignmentOperator; + left: Pattern | MemberExpression; + right: Expression; +} + +export interface UpdateExpression extends BaseExpression { + type: "UpdateExpression"; + operator: UpdateOperator; + argument: Expression; + prefix: boolean; +} + +export interface LogicalExpression extends BaseExpression { + type: "LogicalExpression"; + operator: LogicalOperator; + left: Expression; + right: Expression; +} + +export interface ConditionalExpression extends BaseExpression { + type: "ConditionalExpression"; + test: Expression; + alternate: Expression; + consequent: Expression; +} + +interface BaseCallExpression extends BaseExpression { + callee: Expression | Super; + arguments: Array; +} +export type CallExpression = SimpleCallExpression | NewExpression; + +export interface SimpleCallExpression extends BaseCallExpression { + type: "CallExpression"; +} + +export interface NewExpression extends BaseCallExpression { + type: "NewExpression"; +} + +export interface MemberExpression extends BaseExpression, BasePattern { + type: "MemberExpression"; + object: Expression | Super; + property: Expression; + computed: boolean; +} + +export type Pattern = + Identifier | ObjectPattern | ArrayPattern | RestElement | + AssignmentPattern | MemberExpression; + +interface BasePattern extends BaseNode { } + +export interface SwitchCase extends BaseNode { + type: "SwitchCase"; + test?: Expression | null; + consequent: Array; +} + +export interface CatchClause extends BaseNode { + type: "CatchClause"; + param: Pattern; + body: BlockStatement; +} + +export interface Identifier extends BaseNode, BaseExpression, BasePattern { + type: "Identifier"; + name: string; +} + +export type Literal = SimpleLiteral | RegExpLiteral; + +export interface SimpleLiteral extends BaseNode, BaseExpression { + type: "Literal"; + value: string | boolean | number | null; + raw?: string; +} + +export interface RegExpLiteral extends BaseNode, BaseExpression { + type: "Literal"; + value?: RegExp | null; + regex: { + pattern: string; + flags: string; + }; + raw?: string; +} + +export type UnaryOperator = + "-" | "+" | "!" | "~" | "typeof" | "void" | "delete"; + +export type BinaryOperator = + "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | + ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "**" | "|" | "^" | "&" | "in" | + "instanceof"; + +export type LogicalOperator = "||" | "&&"; + +export type AssignmentOperator = + "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "**=" | "<<=" | ">>=" | ">>>=" | + "|=" | "^=" | "&="; + +export type UpdateOperator = "++" | "--"; + +export interface ForOfStatement extends BaseForXStatement { + type: "ForOfStatement"; +} + +export interface Super extends BaseNode { + type: "Super"; +} + +export interface SpreadElement extends BaseNode { + type: "SpreadElement"; + argument: Expression; +} + +export interface ArrowFunctionExpression extends BaseExpression, BaseFunction { + type: "ArrowFunctionExpression"; + expression: boolean; + body: BlockStatement | Expression; +} + +export interface YieldExpression extends BaseExpression { + type: "YieldExpression"; + argument?: Expression | null; + delegate: boolean; +} + +export interface TemplateLiteral extends BaseExpression { + type: "TemplateLiteral"; + quasis: Array; + expressions: Array; +} + +export interface TaggedTemplateExpression extends BaseExpression { + type: "TaggedTemplateExpression"; + tag: Expression; + quasi: TemplateLiteral; +} + +export interface TemplateElement extends BaseNode { + type: "TemplateElement"; + tail: boolean; + value: { + cooked: string; + raw: string; + }; +} + +export interface AssignmentProperty extends Property { + value: Pattern; + kind: "init"; + method: boolean; // false +} + +export interface ObjectPattern extends BasePattern { + type: "ObjectPattern"; + properties: Array; +} + +export interface ArrayPattern extends BasePattern { + type: "ArrayPattern"; + elements: Array; +} + +export interface RestElement extends BasePattern { + type: "RestElement"; + argument: Pattern; +} + +export interface AssignmentPattern extends BasePattern { + type: "AssignmentPattern"; + left: Pattern; + right: Expression; +} + +export type Class = ClassDeclaration | ClassExpression; +interface BaseClass extends BaseNode { + superClass?: Expression | null; + body: ClassBody; +} + +export interface ClassBody extends BaseNode { + type: "ClassBody"; + body: Array; +} + +export interface MethodDefinition extends BaseNode { + type: "MethodDefinition"; + key: Expression; + value: FunctionExpression; + kind: "constructor" | "method" | "get" | "set"; + computed: boolean; + static: boolean; +} + +export interface ClassDeclaration extends BaseClass, BaseDeclaration { + type: "ClassDeclaration"; + /** It is null when a class declaration is a part of the `export default class` statement */ + id: Identifier | null; +} + +export interface ClassExpression extends BaseClass, BaseExpression { + type: "ClassExpression"; + id?: Identifier | null; +} + +export interface MetaProperty extends BaseExpression { + type: "MetaProperty"; + meta: Identifier; + property: Identifier; +} + +export type ModuleDeclaration = + ImportDeclaration | ExportNamedDeclaration | ExportDefaultDeclaration | + ExportAllDeclaration; +interface BaseModuleDeclaration extends BaseNode { } + +export type ModuleSpecifier = + ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | + ExportSpecifier; +interface BaseModuleSpecifier extends BaseNode { + local: Identifier; +} + +export interface ImportDeclaration extends BaseModuleDeclaration { + type: "ImportDeclaration"; + specifiers: Array; + source: Literal; +} + +export interface ImportSpecifier extends BaseModuleSpecifier { + type: "ImportSpecifier"; + imported: Identifier; +} + +export interface ImportDefaultSpecifier extends BaseModuleSpecifier { + type: "ImportDefaultSpecifier"; +} + +export interface ImportNamespaceSpecifier extends BaseModuleSpecifier { + type: "ImportNamespaceSpecifier"; +} + +export interface ExportNamedDeclaration extends BaseModuleDeclaration { + type: "ExportNamedDeclaration"; + declaration?: Declaration | null; + specifiers: Array; + source?: Literal | null; +} + +export interface ExportSpecifier extends BaseModuleSpecifier { + type: "ExportSpecifier"; + exported: Identifier; +} + +export interface ExportDefaultDeclaration extends BaseModuleDeclaration { + type: "ExportDefaultDeclaration"; + declaration: Declaration | Expression; +} + +export interface ExportAllDeclaration extends BaseModuleDeclaration { + type: "ExportAllDeclaration"; + source: Literal; +} + +export interface AwaitExpression extends BaseExpression { + type: "AwaitExpression"; + argument: Expression; +} diff --git a/frontend/node_modules/@types/estree/package.json b/frontend/node_modules/@types/estree/package.json new file mode 100644 index 0000000000000000000000000000000000000000..513aaf152a045300cbbcf3aa5b59678c1fce405d --- /dev/null +++ b/frontend/node_modules/@types/estree/package.json @@ -0,0 +1,22 @@ +{ + "name": "@types/estree", + "version": "0.0.39", + "description": "TypeScript definitions for ESTree AST specification", + "license": "MIT", + "contributors": [ + { + "name": "RReverser", + "url": "https://github.com/RReverser", + "githubUsername": "RReverser" + } + ], + "main": "", + "repository": { + "type": "git", + "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" + }, + "scripts": {}, + "dependencies": {}, + "typesPublisherContentHash": "427ba878ebb5570e15aab870f708720d146a1c4b272e4a9d9990db4d1d033170", + "typeScriptVersion": "2.0" +} \ No newline at end of file diff --git a/frontend/node_modules/@types/flatbuffers/LICENSE b/frontend/node_modules/@types/flatbuffers/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..21071075c24599ee98254f702bcfc504cdc275a6 --- /dev/null +++ b/frontend/node_modules/@types/flatbuffers/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/frontend/node_modules/@types/flatbuffers/README.md b/frontend/node_modules/@types/flatbuffers/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b7172fee291a2304b6c6454c4df52a409bedf4a3 --- /dev/null +++ b/frontend/node_modules/@types/flatbuffers/README.md @@ -0,0 +1,16 @@ +# Installation +> `npm install --save @types/flatbuffers` + +# Summary +This package contains type definitions for flatbuffers (http://google.github.io/flatbuffers/index.html). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/flatbuffers. + +### Additional Details + * Last updated: Fri, 03 Jan 2020 18:11:06 GMT + * Dependencies: none + * Global values: none + +# Credits +These definitions were written by Kamil Rojewski (kamil.rojewski@gmail.com), and Robin Giese (robin@grumpycorp.com). diff --git a/frontend/node_modules/@types/flatbuffers/index.d.ts b/frontend/node_modules/@types/flatbuffers/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f7bd3af6a857227d1dfd39760d69e05d06287d09 --- /dev/null +++ b/frontend/node_modules/@types/flatbuffers/index.d.ts @@ -0,0 +1,304 @@ +// Type definitions for flatbuffers 1.10 +// Project: http://google.github.io/flatbuffers/index.html +// Definitions by: Kamil Rojewski +// Robin Giese +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export { flatbuffers }; + +declare global { + namespace flatbuffers { + type Offset = number; + + interface Table { + bb: ByteBuffer|null; + bb_pos: number; + } + + const SIZEOF_SHORT: number; + const SIZEOF_INT: number; + const FILE_IDENTIFIER_LENGTH: number; + const SIZE_PREFIX_LENGTH: number; + + enum Encoding { UTF8_BYTES, UTF16_STRING } + + const int32: Int32Array; + const float32: Float32Array; + const float64: Float64Array; + const isLittleEndian: boolean; + + //////////////////////////////////////////////////////////////////////////////// + + class Long { + low: number; + high: number; + static ZERO: Long; + constructor(low: number, high: number); + toFloat64(): number; + equals(other: any): boolean; + static create(low: number, high: number): Long; + } + + //////////////////////////////////////////////////////////////////////////////// + + class Builder { + constructor(initial_size?: number); + + /** + * Reset all the state in this FlatBufferBuilder + * so it can be reused to construct another buffer. + */ + clear(): void; + + /** + * In order to save space, fields that are set to their default value + * don't get serialized into the buffer. Forcing defaults provides a + * way to manually disable this optimization. + * + * @param forceDefaults true always serializes default values + */ + forceDefaults(forceDefaults: boolean): void; + + /** + * Get the ByteBuffer representing the FlatBuffer. Only call this after you've + * called finish(). The actual data starts at the ByteBuffer's current position, + * not necessarily at 0. + */ + dataBuffer(): ByteBuffer; + + /** + * Get the ByteBuffer representing the FlatBuffer. Only call this after you've + * called finish(). The actual data starts at the ByteBuffer's current position, + * not necessarily at 0. + */ + asUint8Array(): Uint8Array; + + /** + * Prepare to write an element of `size` after `additional_bytes` have been + * written, e.g. if you write a string, you need to align such the int length + * field is aligned to 4 bytes, and the string data follows it directly. If all + * you need to do is alignment, `additional_bytes` will be 0. + * + * @param size This is the of the new element to write + * @param additional_bytes The padding size + */ + prep(size: number, additional_bytes: number): void; + + pad(byte_size: number): void; + + writeInt8(value: number): void; + writeInt16(value: number): void; + writeInt32(value: number): void; + writeInt64(value: Long): void; + writeFloat32(value: number): void; + writeFloat64(value: number): void; + + addInt8(value: number): void; + addInt16(value: number): void; + addInt32(value: number): void; + addInt64(value: Long): void; + addFloat32(value: number): void; + addFloat64(value: number): void; + addFieldInt8(voffset: number, value: number, defaultValue: number): void; + addFieldInt16(voffset: number, value: number, defaultValue: number): void; + addFieldInt32(voffset: number, value: number, defaultValue: number): void; + addFieldInt64(voffset: number, value: Long, defaultValue: Long): void; + addFieldFloat32(voffset: number, value: number, defaultValue: number): void; + addFieldFloat64(voffset: number, value: number, defaultValue: number): void; + + addFieldOffset(voffset: number, value: Offset, defaultValue: Offset): void; + + /** + * Structs are stored inline, so nothing additional is being added. `d` is always 0. + */ + addFieldStruct(voffset: number, value: Offset, defaultValue: Offset): void; + + /** + * Structures are always stored inline, they need to be created right + * where they're used. You'll get this assertion failure if you + * created it elsewhere. + * + * @param obj The offset of the created object + */ + nested(obj: Offset): void; + + /** + * Should not be creating any other object, string or vector + * while an object is being constructed + */ + notNested(): void; + + /** + * Set the current vtable at `voffset` to the current location in the buffer. + */ + slot(voffset: number): void; + + /** + * @returns Offset relative to the end of the buffer. + */ + offset(): Offset; + + /** + * Doubles the size of the backing ByteBuffer and copies the old data towards + * the end of the new buffer (since we build the buffer backwards). + * + * @param bb The current buffer with the existing data + * @returns A new byte buffer with the old data copied + * to it. The data is located at the end of the buffer. + */ + static growByteBuffer(bb: ByteBuffer): ByteBuffer; + + /** + * Adds on offset, relative to where it will be written. + * + * @param offset The offset to add + */ + addOffset(offset: Offset): void; + + /** + * Start encoding a new object in the buffer. Users will not usually need to + * call this directly. The FlatBuffers compiler will generate helper methods + * that call this method internally. + */ + startObject(numfields: number): void; + + /** + * Finish off writing the object that is under construction. + * + * @returns The offset to the object inside `dataBuffer` + */ + endObject(): Offset; + + finish(root_table: Offset, file_identifier?: string, size_prefix?: boolean): void; + finishSizePrefixed(root_table: Offset, file_identifier?: string): void; + + /** + * This checks a required field has been set in a given table that has + * just been constructed. + */ + requiredField(table: Offset, field: number): void; + + /** + * Start a new array/vector of objects. Users usually will not call + * this directly. The FlatBuffers compiler will create a start/end + * method for vector types in generated code. + * + * @param elem_size The size of each element in the array + * @param num_elems The number of elements in the array + * @param alignment The alignment of the array + */ + startVector(elem_size: number, num_elems: number, alignment: number): void; + + /** + * Finish off the creation of an array and all its elements. The array must be + * created with `startVector`. + * + * @returns The offset at which the newly created array + * starts. + */ + endVector(): Offset; + + /** + * Encode the string `s` in the buffer using UTF-8. If a Uint8Array is passed + * instead of a string, it is assumed to contain valid UTF-8 encoded data. + * + * @param s The string to encode + * @return The offset in the buffer where the encoded string starts + */ + createString(s: string|Uint8Array): Offset; + + /** + * Convenience function for creating Long objects. + */ + createLong(low: number, high: number): Long; + } + + //////////////////////////////////////////////////////////////////////////////// + + class ByteBuffer { + constructor(bytes: Uint8Array); + + static allocate(byte_size: number): ByteBuffer; + + clear(): void; + + bytes(): Uint8Array; + + position(): number; + + setPosition(position: number): void; + + capacity(): number; + + readInt8(offset: number): number; + readUint8(offset: number): number; + readInt16(offset: number): number; + readUint16(offset: number): number; + readInt32(offset: number): number; + readUint32(offset: number): number; + readInt64(offset: number): Long; + readUint64(offset: number): Long; + readFloat32(offset: number): number; + readFloat64(offset: number): number; + + writeInt8(offset: number, value: number): void; + writeUint8(offset: number, value: number): void; + writeInt16(offset: number, value: number): void; + writeUint16(offset: number, value: number): void; + writeInt32(offset: number, value: number): void; + writeUint32(offset: number, value: number): void; + writeInt64(offset: number, value: Long): void; + writeUint64(offset: number, value: Long): void; + writeFloat32(offset: number, value: number): void; + writeFloat64(offset: number, value: number): void; + + getBufferIdentifier(): string; + + /** + * Look up a field in the vtable, return an offset into the object, or 0 if the + * field is not present. + */ + __offset(bb_pos: number, vtable_offset: number): number; + + /** + * Initialize any Table-derived type to point to the union at the given offset. + */ + __union(t: T, offset: number): T; + + /** + * Create a JavaScript string from UTF-8 data stored inside the FlatBuffer. + * This allocates a new string and converts to wide chars upon each access. + * + * To avoid the conversion to UTF-16, pass flatbuffers.Encoding.UTF8_BYTES as + * the "optionalEncoding" argument. This is useful for avoiding conversion to + * and from UTF-16 when the data will just be packaged back up in another + * FlatBuffer later on. + * + * @param optionalEncoding Defaults to UTF16_STRING + */ + __string(offset: number, optionalEncoding?: Encoding): string|Uint8Array; + + /** + * Retrieve the relative offset stored at "offset" + */ + __indirect(offset: number): number; + + /** + * Get the start of data of a vector whose offset is stored at "offset" in this object. + */ + __vector(offset: number): number; + + /** + * Get the length of a vector whose offset is stored at "offset" in this object. + */ + __vector_len(offset: number): number; + + __has_identifier(ident: string): boolean; + + /** + * Convenience function for creating Long objects. + */ + createLong(low: number, high: number): Long; + } + } +} diff --git a/frontend/node_modules/@types/flatbuffers/package.json b/frontend/node_modules/@types/flatbuffers/package.json new file mode 100644 index 0000000000000000000000000000000000000000..7848d87a5b9cc876fea81524ecb2297e40061391 --- /dev/null +++ b/frontend/node_modules/@types/flatbuffers/package.json @@ -0,0 +1,27 @@ +{ + "name": "@types/flatbuffers", + "version": "1.10.0", + "description": "TypeScript definitions for flatbuffers", + "license": "MIT", + "contributors": [ + { + "name": "Kamil Rojewski", + "url": "kamil.rojewski@gmail.com" + }, + { + "name": "Robin Giese", + "url": "robin@grumpycorp.com" + } + ], + "main": "", + "types": "index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/flatbuffers" + }, + "scripts": {}, + "dependencies": {}, + "typesPublisherContentHash": "4a501959d37c0653420b35adb414b2e77419fe1025615d8f988758bf84582800", + "typeScriptVersion": "2.8" +} \ No newline at end of file diff --git a/frontend/node_modules/@types/node/LICENSE b/frontend/node_modules/@types/node/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..9e841e7a26e4eb057b24511e7b92d42b257a80e5 --- /dev/null +++ b/frontend/node_modules/@types/node/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/frontend/node_modules/@types/node/README.md b/frontend/node_modules/@types/node/README.md new file mode 100644 index 0000000000000000000000000000000000000000..eb97075650e47a440ca976666b25d8e93257d9d4 --- /dev/null +++ b/frontend/node_modules/@types/node/README.md @@ -0,0 +1,16 @@ +# Installation +> `npm install --save @types/node` + +# Summary +This package contains type definitions for Node.js (https://nodejs.org/). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node. + +### Additional Details + * Last updated: Mon, 25 Oct 2021 23:31:45 GMT + * Dependencies: none + * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require` + +# Credits +These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Surasak Chaisurin](https://github.com/Ryan-Willpower), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), and [wafuwafu13](https://github.com/wafuwafu13). diff --git a/frontend/node_modules/@types/node/assert.d.ts b/frontend/node_modules/@types/node/assert.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9f916c16bcc478d2f7b33e76f068e88ec3601d3c --- /dev/null +++ b/frontend/node_modules/@types/node/assert.d.ts @@ -0,0 +1,912 @@ +/** + * The `assert` module provides a set of assertion functions for verifying + * invariants. + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/assert.js) + */ +declare module 'assert' { + /** + * An alias of {@link ok}. + * @since v0.5.9 + * @param value The input that is checked for being truthy. + */ + function assert(value: unknown, message?: string | Error): asserts value; + namespace assert { + /** + * Indicates the failure of an assertion. All errors thrown by the `assert` module + * will be instances of the `AssertionError` class. + */ + class AssertionError extends Error { + actual: unknown; + expected: unknown; + operator: string; + generatedMessage: boolean; + code: 'ERR_ASSERTION'; + constructor(options?: { + /** If provided, the error message is set to this value. */ + message?: string | undefined; + /** The `actual` property on the error instance. */ + actual?: unknown | undefined; + /** The `expected` property on the error instance. */ + expected?: unknown | undefined; + /** The `operator` property on the error instance. */ + operator?: string | undefined; + /** If provided, the generated stack trace omits frames before this function. */ + // tslint:disable-next-line:ban-types + stackStartFn?: Function | undefined; + }); + } + /** + * This feature is currently experimental and behavior might still change. + * @since v14.2.0, v12.19.0 + * @experimental + */ + class CallTracker { + /** + * The wrapper function is expected to be called exactly `exact` times. If the + * function has not been called exactly `exact` times when `tracker.verify()` is called, then `tracker.verify()` will throw an + * error. + * + * ```js + * import assert from 'assert'; + * + * // Creates call tracker. + * const tracker = new assert.CallTracker(); + * + * function func() {} + * + * // Returns a function that wraps func() that must be called exact times + * // before tracker.verify(). + * const callsfunc = tracker.calls(func); + * ``` + * @since v14.2.0, v12.19.0 + * @param [fn='A no-op function'] + * @param [exact=1] + * @return that wraps `fn`. + */ + calls(exact?: number): () => void; + calls any>(fn?: Func, exact?: number): Func; + /** + * The arrays contains information about the expected and actual number of calls of + * the functions that have not been called the expected number of times. + * + * ```js + * import assert from 'assert'; + * + * // Creates call tracker. + * const tracker = new assert.CallTracker(); + * + * function func() {} + * + * function foo() {} + * + * // Returns a function that wraps func() that must be called exact times + * // before tracker.verify(). + * const callsfunc = tracker.calls(func, 2); + * + * // Returns an array containing information on callsfunc() + * tracker.report(); + * // [ + * // { + * // message: 'Expected the func function to be executed 2 time(s) but was + * // executed 0 time(s).', + * // actual: 0, + * // expected: 2, + * // operator: 'func', + * // stack: stack trace + * // } + * // ] + * ``` + * @since v14.2.0, v12.19.0 + * @return of objects containing information about the wrapper functions returned by `calls`. + */ + report(): CallTrackerReportInformation[]; + /** + * Iterates through the list of functions passed to `tracker.calls()` and will throw an error for functions that + * have not been called the expected number of times. + * + * ```js + * import assert from 'assert'; + * + * // Creates call tracker. + * const tracker = new assert.CallTracker(); + * + * function func() {} + * + * // Returns a function that wraps func() that must be called exact times + * // before tracker.verify(). + * const callsfunc = tracker.calls(func, 2); + * + * callsfunc(); + * + * // Will throw an error since callsfunc() was only called once. + * tracker.verify(); + * ``` + * @since v14.2.0, v12.19.0 + */ + verify(): void; + } + interface CallTrackerReportInformation { + message: string; + /** The actual number of times the function was called. */ + actual: number; + /** The number of times the function was expected to be called. */ + expected: number; + /** The name of the function that is wrapped. */ + operator: string; + /** A stack trace of the function. */ + stack: object; + } + type AssertPredicate = RegExp | (new () => object) | ((thrown: unknown) => boolean) | object | Error; + /** + * Throws an `AssertionError` with the provided error message or a default + * error message. If the `message` parameter is an instance of an `Error` then + * it will be thrown instead of the `AssertionError`. + * + * ```js + * import assert from 'assert/strict'; + * + * assert.fail(); + * // AssertionError [ERR_ASSERTION]: Failed + * + * assert.fail('boom'); + * // AssertionError [ERR_ASSERTION]: boom + * + * assert.fail(new TypeError('need array')); + * // TypeError: need array + * ``` + * + * Using `assert.fail()` with more than two arguments is possible but deprecated. + * See below for further details. + * @since v0.1.21 + * @param [message='Failed'] + */ + function fail(message?: string | Error): never; + /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */ + function fail( + actual: unknown, + expected: unknown, + message?: string | Error, + operator?: string, + // tslint:disable-next-line:ban-types + stackStartFn?: Function + ): never; + /** + * Tests if `value` is truthy. It is equivalent to`assert.equal(!!value, true, message)`. + * + * If `value` is not truthy, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is `undefined`, a default + * error message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`. + * If no arguments are passed in at all `message` will be set to the string:`` 'No value argument passed to `assert.ok()`' ``. + * + * Be aware that in the `repl` the error message will be different to the one + * thrown in a file! See below for further details. + * + * ```js + * import assert from 'assert/strict'; + * + * assert.ok(true); + * // OK + * assert.ok(1); + * // OK + * + * assert.ok(); + * // AssertionError: No value argument passed to `assert.ok()` + * + * assert.ok(false, 'it\'s false'); + * // AssertionError: it's false + * + * // In the repl: + * assert.ok(typeof 123 === 'string'); + * // AssertionError: false == true + * + * // In a file (e.g. test.js): + * assert.ok(typeof 123 === 'string'); + * // AssertionError: The expression evaluated to a falsy value: + * // + * // assert.ok(typeof 123 === 'string') + * + * assert.ok(false); + * // AssertionError: The expression evaluated to a falsy value: + * // + * // assert.ok(false) + * + * assert.ok(0); + * // AssertionError: The expression evaluated to a falsy value: + * // + * // assert.ok(0) + * ``` + * + * ```js + * import assert from 'assert/strict'; + * + * // Using `assert()` works the same: + * assert(0); + * // AssertionError: The expression evaluated to a falsy value: + * // + * // assert(0) + * ``` + * @since v0.1.21 + */ + function ok(value: unknown, message?: string | Error): asserts value; + /** + * **Strict assertion mode** + * + * An alias of {@link strictEqual}. + * + * **Legacy assertion mode** + * + * > Stability: 3 - Legacy: Use {@link strictEqual} instead. + * + * Tests shallow, coercive equality between the `actual` and `expected` parameters + * using the [Abstract Equality Comparison](https://tc39.github.io/ecma262/#sec-abstract-equality-comparison) ( `==` ). `NaN` is special handled + * and treated as being identical in case both sides are `NaN`. + * + * ```js + * import assert from 'assert'; + * + * assert.equal(1, 1); + * // OK, 1 == 1 + * assert.equal(1, '1'); + * // OK, 1 == '1' + * assert.equal(NaN, NaN); + * // OK + * + * assert.equal(1, 2); + * // AssertionError: 1 == 2 + * assert.equal({ a: { b: 1 } }, { a: { b: 1 } }); + * // AssertionError: { a: { b: 1 } } == { a: { b: 1 } } + * ``` + * + * If the values are not equal, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is undefined, a default + * error message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`. + * @since v0.1.21 + */ + function equal(actual: unknown, expected: unknown, message?: string | Error): void; + /** + * **Strict assertion mode** + * + * An alias of {@link notStrictEqual}. + * + * **Legacy assertion mode** + * + * > Stability: 3 - Legacy: Use {@link notStrictEqual} instead. + * + * Tests shallow, coercive inequality with the [Abstract Equality Comparison](https://tc39.github.io/ecma262/#sec-abstract-equality-comparison)(`!=` ). `NaN` is special handled and treated as + * being identical in case both + * sides are `NaN`. + * + * ```js + * import assert from 'assert'; + * + * assert.notEqual(1, 2); + * // OK + * + * assert.notEqual(1, 1); + * // AssertionError: 1 != 1 + * + * assert.notEqual(1, '1'); + * // AssertionError: 1 != '1' + * ``` + * + * If the values are equal, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is undefined, a default error + * message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`. + * @since v0.1.21 + */ + function notEqual(actual: unknown, expected: unknown, message?: string | Error): void; + /** + * **Strict assertion mode** + * + * An alias of {@link deepStrictEqual}. + * + * **Legacy assertion mode** + * + * > Stability: 3 - Legacy: Use {@link deepStrictEqual} instead. + * + * Tests for deep equality between the `actual` and `expected` parameters. Consider + * using {@link deepStrictEqual} instead. {@link deepEqual} can have + * surprising results. + * + * _Deep equality_ means that the enumerable "own" properties of child objects + * are also recursively evaluated by the following rules. + * @since v0.1.21 + */ + function deepEqual(actual: unknown, expected: unknown, message?: string | Error): void; + /** + * **Strict assertion mode** + * + * An alias of {@link notDeepStrictEqual}. + * + * **Legacy assertion mode** + * + * > Stability: 3 - Legacy: Use {@link notDeepStrictEqual} instead. + * + * Tests for any deep inequality. Opposite of {@link deepEqual}. + * + * ```js + * import assert from 'assert'; + * + * const obj1 = { + * a: { + * b: 1 + * } + * }; + * const obj2 = { + * a: { + * b: 2 + * } + * }; + * const obj3 = { + * a: { + * b: 1 + * } + * }; + * const obj4 = Object.create(obj1); + * + * assert.notDeepEqual(obj1, obj1); + * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } } + * + * assert.notDeepEqual(obj1, obj2); + * // OK + * + * assert.notDeepEqual(obj1, obj3); + * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } } + * + * assert.notDeepEqual(obj1, obj4); + * // OK + * ``` + * + * If the values are deeply equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a default + * error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown + * instead of the `AssertionError`. + * @since v0.1.21 + */ + function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void; + /** + * Tests strict equality between the `actual` and `expected` parameters as + * determined by the [SameValue Comparison](https://tc39.github.io/ecma262/#sec-samevalue). + * + * ```js + * import assert from 'assert/strict'; + * + * assert.strictEqual(1, 2); + * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal: + * // + * // 1 !== 2 + * + * assert.strictEqual(1, 1); + * // OK + * + * assert.strictEqual('Hello foobar', 'Hello World!'); + * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal: + * // + actual - expected + * // + * // + 'Hello foobar' + * // - 'Hello World!' + * // ^ + * + * const apples = 1; + * const oranges = 2; + * assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`); + * // AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2 + * + * assert.strictEqual(1, '1', new TypeError('Inputs are not identical')); + * // TypeError: Inputs are not identical + * ``` + * + * If the values are not strictly equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a + * default error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown + * instead of the `AssertionError`. + * @since v0.1.21 + */ + function strictEqual(actual: unknown, expected: T, message?: string | Error): asserts actual is T; + /** + * Tests strict inequality between the `actual` and `expected` parameters as + * determined by the [SameValue Comparison](https://tc39.github.io/ecma262/#sec-samevalue). + * + * ```js + * import assert from 'assert/strict'; + * + * assert.notStrictEqual(1, 2); + * // OK + * + * assert.notStrictEqual(1, 1); + * // AssertionError [ERR_ASSERTION]: Expected "actual" to be strictly unequal to: + * // + * // 1 + * + * assert.notStrictEqual(1, '1'); + * // OK + * ``` + * + * If the values are strictly equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a + * default error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown + * instead of the `AssertionError`. + * @since v0.1.21 + */ + function notStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void; + /** + * Tests for deep equality between the `actual` and `expected` parameters. + * "Deep" equality means that the enumerable "own" properties of child objects + * are recursively evaluated also by the following rules. + * @since v1.2.0 + */ + function deepStrictEqual(actual: unknown, expected: T, message?: string | Error): asserts actual is T; + /** + * Tests for deep strict inequality. Opposite of {@link deepStrictEqual}. + * + * ```js + * import assert from 'assert/strict'; + * + * assert.notDeepStrictEqual({ a: 1 }, { a: '1' }); + * // OK + * ``` + * + * If the values are deeply and strictly equal, an `AssertionError` is thrown + * with a `message` property set equal to the value of the `message` parameter. If + * the `message` parameter is undefined, a default error message is assigned. If + * the `message` parameter is an instance of an `Error` then it will be thrown + * instead of the `AssertionError`. + * @since v1.2.0 + */ + function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void; + /** + * Expects the function `fn` to throw an error. + * + * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), + * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function, + * a validation object where each property will be tested for strict deep equality, + * or an instance of error where each property will be tested for strict deep + * equality including the non-enumerable `message` and `name` properties. When + * using an object, it is also possible to use a regular expression, when + * validating against a string property. See below for examples. + * + * If specified, `message` will be appended to the message provided by the`AssertionError` if the `fn` call fails to throw or in case the error validation + * fails. + * + * Custom validation object/error instance: + * + * ```js + * import assert from 'assert/strict'; + * + * const err = new TypeError('Wrong value'); + * err.code = 404; + * err.foo = 'bar'; + * err.info = { + * nested: true, + * baz: 'text' + * }; + * err.reg = /abc/i; + * + * assert.throws( + * () => { + * throw err; + * }, + * { + * name: 'TypeError', + * message: 'Wrong value', + * info: { + * nested: true, + * baz: 'text' + * } + * // Only properties on the validation object will be tested for. + * // Using nested objects requires all properties to be present. Otherwise + * // the validation is going to fail. + * } + * ); + * + * // Using regular expressions to validate error properties: + * throws( + * () => { + * throw err; + * }, + * { + * // The `name` and `message` properties are strings and using regular + * // expressions on those will match against the string. If they fail, an + * // error is thrown. + * name: /^TypeError$/, + * message: /Wrong/, + * foo: 'bar', + * info: { + * nested: true, + * // It is not possible to use regular expressions for nested properties! + * baz: 'text' + * }, + * // The `reg` property contains a regular expression and only if the + * // validation object contains an identical regular expression, it is going + * // to pass. + * reg: /abc/i + * } + * ); + * + * // Fails due to the different `message` and `name` properties: + * throws( + * () => { + * const otherErr = new Error('Not found'); + * // Copy all enumerable properties from `err` to `otherErr`. + * for (const [key, value] of Object.entries(err)) { + * otherErr[key] = value; + * } + * throw otherErr; + * }, + * // The error's `message` and `name` properties will also be checked when using + * // an error as validation object. + * err + * ); + * ``` + * + * Validate instanceof using constructor: + * + * ```js + * import assert from 'assert/strict'; + * + * assert.throws( + * () => { + * throw new Error('Wrong value'); + * }, + * Error + * ); + * ``` + * + * Validate error message using [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions): + * + * Using a regular expression runs `.toString` on the error object, and will + * therefore also include the error name. + * + * ```js + * import assert from 'assert/strict'; + * + * assert.throws( + * () => { + * throw new Error('Wrong value'); + * }, + * /^Error: Wrong value$/ + * ); + * ``` + * + * Custom error validation: + * + * The function must return `true` to indicate all internal validations passed. + * It will otherwise fail with an `AssertionError`. + * + * ```js + * import assert from 'assert/strict'; + * + * assert.throws( + * () => { + * throw new Error('Wrong value'); + * }, + * (err) => { + * assert(err instanceof Error); + * assert(/value/.test(err)); + * // Avoid returning anything from validation functions besides `true`. + * // Otherwise, it's not clear what part of the validation failed. Instead, + * // throw an error about the specific validation that failed (as done in this + * // example) and add as much helpful debugging information to that error as + * // possible. + * return true; + * }, + * 'unexpected error' + * ); + * ``` + * + * `error` cannot be a string. If a string is provided as the second + * argument, then `error` is assumed to be omitted and the string will be used for`message` instead. This can lead to easy-to-miss mistakes. Using the same + * message as the thrown error message is going to result in an`ERR_AMBIGUOUS_ARGUMENT` error. Please read the example below carefully if using + * a string as the second argument gets considered: + * + * ```js + * import assert from 'assert/strict'; + * + * function throwingFirst() { + * throw new Error('First'); + * } + * + * function throwingSecond() { + * throw new Error('Second'); + * } + * + * function notThrowing() {} + * + * // The second argument is a string and the input function threw an Error. + * // The first case will not throw as it does not match for the error message + * // thrown by the input function! + * assert.throws(throwingFirst, 'Second'); + * // In the next example the message has no benefit over the message from the + * // error and since it is not clear if the user intended to actually match + * // against the error message, Node.js throws an `ERR_AMBIGUOUS_ARGUMENT` error. + * assert.throws(throwingSecond, 'Second'); + * // TypeError [ERR_AMBIGUOUS_ARGUMENT] + * + * // The string is only used (as message) in case the function does not throw: + * assert.throws(notThrowing, 'Second'); + * // AssertionError [ERR_ASSERTION]: Missing expected exception: Second + * + * // If it was intended to match for the error message do this instead: + * // It does not throw because the error messages match. + * assert.throws(throwingSecond, /Second$/); + * + * // If the error message does not match, an AssertionError is thrown. + * assert.throws(throwingFirst, /Second$/); + * // AssertionError [ERR_ASSERTION] + * ``` + * + * Due to the confusing error-prone notation, avoid a string as the second + * argument. + * @since v0.1.21 + */ + function throws(block: () => unknown, message?: string | Error): void; + function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void; + /** + * Asserts that the function `fn` does not throw an error. + * + * Using `assert.doesNotThrow()` is actually not useful because there + * is no benefit in catching an error and then rethrowing it. Instead, consider + * adding a comment next to the specific code path that should not throw and keep + * error messages as expressive as possible. + * + * When `assert.doesNotThrow()` is called, it will immediately call the `fn`function. + * + * If an error is thrown and it is the same type as that specified by the `error`parameter, then an `AssertionError` is thrown. If the error is of a + * different type, or if the `error` parameter is undefined, the error is + * propagated back to the caller. + * + * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), + * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) or a validation + * function. See {@link throws} for more details. + * + * The following, for instance, will throw the `TypeError` because there is no + * matching error type in the assertion: + * + * ```js + * import assert from 'assert/strict'; + * + * assert.doesNotThrow( + * () => { + * throw new TypeError('Wrong value'); + * }, + * SyntaxError + * ); + * ``` + * + * However, the following will result in an `AssertionError` with the message + * 'Got unwanted exception...': + * + * ```js + * import assert from 'assert/strict'; + * + * assert.doesNotThrow( + * () => { + * throw new TypeError('Wrong value'); + * }, + * TypeError + * ); + * ``` + * + * If an `AssertionError` is thrown and a value is provided for the `message`parameter, the value of `message` will be appended to the `AssertionError` message: + * + * ```js + * import assert from 'assert/strict'; + * + * assert.doesNotThrow( + * () => { + * throw new TypeError('Wrong value'); + * }, + * /Wrong value/, + * 'Whoops' + * ); + * // Throws: AssertionError: Got unwanted exception: Whoops + * ``` + * @since v0.1.21 + */ + function doesNotThrow(block: () => unknown, message?: string | Error): void; + function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void; + /** + * Throws `value` if `value` is not `undefined` or `null`. This is useful when + * testing the `error` argument in callbacks. The stack trace contains all frames + * from the error passed to `ifError()` including the potential new frames for`ifError()` itself. + * + * ```js + * import assert from 'assert/strict'; + * + * assert.ifError(null); + * // OK + * assert.ifError(0); + * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 0 + * assert.ifError('error'); + * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 'error' + * assert.ifError(new Error()); + * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Error + * + * // Create some random error frames. + * let err; + * (function errorFrame() { + * err = new Error('test error'); + * })(); + * + * (function ifErrorFrame() { + * assert.ifError(err); + * })(); + * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error + * // at ifErrorFrame + * // at errorFrame + * ``` + * @since v0.1.97 + */ + function ifError(value: unknown): asserts value is null | undefined; + /** + * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately + * calls the function and awaits the returned promise to complete. It will then + * check that the promise is rejected. + * + * If `asyncFn` is a function and it throws an error synchronously,`assert.rejects()` will return a rejected `Promise` with that error. If the + * function does not return a promise, `assert.rejects()` will return a rejected`Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases the error + * handler is skipped. + * + * Besides the async nature to await the completion behaves identically to {@link throws}. + * + * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), + * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function, + * an object where each property will be tested for, or an instance of error where + * each property will be tested for including the non-enumerable `message` and`name` properties. + * + * If specified, `message` will be the message provided by the `AssertionError` if the `asyncFn` fails to reject. + * + * ```js + * import assert from 'assert/strict'; + * + * await assert.rejects( + * async () => { + * throw new TypeError('Wrong value'); + * }, + * { + * name: 'TypeError', + * message: 'Wrong value' + * } + * ); + * ``` + * + * ```js + * import assert from 'assert/strict'; + * + * await assert.rejects( + * async () => { + * throw new TypeError('Wrong value'); + * }, + * (err) => { + * assert.strictEqual(err.name, 'TypeError'); + * assert.strictEqual(err.message, 'Wrong value'); + * return true; + * } + * ); + * ``` + * + * ```js + * import assert from 'assert/strict'; + * + * assert.rejects( + * Promise.reject(new Error('Wrong value')), + * Error + * ).then(() => { + * // ... + * }); + * ``` + * + * `error` cannot be a string. If a string is provided as the second + * argument, then `error` is assumed to be omitted and the string will be used for`message` instead. This can lead to easy-to-miss mistakes. Please read the + * example in {@link throws} carefully if using a string as the second + * argument gets considered. + * @since v10.0.0 + */ + function rejects(block: (() => Promise) | Promise, message?: string | Error): Promise; + function rejects(block: (() => Promise) | Promise, error: AssertPredicate, message?: string | Error): Promise; + /** + * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately + * calls the function and awaits the returned promise to complete. It will then + * check that the promise is not rejected. + * + * If `asyncFn` is a function and it throws an error synchronously,`assert.doesNotReject()` will return a rejected `Promise` with that error. If + * the function does not return a promise, `assert.doesNotReject()` will return a + * rejected `Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases + * the error handler is skipped. + * + * Using `assert.doesNotReject()` is actually not useful because there is little + * benefit in catching a rejection and then rejecting it again. Instead, consider + * adding a comment next to the specific code path that should not reject and keep + * error messages as expressive as possible. + * + * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), + * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) or a validation + * function. See {@link throws} for more details. + * + * Besides the async nature to await the completion behaves identically to {@link doesNotThrow}. + * + * ```js + * import assert from 'assert/strict'; + * + * await assert.doesNotReject( + * async () => { + * throw new TypeError('Wrong value'); + * }, + * SyntaxError + * ); + * ``` + * + * ```js + * import assert from 'assert/strict'; + * + * assert.doesNotReject(Promise.reject(new TypeError('Wrong value'))) + * .then(() => { + * // ... + * }); + * ``` + * @since v10.0.0 + */ + function doesNotReject(block: (() => Promise) | Promise, message?: string | Error): Promise; + function doesNotReject(block: (() => Promise) | Promise, error: AssertPredicate, message?: string | Error): Promise; + /** + * Expects the `string` input to match the regular expression. + * + * ```js + * import assert from 'assert/strict'; + * + * assert.match('I will fail', /pass/); + * // AssertionError [ERR_ASSERTION]: The input did not match the regular ... + * + * assert.match(123, /pass/); + * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string. + * + * assert.match('I will pass', /pass/); + * // OK + * ``` + * + * If the values do not match, or if the `string` argument is of another type than`string`, an `AssertionError` is thrown with a `message` property set equal + * to the value of the `message` parameter. If the `message` parameter is + * undefined, a default error message is assigned. If the `message` parameter is an + * instance of an `Error` then it will be thrown instead of the `AssertionError`. + * @since v13.6.0, v12.16.0 + */ + function match(value: string, regExp: RegExp, message?: string | Error): void; + /** + * Expects the `string` input not to match the regular expression. + * + * ```js + * import assert from 'assert/strict'; + * + * assert.doesNotMatch('I will fail', /fail/); + * // AssertionError [ERR_ASSERTION]: The input was expected to not match the ... + * + * assert.doesNotMatch(123, /pass/); + * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string. + * + * assert.doesNotMatch('I will pass', /different/); + * // OK + * ``` + * + * If the values do match, or if the `string` argument is of another type than`string`, an `AssertionError` is thrown with a `message` property set equal + * to the value of the `message` parameter. If the `message` parameter is + * undefined, a default error message is assigned. If the `message` parameter is an + * instance of an `Error` then it will be thrown instead of the `AssertionError`. + * @since v13.6.0, v12.16.0 + */ + function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void; + const strict: Omit & { + (value: unknown, message?: string | Error): asserts value; + equal: typeof strictEqual; + notEqual: typeof notStrictEqual; + deepEqual: typeof deepStrictEqual; + notDeepEqual: typeof notDeepStrictEqual; + // Mapped types and assertion functions are incompatible? + // TS2775: Assertions require every name in the call target + // to be declared with an explicit type annotation. + ok: typeof ok; + strictEqual: typeof strictEqual; + deepStrictEqual: typeof deepStrictEqual; + ifError: typeof ifError; + strict: typeof strict; + }; + } + export = assert; +} +declare module 'node:assert' { + import assert = require('assert'); + export = assert; +} diff --git a/frontend/node_modules/@types/node/assert/strict.d.ts b/frontend/node_modules/@types/node/assert/strict.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b4319b974861f6cad84b745485af55264b13c3d8 --- /dev/null +++ b/frontend/node_modules/@types/node/assert/strict.d.ts @@ -0,0 +1,8 @@ +declare module 'assert/strict' { + import { strict } from 'node:assert'; + export = strict; +} +declare module 'node:assert/strict' { + import { strict } from 'node:assert'; + export = strict; +} diff --git a/frontend/node_modules/@types/node/async_hooks.d.ts b/frontend/node_modules/@types/node/async_hooks.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..35b9be2c1153f64c8d2c54415c7cc80d73957ed2 --- /dev/null +++ b/frontend/node_modules/@types/node/async_hooks.d.ts @@ -0,0 +1,497 @@ +/** + * The `async_hooks` module provides an API to track asynchronous resources. It + * can be accessed using: + * + * ```js + * import async_hooks from 'async_hooks'; + * ``` + * @experimental + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/async_hooks.js) + */ +declare module 'async_hooks' { + /** + * ```js + * import { executionAsyncId } from 'async_hooks'; + * + * console.log(executionAsyncId()); // 1 - bootstrap + * fs.open(path, 'r', (err, fd) => { + * console.log(executionAsyncId()); // 6 - open() + * }); + * ``` + * + * The ID returned from `executionAsyncId()` is related to execution timing, not + * causality (which is covered by `triggerAsyncId()`): + * + * ```js + * const server = net.createServer((conn) => { + * // Returns the ID of the server, not of the new connection, because the + * // callback runs in the execution scope of the server's MakeCallback(). + * async_hooks.executionAsyncId(); + * + * }).listen(port, () => { + * // Returns the ID of a TickObject (process.nextTick()) because all + * // callbacks passed to .listen() are wrapped in a nextTick(). + * async_hooks.executionAsyncId(); + * }); + * ``` + * + * Promise contexts may not get precise `executionAsyncIds` by default. + * See the section on `promise execution tracking`. + * @since v8.1.0 + * @return The `asyncId` of the current execution context. Useful to track when something calls. + */ + function executionAsyncId(): number; + /** + * Resource objects returned by `executionAsyncResource()` are most often internal + * Node.js handle objects with undocumented APIs. Using any functions or properties + * on the object is likely to crash your application and should be avoided. + * + * Using `executionAsyncResource()` in the top-level execution context will + * return an empty object as there is no handle or request object to use, + * but having an object representing the top-level can be helpful. + * + * ```js + * import { open } from 'fs'; + * import { executionAsyncId, executionAsyncResource } from 'async_hooks'; + * + * console.log(executionAsyncId(), executionAsyncResource()); // 1 {} + * open(new URL(import.meta.url), 'r', (err, fd) => { + * console.log(executionAsyncId(), executionAsyncResource()); // 7 FSReqWrap + * }); + * ``` + * + * This can be used to implement continuation local storage without the + * use of a tracking `Map` to store the metadata: + * + * ```js + * import { createServer } from 'http'; + * import { + * executionAsyncId, + * executionAsyncResource, + * createHook + * } from 'async_hooks'; + * const sym = Symbol('state'); // Private symbol to avoid pollution + * + * createHook({ + * init(asyncId, type, triggerAsyncId, resource) { + * const cr = executionAsyncResource(); + * if (cr) { + * resource[sym] = cr[sym]; + * } + * } + * }).enable(); + * + * const server = createServer((req, res) => { + * executionAsyncResource()[sym] = { state: req.url }; + * setTimeout(function() { + * res.end(JSON.stringify(executionAsyncResource()[sym])); + * }, 100); + * }).listen(3000); + * ``` + * @since v13.9.0, v12.17.0 + * @return The resource representing the current execution. Useful to store data within the resource. + */ + function executionAsyncResource(): object; + /** + * ```js + * const server = net.createServer((conn) => { + * // The resource that caused (or triggered) this callback to be called + * // was that of the new connection. Thus the return value of triggerAsyncId() + * // is the asyncId of "conn". + * async_hooks.triggerAsyncId(); + * + * }).listen(port, () => { + * // Even though all callbacks passed to .listen() are wrapped in a nextTick() + * // the callback itself exists because the call to the server's .listen() + * // was made. So the return value would be the ID of the server. + * async_hooks.triggerAsyncId(); + * }); + * ``` + * + * Promise contexts may not get valid `triggerAsyncId`s by default. See + * the section on `promise execution tracking`. + * @return The ID of the resource responsible for calling the callback that is currently being executed. + */ + function triggerAsyncId(): number; + interface HookCallbacks { + /** + * Called when a class is constructed that has the possibility to emit an asynchronous event. + * @param asyncId a unique ID for the async resource + * @param type the type of the async resource + * @param triggerAsyncId the unique ID of the async resource in whose execution context this async resource was created + * @param resource reference to the resource representing the async operation, needs to be released during destroy + */ + init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void; + /** + * When an asynchronous operation is initiated or completes a callback is called to notify the user. + * The before callback is called just before said callback is executed. + * @param asyncId the unique identifier assigned to the resource about to execute the callback. + */ + before?(asyncId: number): void; + /** + * Called immediately after the callback specified in before is completed. + * @param asyncId the unique identifier assigned to the resource which has executed the callback. + */ + after?(asyncId: number): void; + /** + * Called when a promise has resolve() called. This may not be in the same execution id + * as the promise itself. + * @param asyncId the unique id for the promise that was resolve()d. + */ + promiseResolve?(asyncId: number): void; + /** + * Called after the resource corresponding to asyncId is destroyed + * @param asyncId a unique ID for the async resource + */ + destroy?(asyncId: number): void; + } + interface AsyncHook { + /** + * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop. + */ + enable(): this; + /** + * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled. + */ + disable(): this; + } + /** + * Registers functions to be called for different lifetime events of each async + * operation. + * + * The callbacks `init()`/`before()`/`after()`/`destroy()` are called for the + * respective asynchronous event during a resource's lifetime. + * + * All callbacks are optional. For example, if only resource cleanup needs to + * be tracked, then only the `destroy` callback needs to be passed. The + * specifics of all functions that can be passed to `callbacks` is in the `Hook Callbacks` section. + * + * ```js + * import { createHook } from 'async_hooks'; + * + * const asyncHook = createHook({ + * init(asyncId, type, triggerAsyncId, resource) { }, + * destroy(asyncId) { } + * }); + * ``` + * + * The callbacks will be inherited via the prototype chain: + * + * ```js + * class MyAsyncCallbacks { + * init(asyncId, type, triggerAsyncId, resource) { } + * destroy(asyncId) {} + * } + * + * class MyAddedCallbacks extends MyAsyncCallbacks { + * before(asyncId) { } + * after(asyncId) { } + * } + * + * const asyncHook = async_hooks.createHook(new MyAddedCallbacks()); + * ``` + * + * Because promises are asynchronous resources whose lifecycle is tracked + * via the async hooks mechanism, the `init()`, `before()`, `after()`, and`destroy()` callbacks _must not_ be async functions that return promises. + * @since v8.1.0 + * @param callbacks The `Hook Callbacks` to register + * @return Instance used for disabling and enabling hooks + */ + function createHook(callbacks: HookCallbacks): AsyncHook; + interface AsyncResourceOptions { + /** + * The ID of the execution context that created this async event. + * @default executionAsyncId() + */ + triggerAsyncId?: number | undefined; + /** + * Disables automatic `emitDestroy` when the object is garbage collected. + * This usually does not need to be set (even if `emitDestroy` is called + * manually), unless the resource's `asyncId` is retrieved and the + * sensitive API's `emitDestroy` is called with it. + * @default false + */ + requireManualDestroy?: boolean | undefined; + } + /** + * The class `AsyncResource` is designed to be extended by the embedder's async + * resources. Using this, users can easily trigger the lifetime events of their + * own resources. + * + * The `init` hook will trigger when an `AsyncResource` is instantiated. + * + * The following is an overview of the `AsyncResource` API. + * + * ```js + * import { AsyncResource, executionAsyncId } from 'async_hooks'; + * + * // AsyncResource() is meant to be extended. Instantiating a + * // new AsyncResource() also triggers init. If triggerAsyncId is omitted then + * // async_hook.executionAsyncId() is used. + * const asyncResource = new AsyncResource( + * type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false } + * ); + * + * // Run a function in the execution context of the resource. This will + * // * establish the context of the resource + * // * trigger the AsyncHooks before callbacks + * // * call the provided function `fn` with the supplied arguments + * // * trigger the AsyncHooks after callbacks + * // * restore the original execution context + * asyncResource.runInAsyncScope(fn, thisArg, ...args); + * + * // Call AsyncHooks destroy callbacks. + * asyncResource.emitDestroy(); + * + * // Return the unique ID assigned to the AsyncResource instance. + * asyncResource.asyncId(); + * + * // Return the trigger ID for the AsyncResource instance. + * asyncResource.triggerAsyncId(); + * ``` + */ + class AsyncResource { + /** + * AsyncResource() is meant to be extended. Instantiating a + * new AsyncResource() also triggers init. If triggerAsyncId is omitted then + * async_hook.executionAsyncId() is used. + * @param type The type of async event. + * @param triggerAsyncId The ID of the execution context that created + * this async event (default: `executionAsyncId()`), or an + * AsyncResourceOptions object (since 9.3) + */ + constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions); + /** + * Binds the given function to the current execution context. + * + * The returned function will have an `asyncResource` property referencing + * the `AsyncResource` to which the function is bound. + * @since v14.8.0, v12.19.0 + * @param fn The function to bind to the current execution context. + * @param type An optional name to associate with the underlying `AsyncResource`. + */ + static bind any, ThisArg>( + fn: Func, + type?: string, + thisArg?: ThisArg + ): Func & { + asyncResource: AsyncResource; + }; + /** + * Binds the given function to execute to this `AsyncResource`'s scope. + * + * The returned function will have an `asyncResource` property referencing + * the `AsyncResource` to which the function is bound. + * @since v14.8.0, v12.19.0 + * @param fn The function to bind to the current `AsyncResource`. + */ + bind any>( + fn: Func + ): Func & { + asyncResource: AsyncResource; + }; + /** + * Call the provided function with the provided arguments in the execution context + * of the async resource. This will establish the context, trigger the AsyncHooks + * before callbacks, call the function, trigger the AsyncHooks after callbacks, and + * then restore the original execution context. + * @since v9.6.0 + * @param fn The function to call in the execution context of this async resource. + * @param thisArg The receiver to be used for the function call. + * @param args Optional arguments to pass to the function. + */ + runInAsyncScope(fn: (this: This, ...args: any[]) => Result, thisArg?: This, ...args: any[]): Result; + /** + * Call all `destroy` hooks. This should only ever be called once. An error will + * be thrown if it is called more than once. This **must** be manually called. If + * the resource is left to be collected by the GC then the `destroy` hooks will + * never be called. + * @return A reference to `asyncResource`. + */ + emitDestroy(): this; + /** + * @return The unique `asyncId` assigned to the resource. + */ + asyncId(): number; + /** + * + * @return The same `triggerAsyncId` that is passed to the `AsyncResource` constructor. + */ + triggerAsyncId(): number; + } + /** + * This class creates stores that stay coherent through asynchronous operations. + * + * While you can create your own implementation on top of the `async_hooks` module,`AsyncLocalStorage` should be preferred as it is a performant and memory safe + * implementation that involves significant optimizations that are non-obvious to + * implement. + * + * The following example uses `AsyncLocalStorage` to build a simple logger + * that assigns IDs to incoming HTTP requests and includes them in messages + * logged within each request. + * + * ```js + * import http from 'http'; + * import { AsyncLocalStorage } from 'async_hooks'; + * + * const asyncLocalStorage = new AsyncLocalStorage(); + * + * function logWithId(msg) { + * const id = asyncLocalStorage.getStore(); + * console.log(`${id !== undefined ? id : '-'}:`, msg); + * } + * + * let idSeq = 0; + * http.createServer((req, res) => { + * asyncLocalStorage.run(idSeq++, () => { + * logWithId('start'); + * // Imagine any chain of async operations here + * setImmediate(() => { + * logWithId('finish'); + * res.end(); + * }); + * }); + * }).listen(8080); + * + * http.get('http://localhost:8080'); + * http.get('http://localhost:8080'); + * // Prints: + * // 0: start + * // 1: start + * // 0: finish + * // 1: finish + * ``` + * + * Each instance of `AsyncLocalStorage` maintains an independent storage context. + * Multiple instances can safely exist simultaneously without risk of interfering + * with each other data. + * @since v13.10.0, v12.17.0 + */ + class AsyncLocalStorage { + /** + * Disables the instance of `AsyncLocalStorage`. All subsequent calls + * to `asyncLocalStorage.getStore()` will return `undefined` until`asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again. + * + * When calling `asyncLocalStorage.disable()`, all current contexts linked to the + * instance will be exited. + * + * Calling `asyncLocalStorage.disable()` is required before the`asyncLocalStorage` can be garbage collected. This does not apply to stores + * provided by the `asyncLocalStorage`, as those objects are garbage collected + * along with the corresponding async resources. + * + * Use this method when the `asyncLocalStorage` is not in use anymore + * in the current process. + * @since v13.10.0, v12.17.0 + * @experimental + */ + disable(): void; + /** + * Returns the current store. + * If called outside of an asynchronous context initialized by + * calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it + * returns `undefined`. + * @since v13.10.0, v12.17.0 + */ + getStore(): T | undefined; + /** + * Runs a function synchronously within a context and returns its + * return value. The store is not accessible outside of the callback function or + * the asynchronous operations created within the callback. + * + * The optional `args` are passed to the callback function. + * + * If the callback function throws an error, the error is thrown by `run()` too. + * The stacktrace is not impacted by this call and the context is exited. + * + * Example: + * + * ```js + * const store = { id: 2 }; + * try { + * asyncLocalStorage.run(store, () => { + * asyncLocalStorage.getStore(); // Returns the store object + * throw new Error(); + * }); + * } catch (e) { + * asyncLocalStorage.getStore(); // Returns undefined + * // The error will be caught here + * } + * ``` + * @since v13.10.0, v12.17.0 + */ + run(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R; + /** + * Runs a function synchronously outside of a context and returns its + * return value. The store is not accessible within the callback function or + * the asynchronous operations created within the callback. Any `getStore()`call done within the callback function will always return `undefined`. + * + * The optional `args` are passed to the callback function. + * + * If the callback function throws an error, the error is thrown by `exit()` too. + * The stacktrace is not impacted by this call and the context is re-entered. + * + * Example: + * + * ```js + * // Within a call to run + * try { + * asyncLocalStorage.getStore(); // Returns the store object or value + * asyncLocalStorage.exit(() => { + * asyncLocalStorage.getStore(); // Returns undefined + * throw new Error(); + * }); + * } catch (e) { + * asyncLocalStorage.getStore(); // Returns the same object or value + * // The error will be caught here + * } + * ``` + * @since v13.10.0, v12.17.0 + * @experimental + */ + exit(callback: (...args: TArgs) => R, ...args: TArgs): R; + /** + * Transitions into the context for the remainder of the current + * synchronous execution and then persists the store through any following + * asynchronous calls. + * + * Example: + * + * ```js + * const store = { id: 1 }; + * // Replaces previous store with the given store object + * asyncLocalStorage.enterWith(store); + * asyncLocalStorage.getStore(); // Returns the store object + * someAsyncOperation(() => { + * asyncLocalStorage.getStore(); // Returns the same object + * }); + * ``` + * + * This transition will continue for the _entire_ synchronous execution. + * This means that if, for example, the context is entered within an event + * handler subsequent event handlers will also run within that context unless + * specifically bound to another context with an `AsyncResource`. That is why`run()` should be preferred over `enterWith()` unless there are strong reasons + * to use the latter method. + * + * ```js + * const store = { id: 1 }; + * + * emitter.on('my-event', () => { + * asyncLocalStorage.enterWith(store); + * }); + * emitter.on('my-event', () => { + * asyncLocalStorage.getStore(); // Returns the same object + * }); + * + * asyncLocalStorage.getStore(); // Returns undefined + * emitter.emit('my-event'); + * asyncLocalStorage.getStore(); // Returns the same object + * ``` + * @since v13.11.0, v12.17.0 + * @experimental + */ + enterWith(store: T): void; + } +} +declare module 'node:async_hooks' { + export * from 'async_hooks'; +} diff --git a/frontend/node_modules/@types/node/buffer.d.ts b/frontend/node_modules/@types/node/buffer.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..cfcd33e0a0e3255ccf0077b9d8d1d1238b811dab --- /dev/null +++ b/frontend/node_modules/@types/node/buffer.d.ts @@ -0,0 +1,2142 @@ +/** + * `Buffer` objects are used to represent a fixed-length sequence of bytes. Many + * Node.js APIs support `Buffer`s. + * + * The `Buffer` class is a subclass of JavaScript's [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) class and + * extends it with methods that cover additional use cases. Node.js APIs accept + * plain [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) s wherever `Buffer`s are supported as well. + * + * While the `Buffer` class is available within the global scope, it is still + * recommended to explicitly reference it via an import or require statement. + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Creates a zero-filled Buffer of length 10. + * const buf1 = Buffer.alloc(10); + * + * // Creates a Buffer of length 10, + * // filled with bytes which all have the value `1`. + * const buf2 = Buffer.alloc(10, 1); + * + * // Creates an uninitialized buffer of length 10. + * // This is faster than calling Buffer.alloc() but the returned + * // Buffer instance might contain old data that needs to be + * // overwritten using fill(), write(), or other functions that fill the Buffer's + * // contents. + * const buf3 = Buffer.allocUnsafe(10); + * + * // Creates a Buffer containing the bytes [1, 2, 3]. + * const buf4 = Buffer.from([1, 2, 3]); + * + * // Creates a Buffer containing the bytes [1, 1, 1, 1] – the entries + * // are all truncated using `(value & 255)` to fit into the range 0–255. + * const buf5 = Buffer.from([257, 257.5, -255, '1']); + * + * // Creates a Buffer containing the UTF-8-encoded bytes for the string 'tést': + * // [0x74, 0xc3, 0xa9, 0x73, 0x74] (in hexadecimal notation) + * // [116, 195, 169, 115, 116] (in decimal notation) + * const buf6 = Buffer.from('tést'); + * + * // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74]. + * const buf7 = Buffer.from('tést', 'latin1'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/buffer.js) + */ +declare module 'buffer' { + import { BinaryLike } from 'node:crypto'; + export const INSPECT_MAX_BYTES: number; + export const kMaxLength: number; + export const kStringMaxLength: number; + export const constants: { + MAX_LENGTH: number; + MAX_STRING_LENGTH: number; + }; + export type TranscodeEncoding = 'ascii' | 'utf8' | 'utf16le' | 'ucs2' | 'latin1' | 'binary'; + /** + * Re-encodes the given `Buffer` or `Uint8Array` instance from one character + * encoding to another. Returns a new `Buffer` instance. + * + * Throws if the `fromEnc` or `toEnc` specify invalid character encodings or if + * conversion from `fromEnc` to `toEnc` is not permitted. + * + * Encodings supported by `buffer.transcode()` are: `'ascii'`, `'utf8'`,`'utf16le'`, `'ucs2'`, `'latin1'`, and `'binary'`. + * + * The transcoding process will use substitution characters if a given byte + * sequence cannot be adequately represented in the target encoding. For instance: + * + * ```js + * import { Buffer, transcode } from 'buffer'; + * + * const newBuf = transcode(Buffer.from('€'), 'utf8', 'ascii'); + * console.log(newBuf.toString('ascii')); + * // Prints: '?' + * ``` + * + * Because the Euro (`€`) sign is not representable in US-ASCII, it is replaced + * with `?` in the transcoded `Buffer`. + * @since v7.1.0 + * @param source A `Buffer` or `Uint8Array` instance. + * @param fromEnc The current encoding. + * @param toEnc To target encoding. + */ + export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer; + export const SlowBuffer: { + /** @deprecated since v6.0.0, use `Buffer.allocUnsafeSlow()` */ + new (size: number): Buffer; + prototype: Buffer; + }; + /** + * Resolves a `'blob:nodedata:...'` an associated `Blob` object registered using + * a prior call to `URL.createObjectURL()`. + * @since v16.7.0 + * @experimental + * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`. + */ + export function resolveObjectURL(id: string): Blob | undefined; + export { Buffer }; + /** + * @experimental + */ + export interface BlobOptions { + /** + * @default 'utf8' + */ + encoding?: BufferEncoding | undefined; + /** + * The Blob content-type. The intent is for `type` to convey + * the MIME media type of the data, however no validation of the type format + * is performed. + */ + type?: string | undefined; + } + /** + * A [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) encapsulates immutable, raw data that can be safely shared across + * multiple worker threads. + * @since v15.7.0 + * @experimental + */ + export class Blob { + /** + * The total size of the `Blob` in bytes. + * @since v15.7.0 + */ + readonly size: number; + /** + * The content-type of the `Blob`. + * @since v15.7.0 + */ + readonly type: string; + /** + * Creates a new `Blob` object containing a concatenation of the given sources. + * + * {ArrayBuffer}, {TypedArray}, {DataView}, and {Buffer} sources are copied into + * the 'Blob' and can therefore be safely modified after the 'Blob' is created. + * + * String sources are also copied into the `Blob`. + */ + constructor(sources: Array, options?: BlobOptions); + /** + * Returns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of + * the `Blob` data. + * @since v15.7.0 + */ + arrayBuffer(): Promise; + /** + * Creates and returns a new `Blob` containing a subset of this `Blob` objects + * data. The original `Blob` is not altered. + * @since v15.7.0 + * @param start The starting index. + * @param end The ending index. + * @param type The content-type for the new `Blob` + */ + slice(start?: number, end?: number, type?: string): Blob; + /** + * Returns a promise that fulfills with the contents of the `Blob` decoded as a + * UTF-8 string. + * @since v15.7.0 + */ + text(): Promise; + /** + * Returns a new `ReadableStream` that allows the content of the `Blob` to be read. + * @since v16.7.0 + */ + stream(): unknown; // pending web streams types + } + export import atob = globalThis.atob; + export import btoa = globalThis.btoa; + global { + // Buffer class + type BufferEncoding = 'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'base64url' | 'latin1' | 'binary' | 'hex'; + type WithImplicitCoercion = + | T + | { + valueOf(): T; + }; + /** + * Raw data is stored in instances of the Buffer class. + * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. + * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'base64url'|'binary'(deprecated)|'hex' + */ + interface BufferConstructor { + /** + * Allocates a new buffer containing the given {str}. + * + * @param str String to store in buffer. + * @param encoding encoding to use, optional. Default is 'utf8' + * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead. + */ + new (str: string, encoding?: BufferEncoding): Buffer; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`). + */ + new (size: number): Buffer; + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. + */ + new (array: Uint8Array): Buffer; + /** + * Produces a Buffer backed by the same allocated memory as + * the given {ArrayBuffer}/{SharedArrayBuffer}. + * + * + * @param arrayBuffer The ArrayBuffer with which to share memory. + * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead. + */ + new (arrayBuffer: ArrayBuffer | SharedArrayBuffer): Buffer; + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. + */ + new (array: ReadonlyArray): Buffer; + /** + * Copies the passed {buffer} data onto a new {Buffer} instance. + * + * @param buffer The buffer to copy. + * @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead. + */ + new (buffer: Buffer): Buffer; + /** + * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`. + * Array entries outside that range will be truncated to fit into it. + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'. + * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]); + * ``` + * + * A `TypeError` will be thrown if `array` is not an `Array` or another type + * appropriate for `Buffer.from()` variants. + * + * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal`Buffer` pool like `Buffer.allocUnsafe()` does. + * @since v5.10.0 + */ + from(arrayBuffer: WithImplicitCoercion, byteOffset?: number, length?: number): Buffer; + /** + * Creates a new Buffer using the passed {data} + * @param data data to create a new Buffer + */ + from(data: Uint8Array | ReadonlyArray): Buffer; + from(data: WithImplicitCoercion | string>): Buffer; + /** + * Creates a new Buffer containing the given JavaScript string {str}. + * If provided, the {encoding} parameter identifies the character encoding. + * If not provided, {encoding} defaults to 'utf8'. + */ + from( + str: + | WithImplicitCoercion + | { + [Symbol.toPrimitive](hint: 'string'): string; + }, + encoding?: BufferEncoding + ): Buffer; + /** + * Creates a new Buffer using the passed {data} + * @param values to create a new Buffer + */ + of(...items: number[]): Buffer; + /** + * Returns `true` if `obj` is a `Buffer`, `false` otherwise. + * + * ```js + * import { Buffer } from 'buffer'; + * + * Buffer.isBuffer(Buffer.alloc(10)); // true + * Buffer.isBuffer(Buffer.from('foo')); // true + * Buffer.isBuffer('a string'); // false + * Buffer.isBuffer([]); // false + * Buffer.isBuffer(new Uint8Array(1024)); // false + * ``` + * @since v0.1.101 + */ + isBuffer(obj: any): obj is Buffer; + /** + * Returns `true` if `encoding` is the name of a supported character encoding, + * or `false` otherwise. + * + * ```js + * import { Buffer } from 'buffer'; + * + * console.log(Buffer.isEncoding('utf8')); + * // Prints: true + * + * console.log(Buffer.isEncoding('hex')); + * // Prints: true + * + * console.log(Buffer.isEncoding('utf/8')); + * // Prints: false + * + * console.log(Buffer.isEncoding('')); + * // Prints: false + * ``` + * @since v0.9.1 + * @param encoding A character encoding name to check. + */ + isEncoding(encoding: string): encoding is BufferEncoding; + /** + * Returns the byte length of a string when encoded using `encoding`. + * This is not the same as [`String.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length), which does not account + * for the encoding that is used to convert the string into bytes. + * + * For `'base64'`, `'base64url'`, and `'hex'`, this function assumes valid input. + * For strings that contain non-base64/hex-encoded data (e.g. whitespace), the + * return value might be greater than the length of a `Buffer` created from the + * string. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const str = '\u00bd + \u00bc = \u00be'; + * + * console.log(`${str}: ${str.length} characters, ` + + * `${Buffer.byteLength(str, 'utf8')} bytes`); + * // Prints: ½ + ¼ = ¾: 9 characters, 12 bytes + * ``` + * + * When `string` is a + * `Buffer`/[`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)/[`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/- + * Reference/Global_Objects/TypedArray)/[`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)/[`SharedArrayBuffer`](https://develop- + * er.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer), the byte length as reported by `.byteLength`is returned. + * @since v0.1.90 + * @param string A value to calculate the length of. + * @param [encoding='utf8'] If `string` is a string, this is its encoding. + * @return The number of bytes contained within `string`. + */ + byteLength(string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer, encoding?: BufferEncoding): number; + /** + * Returns a new `Buffer` which is the result of concatenating all the `Buffer`instances in the `list` together. + * + * If the list has no items, or if the `totalLength` is 0, then a new zero-length`Buffer` is returned. + * + * If `totalLength` is not provided, it is calculated from the `Buffer` instances + * in `list` by adding their lengths. + * + * If `totalLength` is provided, it is coerced to an unsigned integer. If the + * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is + * truncated to `totalLength`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Create a single `Buffer` from a list of three `Buffer` instances. + * + * const buf1 = Buffer.alloc(10); + * const buf2 = Buffer.alloc(14); + * const buf3 = Buffer.alloc(18); + * const totalLength = buf1.length + buf2.length + buf3.length; + * + * console.log(totalLength); + * // Prints: 42 + * + * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength); + * + * console.log(bufA); + * // Prints: + * console.log(bufA.length); + * // Prints: 42 + * ``` + * + * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does. + * @since v0.7.11 + * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate. + * @param totalLength Total length of the `Buffer` instances in `list` when concatenated. + */ + concat(list: ReadonlyArray, totalLength?: number): Buffer; + /** + * Compares `buf1` to `buf2`, typically for the purpose of sorting arrays of`Buffer` instances. This is equivalent to calling `buf1.compare(buf2)`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf1 = Buffer.from('1234'); + * const buf2 = Buffer.from('0123'); + * const arr = [buf1, buf2]; + * + * console.log(arr.sort(Buffer.compare)); + * // Prints: [ , ] + * // (This result is equal to: [buf2, buf1].) + * ``` + * @since v0.11.13 + * @return Either `-1`, `0`, or `1`, depending on the result of the comparison. See `compare` for details. + */ + compare(buf1: Uint8Array, buf2: Uint8Array): number; + /** + * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.alloc(5); + * + * console.log(buf); + * // Prints: + * ``` + * + * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_INVALID_ARG_VALUE` is thrown. + * + * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.alloc(5, 'a'); + * + * console.log(buf); + * // Prints: + * ``` + * + * If both `fill` and `encoding` are specified, the allocated `Buffer` will be + * initialized by calling `buf.fill(fill, encoding)`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); + * + * console.log(buf); + * // Prints: + * ``` + * + * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance + * contents will never contain sensitive data from previous allocations, including + * data that might not have been allocated for `Buffer`s. + * + * A `TypeError` will be thrown if `size` is not a number. + * @since v5.10.0 + * @param size The desired length of the new `Buffer`. + * @param [fill=0] A value to pre-fill the new `Buffer` with. + * @param [encoding='utf8'] If `fill` is a string, this is its encoding. + */ + alloc(size: number, fill?: string | Buffer | number, encoding?: BufferEncoding): Buffer; + /** + * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_INVALID_ARG_VALUE` is thrown. + * + * The underlying memory for `Buffer` instances created in this way is _not_ + * _initialized_. The contents of the newly created `Buffer` are unknown and_may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(10); + * + * console.log(buf); + * // Prints (contents may vary): + * + * buf.fill(0); + * + * console.log(buf); + * // Prints: + * ``` + * + * A `TypeError` will be thrown if `size` is not a number. + * + * The `Buffer` module pre-allocates an internal `Buffer` instance of + * size `Buffer.poolSize` that is used as a pool for the fast allocation of new`Buffer` instances created using `Buffer.allocUnsafe()`,`Buffer.from(array)`, `Buffer.concat()`, and the + * deprecated`new Buffer(size)` constructor only when `size` is less than or equal + * to `Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). + * + * Use of this pre-allocated internal memory pool is a key difference between + * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. + * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less + * than or equal to half `Buffer.poolSize`. The + * difference is subtle but can be important when an application requires the + * additional performance that `Buffer.allocUnsafe()` provides. + * @since v5.10.0 + * @param size The desired length of the new `Buffer`. + */ + allocUnsafe(size: number): Buffer; + /** + * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_INVALID_ARG_VALUE` is thrown. A zero-length `Buffer` is created + * if `size` is 0. + * + * The underlying memory for `Buffer` instances created in this way is _not_ + * _initialized_. The contents of the newly created `Buffer` are unknown and_may contain sensitive data_. Use `buf.fill(0)` to initialize + * such `Buffer` instances with zeroes. + * + * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, + * allocations under 4 KB are sliced from a single pre-allocated `Buffer`. This + * allows applications to avoid the garbage collection overhead of creating many + * individually allocated `Buffer` instances. This approach improves both + * performance and memory usage by eliminating the need to track and clean up as + * many individual `ArrayBuffer` objects. + * + * However, in the case where a developer may need to retain a small chunk of + * memory from a pool for an indeterminate amount of time, it may be appropriate + * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and + * then copying out the relevant bits. + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Need to keep around a few small chunks of memory. + * const store = []; + * + * socket.on('readable', () => { + * let data; + * while (null !== (data = readable.read())) { + * // Allocate for retained data. + * const sb = Buffer.allocUnsafeSlow(10); + * + * // Copy the data into the new allocation. + * data.copy(sb, 0, 0, 10); + * + * store.push(sb); + * } + * }); + * ``` + * + * A `TypeError` will be thrown if `size` is not a number. + * @since v5.12.0 + * @param size The desired length of the new `Buffer`. + */ + allocUnsafeSlow(size: number): Buffer; + /** + * This is the size (in bytes) of pre-allocated internal `Buffer` instances used + * for pooling. This value may be modified. + * @since v0.11.3 + */ + poolSize: number; + } + interface Buffer extends Uint8Array { + /** + * Writes `string` to `buf` at `offset` according to the character encoding in`encoding`. The `length` parameter is the number of bytes to write. If `buf` did + * not contain enough space to fit the entire string, only part of `string` will be + * written. However, partially encoded characters will not be written. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.alloc(256); + * + * const len = buf.write('\u00bd + \u00bc = \u00be', 0); + * + * console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`); + * // Prints: 12 bytes: ½ + ¼ = ¾ + * + * const buffer = Buffer.alloc(10); + * + * const length = buffer.write('abcd', 8); + * + * console.log(`${length} bytes: ${buffer.toString('utf8', 8, 10)}`); + * // Prints: 2 bytes : ab + * ``` + * @since v0.1.90 + * @param string String to write to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write `string`. + * @param [length=buf.length - offset] Maximum number of bytes to write (written bytes will not exceed `buf.length - offset`). + * @param [encoding='utf8'] The character encoding of `string`. + * @return Number of bytes written. + */ + write(string: string, encoding?: BufferEncoding): number; + write(string: string, offset: number, encoding?: BufferEncoding): number; + write(string: string, offset: number, length: number, encoding?: BufferEncoding): number; + /** + * Decodes `buf` to a string according to the specified character encoding in`encoding`. `start` and `end` may be passed to decode only a subset of `buf`. + * + * If `encoding` is `'utf8'` and a byte sequence in the input is not valid UTF-8, + * then each invalid byte is replaced with the replacement character `U+FFFD`. + * + * The maximum length of a string instance (in UTF-16 code units) is available + * as {@link constants.MAX_STRING_LENGTH}. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf1 = Buffer.allocUnsafe(26); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf1[i] = i + 97; + * } + * + * console.log(buf1.toString('utf8')); + * // Prints: abcdefghijklmnopqrstuvwxyz + * console.log(buf1.toString('utf8', 0, 5)); + * // Prints: abcde + * + * const buf2 = Buffer.from('tést'); + * + * console.log(buf2.toString('hex')); + * // Prints: 74c3a97374 + * console.log(buf2.toString('utf8', 0, 3)); + * // Prints: té + * console.log(buf2.toString(undefined, 0, 3)); + * // Prints: té + * ``` + * @since v0.1.90 + * @param [encoding='utf8'] The character encoding to use. + * @param [start=0] The byte offset to start decoding at. + * @param [end=buf.length] The byte offset to stop decoding at (not inclusive). + */ + toString(encoding?: BufferEncoding, start?: number, end?: number): string; + /** + * Returns a JSON representation of `buf`. [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) implicitly calls + * this function when stringifying a `Buffer` instance. + * + * `Buffer.from()` accepts objects in the format returned from this method. + * In particular, `Buffer.from(buf.toJSON())` works like `Buffer.from(buf)`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5]); + * const json = JSON.stringify(buf); + * + * console.log(json); + * // Prints: {"type":"Buffer","data":[1,2,3,4,5]} + * + * const copy = JSON.parse(json, (key, value) => { + * return value && value.type === 'Buffer' ? + * Buffer.from(value) : + * value; + * }); + * + * console.log(copy); + * // Prints: + * ``` + * @since v0.9.2 + */ + toJSON(): { + type: 'Buffer'; + data: number[]; + }; + /** + * Returns `true` if both `buf` and `otherBuffer` have exactly the same bytes,`false` otherwise. Equivalent to `buf.compare(otherBuffer) === 0`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf1 = Buffer.from('ABC'); + * const buf2 = Buffer.from('414243', 'hex'); + * const buf3 = Buffer.from('ABCD'); + * + * console.log(buf1.equals(buf2)); + * // Prints: true + * console.log(buf1.equals(buf3)); + * // Prints: false + * ``` + * @since v0.11.13 + * @param otherBuffer A `Buffer` or {@link Uint8Array} with which to compare `buf`. + */ + equals(otherBuffer: Uint8Array): boolean; + /** + * Compares `buf` with `target` and returns a number indicating whether `buf`comes before, after, or is the same as `target` in sort order. + * Comparison is based on the actual sequence of bytes in each `Buffer`. + * + * * `0` is returned if `target` is the same as `buf` + * * `1` is returned if `target` should come _before_`buf` when sorted. + * * `-1` is returned if `target` should come _after_`buf` when sorted. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf1 = Buffer.from('ABC'); + * const buf2 = Buffer.from('BCD'); + * const buf3 = Buffer.from('ABCD'); + * + * console.log(buf1.compare(buf1)); + * // Prints: 0 + * console.log(buf1.compare(buf2)); + * // Prints: -1 + * console.log(buf1.compare(buf3)); + * // Prints: -1 + * console.log(buf2.compare(buf1)); + * // Prints: 1 + * console.log(buf2.compare(buf3)); + * // Prints: 1 + * console.log([buf1, buf2, buf3].sort(Buffer.compare)); + * // Prints: [ , , ] + * // (This result is equal to: [buf1, buf3, buf2].) + * ``` + * + * The optional `targetStart`, `targetEnd`, `sourceStart`, and `sourceEnd`arguments can be used to limit the comparison to specific ranges within `target`and `buf` respectively. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf1 = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8, 9]); + * const buf2 = Buffer.from([5, 6, 7, 8, 9, 1, 2, 3, 4]); + * + * console.log(buf1.compare(buf2, 5, 9, 0, 4)); + * // Prints: 0 + * console.log(buf1.compare(buf2, 0, 6, 4)); + * // Prints: -1 + * console.log(buf1.compare(buf2, 5, 6, 5)); + * // Prints: 1 + * ``` + * + * `ERR_OUT_OF_RANGE` is thrown if `targetStart < 0`, `sourceStart < 0`,`targetEnd > target.byteLength`, or `sourceEnd > source.byteLength`. + * @since v0.11.13 + * @param target A `Buffer` or {@link Uint8Array} with which to compare `buf`. + * @param [targetStart=0] The offset within `target` at which to begin comparison. + * @param [targetEnd=target.length] The offset within `target` at which to end comparison (not inclusive). + * @param [sourceStart=0] The offset within `buf` at which to begin comparison. + * @param [sourceEnd=buf.length] The offset within `buf` at which to end comparison (not inclusive). + */ + compare(target: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; + /** + * Copies data from a region of `buf` to a region in `target`, even if the `target`memory region overlaps with `buf`. + * + * [`TypedArray.prototype.set()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) performs the same operation, and is available + * for all TypedArrays, including Node.js `Buffer`s, although it takes + * different function arguments. + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Create two `Buffer` instances. + * const buf1 = Buffer.allocUnsafe(26); + * const buf2 = Buffer.allocUnsafe(26).fill('!'); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf1[i] = i + 97; + * } + * + * // Copy `buf1` bytes 16 through 19 into `buf2` starting at byte 8 of `buf2`. + * buf1.copy(buf2, 8, 16, 20); + * // This is equivalent to: + * // buf2.set(buf1.subarray(16, 20), 8); + * + * console.log(buf2.toString('ascii', 0, 25)); + * // Prints: !!!!!!!!qrst!!!!!!!!!!!!! + * ``` + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Create a `Buffer` and copy data from one region to an overlapping region + * // within the same `Buffer`. + * + * const buf = Buffer.allocUnsafe(26); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf[i] = i + 97; + * } + * + * buf.copy(buf, 0, 4, 10); + * + * console.log(buf.toString()); + * // Prints: efghijghijklmnopqrstuvwxyz + * ``` + * @since v0.1.90 + * @param target A `Buffer` or {@link Uint8Array} to copy into. + * @param [targetStart=0] The offset within `target` at which to begin writing. + * @param [sourceStart=0] The offset within `buf` from which to begin copying. + * @param [sourceEnd=buf.length] The offset within `buf` at which to stop copying (not inclusive). + * @return The number of bytes copied. + */ + copy(target: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; + /** + * Returns a new `Buffer` that references the same memory as the original, but + * offset and cropped by the `start` and `end` indices. + * + * This is the same behavior as `buf.subarray()`. + * + * This method is not compatible with the `Uint8Array.prototype.slice()`, + * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from('buffer'); + * + * const copiedBuf = Uint8Array.prototype.slice.call(buf); + * copiedBuf[0]++; + * console.log(copiedBuf.toString()); + * // Prints: cuffer + * + * console.log(buf.toString()); + * // Prints: buffer + * ``` + * @since v0.3.0 + * @param [start=0] Where the new `Buffer` will start. + * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). + */ + slice(start?: number, end?: number): Buffer; + /** + * Returns a new `Buffer` that references the same memory as the original, but + * offset and cropped by the `start` and `end` indices. + * + * Specifying `end` greater than `buf.length` will return the same result as + * that of `end` equal to `buf.length`. + * + * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray). + * + * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap. + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte + * // from the original `Buffer`. + * + * const buf1 = Buffer.allocUnsafe(26); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf1[i] = i + 97; + * } + * + * const buf2 = buf1.subarray(0, 3); + * + * console.log(buf2.toString('ascii', 0, buf2.length)); + * // Prints: abc + * + * buf1[0] = 33; + * + * console.log(buf2.toString('ascii', 0, buf2.length)); + * // Prints: !bc + * ``` + * + * Specifying negative indexes causes the slice to be generated relative to the + * end of `buf` rather than the beginning. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from('buffer'); + * + * console.log(buf.subarray(-6, -1).toString()); + * // Prints: buffe + * // (Equivalent to buf.subarray(0, 5).) + * + * console.log(buf.subarray(-6, -2).toString()); + * // Prints: buff + * // (Equivalent to buf.subarray(0, 4).) + * + * console.log(buf.subarray(-5, -2).toString()); + * // Prints: uff + * // (Equivalent to buf.subarray(1, 4).) + * ``` + * @since v3.0.0 + * @param [start=0] Where the new `Buffer` will start. + * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). + */ + subarray(start?: number, end?: number): Buffer; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. + * + * `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeBigInt64BE(0x0102030405060708n, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v12.0.0, v10.20.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeBigInt64BE(value: bigint, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. + * + * `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeBigInt64LE(0x0102030405060708n, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v12.0.0, v10.20.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeBigInt64LE(value: bigint, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. + * + * This function is also available under the `writeBigUint64BE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeBigUInt64BE(0xdecafafecacefaden, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v12.0.0, v10.20.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeBigUInt64BE(value: bigint, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeBigUInt64LE(0xdecafafecacefaden, 0); + * + * console.log(buf); + * // Prints: + * ``` + * + * This function is also available under the `writeBigUint64LE` alias. + * @since v12.0.0, v10.20.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeBigUInt64LE(value: bigint, offset?: number): number; + /** + * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined + * when `value` is anything other than an unsigned integer. + * + * This function is also available under the `writeUintLE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(6); + * + * buf.writeUIntLE(0x1234567890ab, 0, 6); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. + * @return `offset` plus the number of bytes written. + */ + writeUIntLE(value: number, offset: number, byteLength: number): number; + /** + * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined + * when `value` is anything other than an unsigned integer. + * + * This function is also available under the `writeUintBE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(6); + * + * buf.writeUIntBE(0x1234567890ab, 0, 6); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. + * @return `offset` plus the number of bytes written. + */ + writeUIntBE(value: number, offset: number, byteLength: number): number; + /** + * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined + * when `value` is anything other than a signed integer. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(6); + * + * buf.writeIntLE(0x1234567890ab, 0, 6); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. + * @return `offset` plus the number of bytes written. + */ + writeIntLE(value: number, offset: number, byteLength: number): number; + /** + * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined when`value` is anything other than a + * signed integer. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(6); + * + * buf.writeIntBE(0x1234567890ab, 0, 6); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. + * @return `offset` plus the number of bytes written. + */ + writeIntBE(value: number, offset: number, byteLength: number): number; + /** + * Reads an unsigned, big-endian 64-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readBigUint64BE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]); + * + * console.log(buf.readBigUInt64BE(0)); + * // Prints: 4294967295n + * ``` + * @since v12.0.0, v10.20.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. + */ + readBigUInt64BE(offset?: number): bigint; + /** + * Reads an unsigned, little-endian 64-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readBigUint64LE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]); + * + * console.log(buf.readBigUInt64LE(0)); + * // Prints: 18446744069414584320n + * ``` + * @since v12.0.0, v10.20.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. + */ + readBigUInt64LE(offset?: number): bigint; + /** + * Reads a signed, big-endian 64-bit integer from `buf` at the specified `offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed + * values. + * @since v12.0.0, v10.20.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. + */ + readBigInt64BE(offset?: number): bigint; + /** + * Reads a signed, little-endian 64-bit integer from `buf` at the specified`offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed + * values. + * @since v12.0.0, v10.20.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. + */ + readBigInt64LE(offset?: number): bigint; + /** + * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as an unsigned, little-endian integer supporting + * up to 48 bits of accuracy. + * + * This function is also available under the `readUintLE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); + * + * console.log(buf.readUIntLE(0, 6).toString(16)); + * // Prints: ab9078563412 + * ``` + * @since v0.11.15 + * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. + */ + readUIntLE(offset: number, byteLength: number): number; + /** + * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as an unsigned big-endian integer supporting + * up to 48 bits of accuracy. + * + * This function is also available under the `readUintBE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); + * + * console.log(buf.readUIntBE(0, 6).toString(16)); + * // Prints: 1234567890ab + * console.log(buf.readUIntBE(1, 6).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.11.15 + * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. + */ + readUIntBE(offset: number, byteLength: number): number; + /** + * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as a little-endian, two's complement signed value + * supporting up to 48 bits of accuracy. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); + * + * console.log(buf.readIntLE(0, 6).toString(16)); + * // Prints: -546f87a9cbee + * ``` + * @since v0.11.15 + * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. + */ + readIntLE(offset: number, byteLength: number): number; + /** + * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as a big-endian, two's complement signed value + * supporting up to 48 bits of accuracy. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); + * + * console.log(buf.readIntBE(0, 6).toString(16)); + * // Prints: 1234567890ab + * console.log(buf.readIntBE(1, 6).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * console.log(buf.readIntBE(1, 0).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.11.15 + * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. + */ + readIntBE(offset: number, byteLength: number): number; + /** + * Reads an unsigned 8-bit integer from `buf` at the specified `offset`. + * + * This function is also available under the `readUint8` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([1, -2]); + * + * console.log(buf.readUInt8(0)); + * // Prints: 1 + * console.log(buf.readUInt8(1)); + * // Prints: 254 + * console.log(buf.readUInt8(2)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`. + */ + readUInt8(offset?: number): number; + /** + * Reads an unsigned, little-endian 16-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readUint16LE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56]); + * + * console.log(buf.readUInt16LE(0).toString(16)); + * // Prints: 3412 + * console.log(buf.readUInt16LE(1).toString(16)); + * // Prints: 5634 + * console.log(buf.readUInt16LE(2).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. + */ + readUInt16LE(offset?: number): number; + /** + * Reads an unsigned, big-endian 16-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readUint16BE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56]); + * + * console.log(buf.readUInt16BE(0).toString(16)); + * // Prints: 1234 + * console.log(buf.readUInt16BE(1).toString(16)); + * // Prints: 3456 + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. + */ + readUInt16BE(offset?: number): number; + /** + * Reads an unsigned, little-endian 32-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readUint32LE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]); + * + * console.log(buf.readUInt32LE(0).toString(16)); + * // Prints: 78563412 + * console.log(buf.readUInt32LE(1).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readUInt32LE(offset?: number): number; + /** + * Reads an unsigned, big-endian 32-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readUint32BE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]); + * + * console.log(buf.readUInt32BE(0).toString(16)); + * // Prints: 12345678 + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readUInt32BE(offset?: number): number; + /** + * Reads a signed 8-bit integer from `buf` at the specified `offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([-1, 5]); + * + * console.log(buf.readInt8(0)); + * // Prints: -1 + * console.log(buf.readInt8(1)); + * // Prints: 5 + * console.log(buf.readInt8(2)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`. + */ + readInt8(offset?: number): number; + /** + * Reads a signed, little-endian 16-bit integer from `buf` at the specified`offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0, 5]); + * + * console.log(buf.readInt16LE(0)); + * // Prints: 1280 + * console.log(buf.readInt16LE(1)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. + */ + readInt16LE(offset?: number): number; + /** + * Reads a signed, big-endian 16-bit integer from `buf` at the specified `offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0, 5]); + * + * console.log(buf.readInt16BE(0)); + * // Prints: 5 + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. + */ + readInt16BE(offset?: number): number; + /** + * Reads a signed, little-endian 32-bit integer from `buf` at the specified`offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0, 0, 0, 5]); + * + * console.log(buf.readInt32LE(0)); + * // Prints: 83886080 + * console.log(buf.readInt32LE(1)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readInt32LE(offset?: number): number; + /** + * Reads a signed, big-endian 32-bit integer from `buf` at the specified `offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([0, 0, 0, 5]); + * + * console.log(buf.readInt32BE(0)); + * // Prints: 5 + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readInt32BE(offset?: number): number; + /** + * Reads a 32-bit, little-endian float from `buf` at the specified `offset`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([1, 2, 3, 4]); + * + * console.log(buf.readFloatLE(0)); + * // Prints: 1.539989614439558e-36 + * console.log(buf.readFloatLE(1)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.11.15 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readFloatLE(offset?: number): number; + /** + * Reads a 32-bit, big-endian float from `buf` at the specified `offset`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([1, 2, 3, 4]); + * + * console.log(buf.readFloatBE(0)); + * // Prints: 2.387939260590663e-38 + * ``` + * @since v0.11.15 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readFloatBE(offset?: number): number; + /** + * Reads a 64-bit, little-endian double from `buf` at the specified `offset`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); + * + * console.log(buf.readDoubleLE(0)); + * // Prints: 5.447603722011605e-270 + * console.log(buf.readDoubleLE(1)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.11.15 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`. + */ + readDoubleLE(offset?: number): number; + /** + * Reads a 64-bit, big-endian double from `buf` at the specified `offset`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); + * + * console.log(buf.readDoubleBE(0)); + * // Prints: 8.20788039913184e-304 + * ``` + * @since v0.11.15 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`. + */ + readDoubleBE(offset?: number): number; + reverse(): this; + /** + * Interprets `buf` as an array of unsigned 16-bit integers and swaps the + * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 2. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); + * + * console.log(buf1); + * // Prints: + * + * buf1.swap16(); + * + * console.log(buf1); + * // Prints: + * + * const buf2 = Buffer.from([0x1, 0x2, 0x3]); + * + * buf2.swap16(); + * // Throws ERR_INVALID_BUFFER_SIZE. + * ``` + * + * One convenient use of `buf.swap16()` is to perform a fast in-place conversion + * between UTF-16 little-endian and UTF-16 big-endian: + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from('This is little-endian UTF-16', 'utf16le'); + * buf.swap16(); // Convert to big-endian UTF-16 text. + * ``` + * @since v5.10.0 + * @return A reference to `buf`. + */ + swap16(): Buffer; + /** + * Interprets `buf` as an array of unsigned 32-bit integers and swaps the + * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 4. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); + * + * console.log(buf1); + * // Prints: + * + * buf1.swap32(); + * + * console.log(buf1); + * // Prints: + * + * const buf2 = Buffer.from([0x1, 0x2, 0x3]); + * + * buf2.swap32(); + * // Throws ERR_INVALID_BUFFER_SIZE. + * ``` + * @since v5.10.0 + * @return A reference to `buf`. + */ + swap32(): Buffer; + /** + * Interprets `buf` as an array of 64-bit numbers and swaps byte order _in-place_. + * Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 8. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); + * + * console.log(buf1); + * // Prints: + * + * buf1.swap64(); + * + * console.log(buf1); + * // Prints: + * + * const buf2 = Buffer.from([0x1, 0x2, 0x3]); + * + * buf2.swap64(); + * // Throws ERR_INVALID_BUFFER_SIZE. + * ``` + * @since v6.3.0 + * @return A reference to `buf`. + */ + swap64(): Buffer; + /** + * Writes `value` to `buf` at the specified `offset`. `value` must be a + * valid unsigned 8-bit integer. Behavior is undefined when `value` is anything + * other than an unsigned 8-bit integer. + * + * This function is also available under the `writeUint8` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt8(0x3, 0); + * buf.writeUInt8(0x4, 1); + * buf.writeUInt8(0x23, 2); + * buf.writeUInt8(0x42, 3); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`. + * @return `offset` plus the number of bytes written. + */ + writeUInt8(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid unsigned 16-bit integer. Behavior is undefined when `value` is + * anything other than an unsigned 16-bit integer. + * + * This function is also available under the `writeUint16LE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt16LE(0xdead, 0); + * buf.writeUInt16LE(0xbeef, 2); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. + * @return `offset` plus the number of bytes written. + */ + writeUInt16LE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid unsigned 16-bit integer. Behavior is undefined when `value`is anything other than an + * unsigned 16-bit integer. + * + * This function is also available under the `writeUint16BE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt16BE(0xdead, 0); + * buf.writeUInt16BE(0xbeef, 2); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. + * @return `offset` plus the number of bytes written. + */ + writeUInt16BE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid unsigned 32-bit integer. Behavior is undefined when `value` is + * anything other than an unsigned 32-bit integer. + * + * This function is also available under the `writeUint32LE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt32LE(0xfeedface, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeUInt32LE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid unsigned 32-bit integer. Behavior is undefined when `value`is anything other than an + * unsigned 32-bit integer. + * + * This function is also available under the `writeUint32BE` alias. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt32BE(0xfeedface, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeUInt32BE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset`. `value` must be a valid + * signed 8-bit integer. Behavior is undefined when `value` is anything other than + * a signed 8-bit integer. + * + * `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(2); + * + * buf.writeInt8(2, 0); + * buf.writeInt8(-2, 1); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`. + * @return `offset` plus the number of bytes written. + */ + writeInt8(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid signed 16-bit integer. Behavior is undefined when `value` is + * anything other than a signed 16-bit integer. + * + * The `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(2); + * + * buf.writeInt16LE(0x0304, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. + * @return `offset` plus the number of bytes written. + */ + writeInt16LE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid signed 16-bit integer. Behavior is undefined when `value` is + * anything other than a signed 16-bit integer. + * + * The `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(2); + * + * buf.writeInt16BE(0x0102, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. + * @return `offset` plus the number of bytes written. + */ + writeInt16BE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid signed 32-bit integer. Behavior is undefined when `value` is + * anything other than a signed 32-bit integer. + * + * The `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeInt32LE(0x05060708, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeInt32LE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid signed 32-bit integer. Behavior is undefined when `value` is + * anything other than a signed 32-bit integer. + * + * The `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeInt32BE(0x01020304, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeInt32BE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. Behavior is + * undefined when `value` is anything other than a JavaScript number. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeFloatLE(0xcafebabe, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeFloatLE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. Behavior is + * undefined when `value` is anything other than a JavaScript number. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeFloatBE(0xcafebabe, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeFloatBE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a JavaScript number. Behavior is undefined when `value` is anything + * other than a JavaScript number. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeDoubleLE(123.456, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeDoubleLE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a JavaScript number. Behavior is undefined when `value` is anything + * other than a JavaScript number. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeDoubleBE(123.456, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeDoubleBE(value: number, offset?: number): number; + /** + * Fills `buf` with the specified `value`. If the `offset` and `end` are not given, + * the entire `buf` will be filled: + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Fill a `Buffer` with the ASCII character 'h'. + * + * const b = Buffer.allocUnsafe(50).fill('h'); + * + * console.log(b.toString()); + * // Prints: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh + * ``` + * + * `value` is coerced to a `uint32` value if it is not a string, `Buffer`, or + * integer. If the resulting integer is greater than `255` (decimal), `buf` will be + * filled with `value & 255`. + * + * If the final write of a `fill()` operation falls on a multi-byte character, + * then only the bytes of that character that fit into `buf` are written: + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Fill a `Buffer` with character that takes up two bytes in UTF-8. + * + * console.log(Buffer.allocUnsafe(5).fill('\u0222')); + * // Prints: + * ``` + * + * If `value` contains invalid characters, it is truncated; if no valid + * fill data remains, an exception is thrown: + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.allocUnsafe(5); + * + * console.log(buf.fill('a')); + * // Prints: + * console.log(buf.fill('aazz', 'hex')); + * // Prints: + * console.log(buf.fill('zz', 'hex')); + * // Throws an exception. + * ``` + * @since v0.5.0 + * @param value The value with which to fill `buf`. + * @param [offset=0] Number of bytes to skip before starting to fill `buf`. + * @param [end=buf.length] Where to stop filling `buf` (not inclusive). + * @param [encoding='utf8'] The encoding for `value` if `value` is a string. + * @return A reference to `buf`. + */ + fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this; + /** + * If `value` is: + * + * * a string, `value` is interpreted according to the character encoding in`encoding`. + * * a `Buffer` or [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array), `value` will be used in its entirety. + * To compare a partial `Buffer`, use `buf.slice()`. + * * a number, `value` will be interpreted as an unsigned 8-bit integer + * value between `0` and `255`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from('this is a buffer'); + * + * console.log(buf.indexOf('this')); + * // Prints: 0 + * console.log(buf.indexOf('is')); + * // Prints: 2 + * console.log(buf.indexOf(Buffer.from('a buffer'))); + * // Prints: 8 + * console.log(buf.indexOf(97)); + * // Prints: 8 (97 is the decimal ASCII value for 'a') + * console.log(buf.indexOf(Buffer.from('a buffer example'))); + * // Prints: -1 + * console.log(buf.indexOf(Buffer.from('a buffer example').slice(0, 8))); + * // Prints: 8 + * + * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le'); + * + * console.log(utf16Buffer.indexOf('\u03a3', 0, 'utf16le')); + * // Prints: 4 + * console.log(utf16Buffer.indexOf('\u03a3', -4, 'utf16le')); + * // Prints: 6 + * ``` + * + * If `value` is not a string, number, or `Buffer`, this method will throw a`TypeError`. If `value` is a number, it will be coerced to a valid byte value, + * an integer between 0 and 255. + * + * If `byteOffset` is not a number, it will be coerced to a number. If the result + * of coercion is `NaN` or `0`, then the entire buffer will be searched. This + * behavior matches [`String.prototype.indexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf). + * + * ```js + * import { Buffer } from 'buffer'; + * + * const b = Buffer.from('abcdef'); + * + * // Passing a value that's a number, but not a valid byte. + * // Prints: 2, equivalent to searching for 99 or 'c'. + * console.log(b.indexOf(99.9)); + * console.log(b.indexOf(256 + 99)); + * + * // Passing a byteOffset that coerces to NaN or 0. + * // Prints: 1, searching the whole buffer. + * console.log(b.indexOf('b', undefined)); + * console.log(b.indexOf('b', {})); + * console.log(b.indexOf('b', null)); + * console.log(b.indexOf('b', [])); + * ``` + * + * If `value` is an empty string or empty `Buffer` and `byteOffset` is less + * than `buf.length`, `byteOffset` will be returned. If `value` is empty and`byteOffset` is at least `buf.length`, `buf.length` will be returned. + * @since v1.5.0 + * @param value What to search for. + * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`. + * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`. + * @return The index of the first occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`. + */ + indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; + /** + * Identical to `buf.indexOf()`, except the last occurrence of `value` is found + * rather than the first occurrence. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from('this buffer is a buffer'); + * + * console.log(buf.lastIndexOf('this')); + * // Prints: 0 + * console.log(buf.lastIndexOf('buffer')); + * // Prints: 17 + * console.log(buf.lastIndexOf(Buffer.from('buffer'))); + * // Prints: 17 + * console.log(buf.lastIndexOf(97)); + * // Prints: 15 (97 is the decimal ASCII value for 'a') + * console.log(buf.lastIndexOf(Buffer.from('yolo'))); + * // Prints: -1 + * console.log(buf.lastIndexOf('buffer', 5)); + * // Prints: 5 + * console.log(buf.lastIndexOf('buffer', 4)); + * // Prints: -1 + * + * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le'); + * + * console.log(utf16Buffer.lastIndexOf('\u03a3', undefined, 'utf16le')); + * // Prints: 6 + * console.log(utf16Buffer.lastIndexOf('\u03a3', -5, 'utf16le')); + * // Prints: 4 + * ``` + * + * If `value` is not a string, number, or `Buffer`, this method will throw a`TypeError`. If `value` is a number, it will be coerced to a valid byte value, + * an integer between 0 and 255. + * + * If `byteOffset` is not a number, it will be coerced to a number. Any arguments + * that coerce to `NaN`, like `{}` or `undefined`, will search the whole buffer. + * This behavior matches [`String.prototype.lastIndexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf). + * + * ```js + * import { Buffer } from 'buffer'; + * + * const b = Buffer.from('abcdef'); + * + * // Passing a value that's a number, but not a valid byte. + * // Prints: 2, equivalent to searching for 99 or 'c'. + * console.log(b.lastIndexOf(99.9)); + * console.log(b.lastIndexOf(256 + 99)); + * + * // Passing a byteOffset that coerces to NaN. + * // Prints: 1, searching the whole buffer. + * console.log(b.lastIndexOf('b', undefined)); + * console.log(b.lastIndexOf('b', {})); + * + * // Passing a byteOffset that coerces to 0. + * // Prints: -1, equivalent to passing 0. + * console.log(b.lastIndexOf('b', null)); + * console.log(b.lastIndexOf('b', [])); + * ``` + * + * If `value` is an empty string or empty `Buffer`, `byteOffset` will be returned. + * @since v6.0.0 + * @param value What to search for. + * @param [byteOffset=buf.length - 1] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`. + * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`. + * @return The index of the last occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`. + */ + lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; + /** + * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) of `[index, byte]` pairs from the contents + * of `buf`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * // Log the entire contents of a `Buffer`. + * + * const buf = Buffer.from('buffer'); + * + * for (const pair of buf.entries()) { + * console.log(pair); + * } + * // Prints: + * // [0, 98] + * // [1, 117] + * // [2, 102] + * // [3, 102] + * // [4, 101] + * // [5, 114] + * ``` + * @since v1.1.0 + */ + entries(): IterableIterator<[number, number]>; + /** + * Equivalent to `buf.indexOf() !== -1`. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from('this is a buffer'); + * + * console.log(buf.includes('this')); + * // Prints: true + * console.log(buf.includes('is')); + * // Prints: true + * console.log(buf.includes(Buffer.from('a buffer'))); + * // Prints: true + * console.log(buf.includes(97)); + * // Prints: true (97 is the decimal ASCII value for 'a') + * console.log(buf.includes(Buffer.from('a buffer example'))); + * // Prints: false + * console.log(buf.includes(Buffer.from('a buffer example').slice(0, 8))); + * // Prints: true + * console.log(buf.includes('this', 4)); + * // Prints: false + * ``` + * @since v5.3.0 + * @param value What to search for. + * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`. + * @param [encoding='utf8'] If `value` is a string, this is its encoding. + * @return `true` if `value` was found in `buf`, `false` otherwise. + */ + includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean; + /** + * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) of `buf` keys (indices). + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from('buffer'); + * + * for (const key of buf.keys()) { + * console.log(key); + * } + * // Prints: + * // 0 + * // 1 + * // 2 + * // 3 + * // 4 + * // 5 + * ``` + * @since v1.1.0 + */ + keys(): IterableIterator; + /** + * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) for `buf` values (bytes). This function is + * called automatically when a `Buffer` is used in a `for..of` statement. + * + * ```js + * import { Buffer } from 'buffer'; + * + * const buf = Buffer.from('buffer'); + * + * for (const value of buf.values()) { + * console.log(value); + * } + * // Prints: + * // 98 + * // 117 + * // 102 + * // 102 + * // 101 + * // 114 + * + * for (const value of buf) { + * console.log(value); + * } + * // Prints: + * // 98 + * // 117 + * // 102 + * // 102 + * // 101 + * // 114 + * ``` + * @since v1.1.0 + */ + values(): IterableIterator; + } + var Buffer: BufferConstructor; + /** + * Decodes a string of Base64-encoded data into bytes, and encodes those bytes + * into a string using Latin-1 (ISO-8859-1). + * + * The `data` may be any JavaScript-value that can be coerced into a string. + * + * **This function is only provided for compatibility with legacy web platform APIs** + * **and should never be used in new code, because they use strings to represent** + * **binary data and predate the introduction of typed arrays in JavaScript.** + * **For code running using Node.js APIs, converting between base64-encoded strings** + * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.** + * @since v15.13.0 + * @deprecated Use `Buffer.from(data, 'base64')` instead. + * @param data The Base64-encoded input string. + */ + function atob(data: string): string; + /** + * Decodes a string into bytes using Latin-1 (ISO-8859), and encodes those bytes + * into a string using Base64. + * + * The `data` may be any JavaScript-value that can be coerced into a string. + * + * **This function is only provided for compatibility with legacy web platform APIs** + * **and should never be used in new code, because they use strings to represent** + * **binary data and predate the introduction of typed arrays in JavaScript.** + * **For code running using Node.js APIs, converting between base64-encoded strings** + * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.** + * @since v15.13.0 + * @deprecated Use `buf.toString('base64')` instead. + * @param data An ASCII (Latin1) string. + */ + function btoa(data: string): string; + } +} +declare module 'node:buffer' { + export * from 'buffer'; +} diff --git a/frontend/node_modules/@types/node/child_process.d.ts b/frontend/node_modules/@types/node/child_process.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d38314551c20f5edd498c7a5c64d348b300f5c5e --- /dev/null +++ b/frontend/node_modules/@types/node/child_process.d.ts @@ -0,0 +1,1366 @@ +/** + * The `child_process` module provides the ability to spawn subprocesses in + * a manner that is similar, but not identical, to [`popen(3)`](http://man7.org/linux/man-pages/man3/popen.3.html). This capability + * is primarily provided by the {@link spawn} function: + * + * ```js + * const { spawn } = require('child_process'); + * const ls = spawn('ls', ['-lh', '/usr']); + * + * ls.stdout.on('data', (data) => { + * console.log(`stdout: ${data}`); + * }); + * + * ls.stderr.on('data', (data) => { + * console.error(`stderr: ${data}`); + * }); + * + * ls.on('close', (code) => { + * console.log(`child process exited with code ${code}`); + * }); + * ``` + * + * By default, pipes for `stdin`, `stdout`, and `stderr` are established between + * the parent Node.js process and the spawned subprocess. These pipes have + * limited (and platform-specific) capacity. If the subprocess writes to + * stdout in excess of that limit without the output being captured, the + * subprocess blocks waiting for the pipe buffer to accept more data. This is + * identical to the behavior of pipes in the shell. Use the `{ stdio: 'ignore' }`option if the output will not be consumed. + * + * The command lookup is performed using the `options.env.PATH` environment + * variable if it is in the `options` object. Otherwise, `process.env.PATH` is + * used. + * + * On Windows, environment variables are case-insensitive. Node.js + * lexicographically sorts the `env` keys and uses the first one that + * case-insensitively matches. Only first (in lexicographic order) entry will be + * passed to the subprocess. This might lead to issues on Windows when passing + * objects to the `env` option that have multiple variants of the same key, such as`PATH` and `Path`. + * + * The {@link spawn} method spawns the child process asynchronously, + * without blocking the Node.js event loop. The {@link spawnSync} function provides equivalent functionality in a synchronous manner that blocks + * the event loop until the spawned process either exits or is terminated. + * + * For convenience, the `child_process` module provides a handful of synchronous + * and asynchronous alternatives to {@link spawn} and {@link spawnSync}. Each of these alternatives are implemented on + * top of {@link spawn} or {@link spawnSync}. + * + * * {@link exec}: spawns a shell and runs a command within that + * shell, passing the `stdout` and `stderr` to a callback function when + * complete. + * * {@link execFile}: similar to {@link exec} except + * that it spawns the command directly without first spawning a shell by + * default. + * * {@link fork}: spawns a new Node.js process and invokes a + * specified module with an IPC communication channel established that allows + * sending messages between parent and child. + * * {@link execSync}: a synchronous version of {@link exec} that will block the Node.js event loop. + * * {@link execFileSync}: a synchronous version of {@link execFile} that will block the Node.js event loop. + * + * For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however, + * the synchronous methods can have significant impact on performance due to + * stalling the event loop while spawned processes complete. + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/child_process.js) + */ +declare module 'child_process' { + import { ObjectEncodingOptions } from 'node:fs'; + import { EventEmitter, Abortable } from 'node:events'; + import * as net from 'node:net'; + import { Writable, Readable, Stream, Pipe } from 'node:stream'; + import { URL } from 'node:url'; + type Serializable = string | object | number | boolean | bigint; + type SendHandle = net.Socket | net.Server; + /** + * Instances of the `ChildProcess` represent spawned child processes. + * + * Instances of `ChildProcess` are not intended to be created directly. Rather, + * use the {@link spawn}, {@link exec},{@link execFile}, or {@link fork} methods to create + * instances of `ChildProcess`. + * @since v2.2.0 + */ + class ChildProcess extends EventEmitter { + /** + * A `Writable Stream` that represents the child process's `stdin`. + * + * If a child process waits to read all of its input, the child will not continue + * until this stream has been closed via `end()`. + * + * If the child was spawned with `stdio[0]` set to anything other than `'pipe'`, + * then this will be `null`. + * + * `subprocess.stdin` is an alias for `subprocess.stdio[0]`. Both properties will + * refer to the same value. + * + * The `subprocess.stdin` property can be `undefined` if the child process could + * not be successfully spawned. + * @since v0.1.90 + */ + stdin: Writable | null; + /** + * A `Readable Stream` that represents the child process's `stdout`. + * + * If the child was spawned with `stdio[1]` set to anything other than `'pipe'`, + * then this will be `null`. + * + * `subprocess.stdout` is an alias for `subprocess.stdio[1]`. Both properties will + * refer to the same value. + * + * ```js + * const { spawn } = require('child_process'); + * + * const subprocess = spawn('ls'); + * + * subprocess.stdout.on('data', (data) => { + * console.log(`Received chunk ${data}`); + * }); + * ``` + * + * The `subprocess.stdout` property can be `null` if the child process could + * not be successfully spawned. + * @since v0.1.90 + */ + stdout: Readable | null; + /** + * A `Readable Stream` that represents the child process's `stderr`. + * + * If the child was spawned with `stdio[2]` set to anything other than `'pipe'`, + * then this will be `null`. + * + * `subprocess.stderr` is an alias for `subprocess.stdio[2]`. Both properties will + * refer to the same value. + * + * The `subprocess.stderr` property can be `null` if the child process could + * not be successfully spawned. + * @since v0.1.90 + */ + stderr: Readable | null; + /** + * The `subprocess.channel` property is a reference to the child's IPC channel. If + * no IPC channel currently exists, this property is `undefined`. + * @since v7.1.0 + */ + readonly channel?: Pipe | null | undefined; + /** + * A sparse array of pipes to the child process, corresponding with positions in + * the `stdio` option passed to {@link spawn} that have been set + * to the value `'pipe'`. `subprocess.stdio[0]`, `subprocess.stdio[1]`, and`subprocess.stdio[2]` are also available as `subprocess.stdin`,`subprocess.stdout`, and `subprocess.stderr`, + * respectively. + * + * In the following example, only the child's fd `1` (stdout) is configured as a + * pipe, so only the parent's `subprocess.stdio[1]` is a stream, all other values + * in the array are `null`. + * + * ```js + * const assert = require('assert'); + * const fs = require('fs'); + * const child_process = require('child_process'); + * + * const subprocess = child_process.spawn('ls', { + * stdio: [ + * 0, // Use parent's stdin for child. + * 'pipe', // Pipe child's stdout to parent. + * fs.openSync('err.out', 'w'), // Direct child's stderr to a file. + * ] + * }); + * + * assert.strictEqual(subprocess.stdio[0], null); + * assert.strictEqual(subprocess.stdio[0], subprocess.stdin); + * + * assert(subprocess.stdout); + * assert.strictEqual(subprocess.stdio[1], subprocess.stdout); + * + * assert.strictEqual(subprocess.stdio[2], null); + * assert.strictEqual(subprocess.stdio[2], subprocess.stderr); + * ``` + * + * The `subprocess.stdio` property can be `undefined` if the child process could + * not be successfully spawned. + * @since v0.7.10 + */ + readonly stdio: [ + Writable | null, + // stdin + Readable | null, + // stdout + Readable | null, + // stderr + Readable | Writable | null | undefined, + // extra + Readable | Writable | null | undefined // extra + ]; + /** + * The `subprocess.killed` property indicates whether the child process + * successfully received a signal from `subprocess.kill()`. The `killed` property + * does not indicate that the child process has been terminated. + * @since v0.5.10 + */ + readonly killed: boolean; + /** + * Returns the process identifier (PID) of the child process. If the child process + * fails to spawn due to errors, then the value is `undefined` and `error` is + * emitted. + * + * ```js + * const { spawn } = require('child_process'); + * const grep = spawn('grep', ['ssh']); + * + * console.log(`Spawned child pid: ${grep.pid}`); + * grep.stdin.end(); + * ``` + * @since v0.1.90 + */ + readonly pid?: number | undefined; + /** + * The `subprocess.connected` property indicates whether it is still possible to + * send and receive messages from a child process. When `subprocess.connected` is`false`, it is no longer possible to send or receive messages. + * @since v0.7.2 + */ + readonly connected: boolean; + /** + * The `subprocess.exitCode` property indicates the exit code of the child process. + * If the child process is still running, the field will be `null`. + */ + readonly exitCode: number | null; + /** + * The `subprocess.signalCode` property indicates the signal received by + * the child process if any, else `null`. + */ + readonly signalCode: NodeJS.Signals | null; + /** + * The `subprocess.spawnargs` property represents the full list of command-line + * arguments the child process was launched with. + */ + readonly spawnargs: string[]; + /** + * The `subprocess.spawnfile` property indicates the executable file name of + * the child process that is launched. + * + * For {@link fork}, its value will be equal to `process.execPath`. + * For {@link spawn}, its value will be the name of + * the executable file. + * For {@link exec}, its value will be the name of the shell + * in which the child process is launched. + */ + readonly spawnfile: string; + /** + * The `subprocess.kill()` method sends a signal to the child process. If no + * argument is given, the process will be sent the `'SIGTERM'` signal. See [`signal(7)`](http://man7.org/linux/man-pages/man7/signal.7.html) for a list of available signals. This function + * returns `true` if [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) succeeds, and `false` otherwise. + * + * ```js + * const { spawn } = require('child_process'); + * const grep = spawn('grep', ['ssh']); + * + * grep.on('close', (code, signal) => { + * console.log( + * `child process terminated due to receipt of signal ${signal}`); + * }); + * + * // Send SIGHUP to process. + * grep.kill('SIGHUP'); + * ``` + * + * The `ChildProcess` object may emit an `'error'` event if the signal + * cannot be delivered. Sending a signal to a child process that has already exited + * is not an error but may have unforeseen consequences. Specifically, if the + * process identifier (PID) has been reassigned to another process, the signal will + * be delivered to that process instead which can have unexpected results. + * + * While the function is called `kill`, the signal delivered to the child process + * may not actually terminate the process. + * + * See [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for reference. + * + * On Windows, where POSIX signals do not exist, the `signal` argument will be + * ignored, and the process will be killed forcefully and abruptly (similar to`'SIGKILL'`). + * See `Signal Events` for more details. + * + * On Linux, child processes of child processes will not be terminated + * when attempting to kill their parent. This is likely to happen when running a + * new process in a shell or with the use of the `shell` option of `ChildProcess`: + * + * ```js + * 'use strict'; + * const { spawn } = require('child_process'); + * + * const subprocess = spawn( + * 'sh', + * [ + * '-c', + * `node -e "setInterval(() => { + * console.log(process.pid, 'is alive') + * }, 500);"`, + * ], { + * stdio: ['inherit', 'inherit', 'inherit'] + * } + * ); + * + * setTimeout(() => { + * subprocess.kill(); // Does not terminate the Node.js process in the shell. + * }, 2000); + * ``` + * @since v0.1.90 + */ + kill(signal?: NodeJS.Signals | number): boolean; + /** + * When an IPC channel has been established between the parent and child ( + * i.e. when using {@link fork}), the `subprocess.send()` method can + * be used to send messages to the child process. When the child process is a + * Node.js instance, these messages can be received via the `'message'` event. + * + * The message goes through serialization and parsing. The resulting + * message might not be the same as what is originally sent. + * + * For example, in the parent script: + * + * ```js + * const cp = require('child_process'); + * const n = cp.fork(`${__dirname}/sub.js`); + * + * n.on('message', (m) => { + * console.log('PARENT got message:', m); + * }); + * + * // Causes the child to print: CHILD got message: { hello: 'world' } + * n.send({ hello: 'world' }); + * ``` + * + * And then the child script, `'sub.js'` might look like this: + * + * ```js + * process.on('message', (m) => { + * console.log('CHILD got message:', m); + * }); + * + * // Causes the parent to print: PARENT got message: { foo: 'bar', baz: null } + * process.send({ foo: 'bar', baz: NaN }); + * ``` + * + * Child Node.js processes will have a `process.send()` method of their own + * that allows the child to send messages back to the parent. + * + * There is a special case when sending a `{cmd: 'NODE_foo'}` message. Messages + * containing a `NODE_` prefix in the `cmd` property are reserved for use within + * Node.js core and will not be emitted in the child's `'message'` event. Rather, such messages are emitted using the`'internalMessage'` event and are consumed internally by Node.js. + * Applications should avoid using such messages or listening for`'internalMessage'` events as it is subject to change without notice. + * + * The optional `sendHandle` argument that may be passed to `subprocess.send()` is + * for passing a TCP server or socket object to the child process. The child will + * receive the object as the second argument passed to the callback function + * registered on the `'message'` event. Any data that is received + * and buffered in the socket will not be sent to the child. + * + * The optional `callback` is a function that is invoked after the message is + * sent but before the child may have received it. The function is called with a + * single argument: `null` on success, or an `Error` object on failure. + * + * If no `callback` function is provided and the message cannot be sent, an`'error'` event will be emitted by the `ChildProcess` object. This can + * happen, for instance, when the child process has already exited. + * + * `subprocess.send()` will return `false` if the channel has closed or when the + * backlog of unsent messages exceeds a threshold that makes it unwise to send + * more. Otherwise, the method returns `true`. The `callback` function can be + * used to implement flow control. + * + * #### Example: sending a server object + * + * The `sendHandle` argument can be used, for instance, to pass the handle of + * a TCP server object to the child process as illustrated in the example below: + * + * ```js + * const subprocess = require('child_process').fork('subprocess.js'); + * + * // Open up the server object and send the handle. + * const server = require('net').createServer(); + * server.on('connection', (socket) => { + * socket.end('handled by parent'); + * }); + * server.listen(1337, () => { + * subprocess.send('server', server); + * }); + * ``` + * + * The child would then receive the server object as: + * + * ```js + * process.on('message', (m, server) => { + * if (m === 'server') { + * server.on('connection', (socket) => { + * socket.end('handled by child'); + * }); + * } + * }); + * ``` + * + * Once the server is now shared between the parent and child, some connections + * can be handled by the parent and some by the child. + * + * While the example above uses a server created using the `net` module, `dgram`module servers use exactly the same workflow with the exceptions of listening on + * a `'message'` event instead of `'connection'` and using `server.bind()` instead + * of `server.listen()`. This is, however, currently only supported on Unix + * platforms. + * + * #### Example: sending a socket object + * + * Similarly, the `sendHandler` argument can be used to pass the handle of a + * socket to the child process. The example below spawns two children that each + * handle connections with "normal" or "special" priority: + * + * ```js + * const { fork } = require('child_process'); + * const normal = fork('subprocess.js', ['normal']); + * const special = fork('subprocess.js', ['special']); + * + * // Open up the server and send sockets to child. Use pauseOnConnect to prevent + * // the sockets from being read before they are sent to the child process. + * const server = require('net').createServer({ pauseOnConnect: true }); + * server.on('connection', (socket) => { + * + * // If this is special priority... + * if (socket.remoteAddress === '74.125.127.100') { + * special.send('socket', socket); + * return; + * } + * // This is normal priority. + * normal.send('socket', socket); + * }); + * server.listen(1337); + * ``` + * + * The `subprocess.js` would receive the socket handle as the second argument + * passed to the event callback function: + * + * ```js + * process.on('message', (m, socket) => { + * if (m === 'socket') { + * if (socket) { + * // Check that the client socket exists. + * // It is possible for the socket to be closed between the time it is + * // sent and the time it is received in the child process. + * socket.end(`Request handled with ${process.argv[2]} priority`); + * } + * } + * }); + * ``` + * + * Do not use `.maxConnections` on a socket that has been passed to a subprocess. + * The parent cannot track when the socket is destroyed. + * + * Any `'message'` handlers in the subprocess should verify that `socket` exists, + * as the connection may have been closed during the time it takes to send the + * connection to the child. + * @since v0.5.9 + * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties: + */ + send(message: Serializable, callback?: (error: Error | null) => void): boolean; + send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean; + send(message: Serializable, sendHandle?: SendHandle, options?: MessageOptions, callback?: (error: Error | null) => void): boolean; + /** + * Closes the IPC channel between parent and child, allowing the child to exit + * gracefully once there are no other connections keeping it alive. After calling + * this method the `subprocess.connected` and `process.connected` properties in + * both the parent and child (respectively) will be set to `false`, and it will be + * no longer possible to pass messages between the processes. + * + * The `'disconnect'` event will be emitted when there are no messages in the + * process of being received. This will most often be triggered immediately after + * calling `subprocess.disconnect()`. + * + * When the child process is a Node.js instance (e.g. spawned using {@link fork}), the `process.disconnect()` method can be invoked + * within the child process to close the IPC channel as well. + * @since v0.7.2 + */ + disconnect(): void; + /** + * By default, the parent will wait for the detached child to exit. To prevent the + * parent from waiting for a given `subprocess` to exit, use the`subprocess.unref()` method. Doing so will cause the parent's event loop to not + * include the child in its reference count, allowing the parent to exit + * independently of the child, unless there is an established IPC channel between + * the child and the parent. + * + * ```js + * const { spawn } = require('child_process'); + * + * const subprocess = spawn(process.argv[0], ['child_program.js'], { + * detached: true, + * stdio: 'ignore' + * }); + * + * subprocess.unref(); + * ``` + * @since v0.7.10 + */ + unref(): void; + /** + * Calling `subprocess.ref()` after making a call to `subprocess.unref()` will + * restore the removed reference count for the child process, forcing the parent + * to wait for the child to exit before exiting itself. + * + * ```js + * const { spawn } = require('child_process'); + * + * const subprocess = spawn(process.argv[0], ['child_program.js'], { + * detached: true, + * stdio: 'ignore' + * }); + * + * subprocess.unref(); + * subprocess.ref(); + * ``` + * @since v0.7.10 + */ + ref(): void; + /** + * events.EventEmitter + * 1. close + * 2. disconnect + * 3. error + * 4. exit + * 5. message + * 6. spawn + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + addListener(event: 'disconnect', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + addListener(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this; + addListener(event: 'spawn', listener: () => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: 'close', code: number | null, signal: NodeJS.Signals | null): boolean; + emit(event: 'disconnect'): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'exit', code: number | null, signal: NodeJS.Signals | null): boolean; + emit(event: 'message', message: Serializable, sendHandle: SendHandle): boolean; + emit(event: 'spawn', listener: () => void): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + on(event: 'disconnect', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + on(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this; + on(event: 'spawn', listener: () => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + once(event: 'disconnect', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + once(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this; + once(event: 'spawn', listener: () => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + prependListener(event: 'disconnect', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + prependListener(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this; + prependListener(event: 'spawn', listener: () => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + prependOnceListener(event: 'disconnect', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + prependOnceListener(event: 'message', listener: (message: Serializable, sendHandle: SendHandle) => void): this; + prependOnceListener(event: 'spawn', listener: () => void): this; + } + // return this object when stdio option is undefined or not specified + interface ChildProcessWithoutNullStreams extends ChildProcess { + stdin: Writable; + stdout: Readable; + stderr: Readable; + readonly stdio: [ + Writable, + Readable, + Readable, + // stderr + Readable | Writable | null | undefined, + // extra, no modification + Readable | Writable | null | undefined // extra, no modification + ]; + } + // return this object when stdio option is a tuple of 3 + interface ChildProcessByStdio extends ChildProcess { + stdin: I; + stdout: O; + stderr: E; + readonly stdio: [ + I, + O, + E, + Readable | Writable | null | undefined, + // extra, no modification + Readable | Writable | null | undefined // extra, no modification + ]; + } + interface MessageOptions { + keepOpen?: boolean | undefined; + } + type IOType = 'overlapped' | 'pipe' | 'ignore' | 'inherit'; + type StdioOptions = IOType | Array; + type SerializationType = 'json' | 'advanced'; + interface MessagingOptions extends Abortable { + /** + * Specify the kind of serialization used for sending messages between processes. + * @default 'json' + */ + serialization?: SerializationType | undefined; + /** + * The signal value to be used when the spawned process will be killed by the abort signal. + * @default 'SIGTERM' + */ + killSignal?: NodeJS.Signals | number | undefined; + /** + * In milliseconds the maximum amount of time the process is allowed to run. + */ + timeout?: number | undefined; + } + interface ProcessEnvOptions { + uid?: number | undefined; + gid?: number | undefined; + cwd?: string | URL | undefined; + env?: NodeJS.ProcessEnv | undefined; + } + interface CommonOptions extends ProcessEnvOptions { + /** + * @default true + */ + windowsHide?: boolean | undefined; + /** + * @default 0 + */ + timeout?: number | undefined; + } + interface CommonSpawnOptions extends CommonOptions, MessagingOptions, Abortable { + argv0?: string | undefined; + stdio?: StdioOptions | undefined; + shell?: boolean | string | undefined; + windowsVerbatimArguments?: boolean | undefined; + } + interface SpawnOptions extends CommonSpawnOptions { + detached?: boolean | undefined; + } + interface SpawnOptionsWithoutStdio extends SpawnOptions { + stdio?: StdioPipeNamed | StdioPipe[] | undefined; + } + type StdioNull = 'inherit' | 'ignore' | Stream; + type StdioPipeNamed = 'pipe' | 'overlapped'; + type StdioPipe = undefined | null | StdioPipeNamed; + interface SpawnOptionsWithStdioTuple extends SpawnOptions { + stdio: [Stdin, Stdout, Stderr]; + } + /** + * The `child_process.spawn()` method spawns a new process using the given`command`, with command-line arguments in `args`. If omitted, `args` defaults + * to an empty array. + * + * **If the `shell` option is enabled, do not pass unsanitized user input to this** + * **function. Any input containing shell metacharacters may be used to trigger** + * **arbitrary command execution.** + * + * A third argument may be used to specify additional options, with these defaults: + * + * ```js + * const defaults = { + * cwd: undefined, + * env: process.env + * }; + * ``` + * + * Use `cwd` to specify the working directory from which the process is spawned. + * If not given, the default is to inherit the current working directory. If given, + * but the path does not exist, the child process emits an `ENOENT` error + * and exits immediately. `ENOENT` is also emitted when the command + * does not exist. + * + * Use `env` to specify environment variables that will be visible to the new + * process, the default is `process.env`. + * + * `undefined` values in `env` will be ignored. + * + * Example of running `ls -lh /usr`, capturing `stdout`, `stderr`, and the + * exit code: + * + * ```js + * const { spawn } = require('child_process'); + * const ls = spawn('ls', ['-lh', '/usr']); + * + * ls.stdout.on('data', (data) => { + * console.log(`stdout: ${data}`); + * }); + * + * ls.stderr.on('data', (data) => { + * console.error(`stderr: ${data}`); + * }); + * + * ls.on('close', (code) => { + * console.log(`child process exited with code ${code}`); + * }); + * ``` + * + * Example: A very elaborate way to run `ps ax | grep ssh` + * + * ```js + * const { spawn } = require('child_process'); + * const ps = spawn('ps', ['ax']); + * const grep = spawn('grep', ['ssh']); + * + * ps.stdout.on('data', (data) => { + * grep.stdin.write(data); + * }); + * + * ps.stderr.on('data', (data) => { + * console.error(`ps stderr: ${data}`); + * }); + * + * ps.on('close', (code) => { + * if (code !== 0) { + * console.log(`ps process exited with code ${code}`); + * } + * grep.stdin.end(); + * }); + * + * grep.stdout.on('data', (data) => { + * console.log(data.toString()); + * }); + * + * grep.stderr.on('data', (data) => { + * console.error(`grep stderr: ${data}`); + * }); + * + * grep.on('close', (code) => { + * if (code !== 0) { + * console.log(`grep process exited with code ${code}`); + * } + * }); + * ``` + * + * Example of checking for failed `spawn`: + * + * ```js + * const { spawn } = require('child_process'); + * const subprocess = spawn('bad_command'); + * + * subprocess.on('error', (err) => { + * console.error('Failed to start subprocess.'); + * }); + * ``` + * + * Certain platforms (macOS, Linux) will use the value of `argv[0]` for the process + * title while others (Windows, SunOS) will use `command`. + * + * Node.js currently overwrites `argv[0]` with `process.execPath` on startup, so`process.argv[0]` in a Node.js child process will not match the `argv0`parameter passed to `spawn` from the parent, + * retrieve it with the`process.argv0` property instead. + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except + * the error passed to the callback will be an `AbortError`: + * + * ```js + * const { spawn } = require('child_process'); + * const controller = new AbortController(); + * const { signal } = controller; + * const grep = spawn('grep', ['ssh'], { signal }); + * grep.on('error', (err) => { + * // This will be called with err being an AbortError if the controller aborts + * }); + * controller.abort(); // Stops the child process + * ``` + * @since v0.1.90 + * @param command The command to run. + * @param args List of string arguments. + */ + function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams; + function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, options: SpawnOptions): ChildProcess; + // overloads of spawn with 'args' + function spawn(command: string, args?: ReadonlyArray, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams; + function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, args: ReadonlyArray, options: SpawnOptionsWithStdioTuple): ChildProcessByStdio; + function spawn(command: string, args: ReadonlyArray, options: SpawnOptions): ChildProcess; + interface ExecOptions extends CommonOptions { + shell?: string | undefined; + signal?: AbortSignal | undefined; + maxBuffer?: number | undefined; + killSignal?: NodeJS.Signals | number | undefined; + } + interface ExecOptionsWithStringEncoding extends ExecOptions { + encoding: BufferEncoding; + } + interface ExecOptionsWithBufferEncoding extends ExecOptions { + encoding: BufferEncoding | null; // specify `null`. + } + interface ExecException extends Error { + cmd?: string | undefined; + killed?: boolean | undefined; + code?: number | undefined; + signal?: NodeJS.Signals | undefined; + } + /** + * Spawns a shell then executes the `command` within that shell, buffering any + * generated output. The `command` string passed to the exec function is processed + * directly by the shell and special characters (vary based on [shell](https://en.wikipedia.org/wiki/List_of_command-line_interpreters)) + * need to be dealt with accordingly: + * + * ```js + * const { exec } = require('child_process'); + * + * exec('"/path/to/test file/test.sh" arg1 arg2'); + * // Double quotes are used so that the space in the path is not interpreted as + * // a delimiter of multiple arguments. + * + * exec('echo "The \\$HOME variable is $HOME"'); + * // The $HOME variable is escaped in the first instance, but not in the second. + * ``` + * + * **Never pass unsanitized user input to this function. Any input containing shell** + * **metacharacters may be used to trigger arbitrary command execution.** + * + * If a `callback` function is provided, it is called with the arguments`(error, stdout, stderr)`. On success, `error` will be `null`. On error,`error` will be an instance of `Error`. The + * `error.code` property will be + * the exit code of the process. By convention, any exit code other than `0`indicates an error. `error.signal` will be the signal that terminated the + * process. + * + * The `stdout` and `stderr` arguments passed to the callback will contain the + * stdout and stderr output of the child process. By default, Node.js will decode + * the output as UTF-8 and pass strings to the callback. The `encoding` option + * can be used to specify the character encoding used to decode the stdout and + * stderr output. If `encoding` is `'buffer'`, or an unrecognized character + * encoding, `Buffer` objects will be passed to the callback instead. + * + * ```js + * const { exec } = require('child_process'); + * exec('cat *.js missing_file | wc -l', (error, stdout, stderr) => { + * if (error) { + * console.error(`exec error: ${error}`); + * return; + * } + * console.log(`stdout: ${stdout}`); + * console.error(`stderr: ${stderr}`); + * }); + * ``` + * + * If `timeout` is greater than `0`, the parent will send the signal + * identified by the `killSignal` property (the default is `'SIGTERM'`) if the + * child runs longer than `timeout` milliseconds. + * + * Unlike the [`exec(3)`](http://man7.org/linux/man-pages/man3/exec.3.html) POSIX system call, `child_process.exec()` does not replace + * the existing process and uses a shell to execute the command. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned`ChildProcess` instance is attached to the `Promise` as a `child` property. In + * case of an error (including any error resulting in an exit code other than 0), a + * rejected promise is returned, with the same `error` object given in the + * callback, but with two additional properties `stdout` and `stderr`. + * + * ```js + * const util = require('util'); + * const exec = util.promisify(require('child_process').exec); + * + * async function lsExample() { + * const { stdout, stderr } = await exec('ls'); + * console.log('stdout:', stdout); + * console.error('stderr:', stderr); + * } + * lsExample(); + * ``` + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except + * the error passed to the callback will be an `AbortError`: + * + * ```js + * const { exec } = require('child_process'); + * const controller = new AbortController(); + * const { signal } = controller; + * const child = exec('grep ssh', { signal }, (error) => { + * console.log(error); // an AbortError + * }); + * controller.abort(); + * ``` + * @since v0.1.90 + * @param command The command to run, with space-separated arguments. + * @param callback called with the output when process terminates. + */ + function exec(command: string, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess; + // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. + function exec( + command: string, + options: { + encoding: 'buffer' | null; + } & ExecOptions, + callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void + ): ChildProcess; + // `options` with well known `encoding` means stdout/stderr are definitely `string`. + function exec( + command: string, + options: { + encoding: BufferEncoding; + } & ExecOptions, + callback?: (error: ExecException | null, stdout: string, stderr: string) => void + ): ChildProcess; + // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`. + // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`. + function exec( + command: string, + options: { + encoding: BufferEncoding; + } & ExecOptions, + callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void + ): ChildProcess; + // `options` without an `encoding` means stdout/stderr are definitely `string`. + function exec(command: string, options: ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess; + // fallback if nothing else matches. Worst case is always `string | Buffer`. + function exec( + command: string, + options: (ObjectEncodingOptions & ExecOptions) | undefined | null, + callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void + ): ChildProcess; + interface PromiseWithChild extends Promise { + child: ChildProcess; + } + namespace exec { + function __promisify__(command: string): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + command: string, + options: { + encoding: 'buffer' | null; + } & ExecOptions + ): PromiseWithChild<{ + stdout: Buffer; + stderr: Buffer; + }>; + function __promisify__( + command: string, + options: { + encoding: BufferEncoding; + } & ExecOptions + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + command: string, + options: ExecOptions + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + command: string, + options?: (ObjectEncodingOptions & ExecOptions) | null + ): PromiseWithChild<{ + stdout: string | Buffer; + stderr: string | Buffer; + }>; + } + interface ExecFileOptions extends CommonOptions, Abortable { + maxBuffer?: number | undefined; + killSignal?: NodeJS.Signals | number | undefined; + windowsVerbatimArguments?: boolean | undefined; + shell?: boolean | string | undefined; + signal?: AbortSignal | undefined; + } + interface ExecFileOptionsWithStringEncoding extends ExecFileOptions { + encoding: BufferEncoding; + } + interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions { + encoding: 'buffer' | null; + } + interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions { + encoding: BufferEncoding; + } + type ExecFileException = ExecException & NodeJS.ErrnoException; + /** + * The `child_process.execFile()` function is similar to {@link exec} except that it does not spawn a shell by default. Rather, the specified + * executable `file` is spawned directly as a new process making it slightly more + * efficient than {@link exec}. + * + * The same options as {@link exec} are supported. Since a shell is + * not spawned, behaviors such as I/O redirection and file globbing are not + * supported. + * + * ```js + * const { execFile } = require('child_process'); + * const child = execFile('node', ['--version'], (error, stdout, stderr) => { + * if (error) { + * throw error; + * } + * console.log(stdout); + * }); + * ``` + * + * The `stdout` and `stderr` arguments passed to the callback will contain the + * stdout and stderr output of the child process. By default, Node.js will decode + * the output as UTF-8 and pass strings to the callback. The `encoding` option + * can be used to specify the character encoding used to decode the stdout and + * stderr output. If `encoding` is `'buffer'`, or an unrecognized character + * encoding, `Buffer` objects will be passed to the callback instead. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned`ChildProcess` instance is attached to the `Promise` as a `child` property. In + * case of an error (including any error resulting in an exit code other than 0), a + * rejected promise is returned, with the same `error` object given in the + * callback, but with two additional properties `stdout` and `stderr`. + * + * ```js + * const util = require('util'); + * const execFile = util.promisify(require('child_process').execFile); + * async function getVersion() { + * const { stdout } = await execFile('node', ['--version']); + * console.log(stdout); + * } + * getVersion(); + * ``` + * + * **If the `shell` option is enabled, do not pass unsanitized user input to this** + * **function. Any input containing shell metacharacters may be used to trigger** + * **arbitrary command execution.** + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except + * the error passed to the callback will be an `AbortError`: + * + * ```js + * const { execFile } = require('child_process'); + * const controller = new AbortController(); + * const { signal } = controller; + * const child = execFile('node', ['--version'], { signal }, (error) => { + * console.log(error); // an AbortError + * }); + * controller.abort(); + * ``` + * @since v0.1.91 + * @param file The name or path of the executable file to run. + * @param args List of string arguments. + * @param callback Called with the output when process terminates. + */ + function execFile(file: string): ChildProcess; + function execFile(file: string, options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess; + function execFile(file: string, args?: ReadonlyArray | null): ChildProcess; + function execFile(file: string, args: ReadonlyArray | undefined | null, options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess; + // no `options` definitely means stdout/stderr are `string`. + function execFile(file: string, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess; + function execFile(file: string, args: ReadonlyArray | undefined | null, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess; + // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. + function execFile(file: string, options: ExecFileOptionsWithBufferEncoding, callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess; + function execFile( + file: string, + args: ReadonlyArray | undefined | null, + options: ExecFileOptionsWithBufferEncoding, + callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void + ): ChildProcess; + // `options` with well known `encoding` means stdout/stderr are definitely `string`. + function execFile(file: string, options: ExecFileOptionsWithStringEncoding, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess; + function execFile( + file: string, + args: ReadonlyArray | undefined | null, + options: ExecFileOptionsWithStringEncoding, + callback: (error: ExecFileException | null, stdout: string, stderr: string) => void + ): ChildProcess; + // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`. + // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`. + function execFile(file: string, options: ExecFileOptionsWithOtherEncoding, callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess; + function execFile( + file: string, + args: ReadonlyArray | undefined | null, + options: ExecFileOptionsWithOtherEncoding, + callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void + ): ChildProcess; + // `options` without an `encoding` means stdout/stderr are definitely `string`. + function execFile(file: string, options: ExecFileOptions, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess; + function execFile( + file: string, + args: ReadonlyArray | undefined | null, + options: ExecFileOptions, + callback: (error: ExecFileException | null, stdout: string, stderr: string) => void + ): ChildProcess; + // fallback if nothing else matches. Worst case is always `string | Buffer`. + function execFile( + file: string, + options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null, + callback: ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null + ): ChildProcess; + function execFile( + file: string, + args: ReadonlyArray | undefined | null, + options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null, + callback: ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null + ): ChildProcess; + namespace execFile { + function __promisify__(file: string): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + args: ReadonlyArray | undefined | null + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + options: ExecFileOptionsWithBufferEncoding + ): PromiseWithChild<{ + stdout: Buffer; + stderr: Buffer; + }>; + function __promisify__( + file: string, + args: ReadonlyArray | undefined | null, + options: ExecFileOptionsWithBufferEncoding + ): PromiseWithChild<{ + stdout: Buffer; + stderr: Buffer; + }>; + function __promisify__( + file: string, + options: ExecFileOptionsWithStringEncoding + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + args: ReadonlyArray | undefined | null, + options: ExecFileOptionsWithStringEncoding + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + options: ExecFileOptionsWithOtherEncoding + ): PromiseWithChild<{ + stdout: string | Buffer; + stderr: string | Buffer; + }>; + function __promisify__( + file: string, + args: ReadonlyArray | undefined | null, + options: ExecFileOptionsWithOtherEncoding + ): PromiseWithChild<{ + stdout: string | Buffer; + stderr: string | Buffer; + }>; + function __promisify__( + file: string, + options: ExecFileOptions + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + args: ReadonlyArray | undefined | null, + options: ExecFileOptions + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null + ): PromiseWithChild<{ + stdout: string | Buffer; + stderr: string | Buffer; + }>; + function __promisify__( + file: string, + args: ReadonlyArray | undefined | null, + options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null + ): PromiseWithChild<{ + stdout: string | Buffer; + stderr: string | Buffer; + }>; + } + interface ForkOptions extends ProcessEnvOptions, MessagingOptions, Abortable { + execPath?: string | undefined; + execArgv?: string[] | undefined; + silent?: boolean | undefined; + stdio?: StdioOptions | undefined; + detached?: boolean | undefined; + windowsVerbatimArguments?: boolean | undefined; + } + /** + * The `child_process.fork()` method is a special case of {@link spawn} used specifically to spawn new Node.js processes. + * Like {@link spawn}, a `ChildProcess` object is returned. The + * returned `ChildProcess` will have an additional communication channel + * built-in that allows messages to be passed back and forth between the parent and + * child. See `subprocess.send()` for details. + * + * Keep in mind that spawned Node.js child processes are + * independent of the parent with exception of the IPC communication channel + * that is established between the two. Each process has its own memory, with + * their own V8 instances. Because of the additional resource allocations + * required, spawning a large number of child Node.js processes is not + * recommended. + * + * By default, `child_process.fork()` will spawn new Node.js instances using the `process.execPath` of the parent process. The `execPath` property in the`options` object allows for an alternative + * execution path to be used. + * + * Node.js processes launched with a custom `execPath` will communicate with the + * parent process using the file descriptor (fd) identified using the + * environment variable `NODE_CHANNEL_FD` on the child process. + * + * Unlike the [`fork(2)`](http://man7.org/linux/man-pages/man2/fork.2.html) POSIX system call, `child_process.fork()` does not clone the + * current process. + * + * The `shell` option available in {@link spawn} is not supported by`child_process.fork()` and will be ignored if set. + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except + * the error passed to the callback will be an `AbortError`: + * + * ```js + * if (process.argv[2] === 'child') { + * setTimeout(() => { + * console.log(`Hello from ${process.argv[2]}!`); + * }, 1_000); + * } else { + * const { fork } = require('child_process'); + * const controller = new AbortController(); + * const { signal } = controller; + * const child = fork(__filename, ['child'], { signal }); + * child.on('error', (err) => { + * // This will be called with err being an AbortError if the controller aborts + * }); + * controller.abort(); // Stops the child process + * } + * ``` + * @since v0.5.0 + * @param modulePath The module to run in the child. + * @param args List of string arguments. + */ + function fork(modulePath: string, options?: ForkOptions): ChildProcess; + function fork(modulePath: string, args?: ReadonlyArray, options?: ForkOptions): ChildProcess; + interface SpawnSyncOptions extends CommonSpawnOptions { + input?: string | NodeJS.ArrayBufferView | undefined; + maxBuffer?: number | undefined; + encoding?: BufferEncoding | 'buffer' | null | undefined; + } + interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions { + encoding: BufferEncoding; + } + interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions { + encoding?: 'buffer' | null | undefined; + } + interface SpawnSyncReturns { + pid: number; + output: Array; + stdout: T; + stderr: T; + status: number | null; + signal: NodeJS.Signals | null; + error?: Error | undefined; + } + /** + * The `child_process.spawnSync()` method is generally identical to {@link spawn} with the exception that the function will not return + * until the child process has fully closed. When a timeout has been encountered + * and `killSignal` is sent, the method won't return until the process has + * completely exited. If the process intercepts and handles the `SIGTERM` signal + * and doesn't exit, the parent process will wait until the child process has + * exited. + * + * **If the `shell` option is enabled, do not pass unsanitized user input to this** + * **function. Any input containing shell metacharacters may be used to trigger** + * **arbitrary command execution.** + * @since v0.11.12 + * @param command The command to run. + * @param args List of string arguments. + */ + function spawnSync(command: string): SpawnSyncReturns; + function spawnSync(command: string, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; + function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; + function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns; + function spawnSync(command: string, args: ReadonlyArray): SpawnSyncReturns; + function spawnSync(command: string, args: ReadonlyArray, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; + function spawnSync(command: string, args: ReadonlyArray, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; + function spawnSync(command: string, args?: ReadonlyArray, options?: SpawnSyncOptions): SpawnSyncReturns; + interface CommonExecOptions extends CommonOptions { + input?: string | NodeJS.ArrayBufferView | undefined; + stdio?: StdioOptions | undefined; + killSignal?: NodeJS.Signals | number | undefined; + maxBuffer?: number | undefined; + encoding?: BufferEncoding | 'buffer' | null | undefined; + } + interface ExecSyncOptions extends CommonExecOptions { + shell?: string | undefined; + } + interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions { + encoding: BufferEncoding; + } + interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions { + encoding?: 'buffer' | null | undefined; + } + /** + * The `child_process.execSync()` method is generally identical to {@link exec} with the exception that the method will not return + * until the child process has fully closed. When a timeout has been encountered + * and `killSignal` is sent, the method won't return until the process has + * completely exited. If the child process intercepts and handles the `SIGTERM`signal and doesn't exit, the parent process will wait until the child process + * has exited. + * + * If the process times out or has a non-zero exit code, this method will throw. + * The `Error` object will contain the entire result from {@link spawnSync}. + * + * **Never pass unsanitized user input to this function. Any input containing shell** + * **metacharacters may be used to trigger arbitrary command execution.** + * @since v0.11.12 + * @param command The command to run. + * @return The stdout from the command. + */ + function execSync(command: string): Buffer; + function execSync(command: string, options: ExecSyncOptionsWithStringEncoding): string; + function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): Buffer; + function execSync(command: string, options?: ExecSyncOptions): string | Buffer; + interface ExecFileSyncOptions extends CommonExecOptions { + shell?: boolean | string | undefined; + } + interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions { + encoding: BufferEncoding; + } + interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions { + encoding?: 'buffer' | null; // specify `null`. + } + /** + * The `child_process.execFileSync()` method is generally identical to {@link execFile} with the exception that the method will not + * return until the child process has fully closed. When a timeout has been + * encountered and `killSignal` is sent, the method won't return until the process + * has completely exited. + * + * If the child process intercepts and handles the `SIGTERM` signal and + * does not exit, the parent process will still wait until the child process has + * exited. + * + * If the process times out or has a non-zero exit code, this method will throw an `Error` that will include the full result of the underlying {@link spawnSync}. + * + * **If the `shell` option is enabled, do not pass unsanitized user input to this** + * **function. Any input containing shell metacharacters may be used to trigger** + * **arbitrary command execution.** + * @since v0.11.12 + * @param file The name or path of the executable file to run. + * @param args List of string arguments. + * @return The stdout from the command. + */ + function execFileSync(file: string): Buffer; + function execFileSync(file: string, options: ExecFileSyncOptionsWithStringEncoding): string; + function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding): Buffer; + function execFileSync(file: string, options?: ExecFileSyncOptions): string | Buffer; + function execFileSync(file: string, args: ReadonlyArray): Buffer; + function execFileSync(file: string, args: ReadonlyArray, options: ExecFileSyncOptionsWithStringEncoding): string; + function execFileSync(file: string, args: ReadonlyArray, options: ExecFileSyncOptionsWithBufferEncoding): Buffer; + function execFileSync(file: string, args?: ReadonlyArray, options?: ExecFileSyncOptions): string | Buffer; +} +declare module 'node:child_process' { + export * from 'child_process'; +} diff --git a/frontend/node_modules/@types/node/cluster.d.ts b/frontend/node_modules/@types/node/cluster.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7f1614105e30bddeaf56946a6ba1117aa5566ec0 --- /dev/null +++ b/frontend/node_modules/@types/node/cluster.d.ts @@ -0,0 +1,414 @@ +/** + * A single instance of Node.js runs in a single thread. To take advantage of + * multi-core systems, the user will sometimes want to launch a cluster of Node.js + * processes to handle the load. + * + * The cluster module allows easy creation of child processes that all share + * server ports. + * + * ```js + * import cluster from 'cluster'; + * import http from 'http'; + * import { cpus } from 'os'; + * import process from 'process'; + * + * const numCPUs = cpus().length; + * + * if (cluster.isPrimary) { + * console.log(`Primary ${process.pid} is running`); + * + * // Fork workers. + * for (let i = 0; i < numCPUs; i++) { + * cluster.fork(); + * } + * + * cluster.on('exit', (worker, code, signal) => { + * console.log(`worker ${worker.process.pid} died`); + * }); + * } else { + * // Workers can share any TCP connection + * // In this case it is an HTTP server + * http.createServer((req, res) => { + * res.writeHead(200); + * res.end('hello world\n'); + * }).listen(8000); + * + * console.log(`Worker ${process.pid} started`); + * } + * ``` + * + * Running Node.js will now share port 8000 between the workers: + * + * ```console + * $ node server.js + * Primary 3596 is running + * Worker 4324 started + * Worker 4520 started + * Worker 6056 started + * Worker 5644 started + * ``` + * + * On Windows, it is not yet possible to set up a named pipe server in a worker. + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/cluster.js) + */ +declare module 'cluster' { + import * as child from 'node:child_process'; + import EventEmitter = require('node:events'); + import * as net from 'node:net'; + export interface ClusterSettings { + execArgv?: string[] | undefined; // default: process.execArgv + exec?: string | undefined; + args?: string[] | undefined; + silent?: boolean | undefined; + stdio?: any[] | undefined; + uid?: number | undefined; + gid?: number | undefined; + inspectPort?: number | (() => number) | undefined; + } + export interface Address { + address: string; + port: number; + addressType: number | 'udp4' | 'udp6'; // 4, 6, -1, "udp4", "udp6" + } + /** + * A `Worker` object contains all public information and method about a worker. + * In the primary it can be obtained using `cluster.workers`. In a worker + * it can be obtained using `cluster.worker`. + * @since v0.7.0 + */ + export class Worker extends EventEmitter { + /** + * Each new worker is given its own unique id, this id is stored in the`id`. + * + * While a worker is alive, this is the key that indexes it in`cluster.workers`. + * @since v0.8.0 + */ + id: number; + /** + * All workers are created using `child_process.fork()`, the returned object + * from this function is stored as `.process`. In a worker, the global `process`is stored. + * + * See: `Child Process module`. + * + * Workers will call `process.exit(0)` if the `'disconnect'` event occurs + * on `process` and `.exitedAfterDisconnect` is not `true`. This protects against + * accidental disconnection. + * @since v0.7.0 + */ + process: child.ChildProcess; + /** + * Send a message to a worker or primary, optionally with a handle. + * + * In the primary this sends a message to a specific worker. It is identical to `ChildProcess.send()`. + * + * In a worker this sends a message to the primary. It is identical to`process.send()`. + * + * This example will echo back all messages from the primary: + * + * ```js + * if (cluster.isPrimary) { + * const worker = cluster.fork(); + * worker.send('hi there'); + * + * } else if (cluster.isWorker) { + * process.on('message', (msg) => { + * process.send(msg); + * }); + * } + * ``` + * @since v0.7.0 + * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties: + */ + send(message: child.Serializable, callback?: (error: Error | null) => void): boolean; + send(message: child.Serializable, sendHandle: child.SendHandle, callback?: (error: Error | null) => void): boolean; + send(message: child.Serializable, sendHandle: child.SendHandle, options?: child.MessageOptions, callback?: (error: Error | null) => void): boolean; + /** + * This function will kill the worker. In the primary, it does this + * by disconnecting the `worker.process`, and once disconnected, killing + * with `signal`. In the worker, it does it by disconnecting the channel, + * and then exiting with code `0`. + * + * Because `kill()` attempts to gracefully disconnect the worker process, it is + * susceptible to waiting indefinitely for the disconnect to complete. For example, + * if the worker enters an infinite loop, a graceful disconnect will never occur. + * If the graceful disconnect behavior is not needed, use `worker.process.kill()`. + * + * Causes `.exitedAfterDisconnect` to be set. + * + * This method is aliased as `worker.destroy()` for backward compatibility. + * + * In a worker, `process.kill()` exists, but it is not this function; + * it is `kill()`. + * @since v0.9.12 + * @param [signal='SIGTERM'] Name of the kill signal to send to the worker process. + */ + kill(signal?: string): void; + destroy(signal?: string): void; + /** + * In a worker, this function will close all servers, wait for the `'close'` event + * on those servers, and then disconnect the IPC channel. + * + * In the primary, an internal message is sent to the worker causing it to call`.disconnect()` on itself. + * + * Causes `.exitedAfterDisconnect` to be set. + * + * After a server is closed, it will no longer accept new connections, + * but connections may be accepted by any other listening worker. Existing + * connections will be allowed to close as usual. When no more connections exist, + * see `server.close()`, the IPC channel to the worker will close allowing it + * to die gracefully. + * + * The above applies _only_ to server connections, client connections are not + * automatically closed by workers, and disconnect does not wait for them to close + * before exiting. + * + * In a worker, `process.disconnect` exists, but it is not this function; + * it is `disconnect()`. + * + * Because long living server connections may block workers from disconnecting, it + * may be useful to send a message, so application specific actions may be taken to + * close them. It also may be useful to implement a timeout, killing a worker if + * the `'disconnect'` event has not been emitted after some time. + * + * ```js + * if (cluster.isPrimary) { + * const worker = cluster.fork(); + * let timeout; + * + * worker.on('listening', (address) => { + * worker.send('shutdown'); + * worker.disconnect(); + * timeout = setTimeout(() => { + * worker.kill(); + * }, 2000); + * }); + * + * worker.on('disconnect', () => { + * clearTimeout(timeout); + * }); + * + * } else if (cluster.isWorker) { + * const net = require('net'); + * const server = net.createServer((socket) => { + * // Connections never end + * }); + * + * server.listen(8000); + * + * process.on('message', (msg) => { + * if (msg === 'shutdown') { + * // Initiate graceful close of any connections to server + * } + * }); + * } + * ``` + * @since v0.7.7 + * @return A reference to `worker`. + */ + disconnect(): void; + /** + * This function returns `true` if the worker is connected to its primary via its + * IPC channel, `false` otherwise. A worker is connected to its primary after it + * has been created. It is disconnected after the `'disconnect'` event is emitted. + * @since v0.11.14 + */ + isConnected(): boolean; + /** + * This function returns `true` if the worker's process has terminated (either + * because of exiting or being signaled). Otherwise, it returns `false`. + * + * ```js + * import cluster from 'cluster'; + * import http from 'http'; + * import { cpus } from 'os'; + * import process from 'process'; + * + * const numCPUs = cpus().length; + * + * if (cluster.isPrimary) { + * console.log(`Primary ${process.pid} is running`); + * + * // Fork workers. + * for (let i = 0; i < numCPUs; i++) { + * cluster.fork(); + * } + * + * cluster.on('fork', (worker) => { + * console.log('worker is dead:', worker.isDead()); + * }); + * + * cluster.on('exit', (worker, code, signal) => { + * console.log('worker is dead:', worker.isDead()); + * }); + * } else { + * // Workers can share any TCP connection. In this case, it is an HTTP server. + * http.createServer((req, res) => { + * res.writeHead(200); + * res.end(`Current process\n ${process.pid}`); + * process.kill(process.pid); + * }).listen(8000); + * } + * ``` + * @since v0.11.14 + */ + isDead(): boolean; + /** + * This property is `true` if the worker exited due to `.kill()` or`.disconnect()`. If the worker exited any other way, it is `false`. If the + * worker has not exited, it is `undefined`. + * + * The boolean `worker.exitedAfterDisconnect` allows distinguishing between + * voluntary and accidental exit, the primary may choose not to respawn a worker + * based on this value. + * + * ```js + * cluster.on('exit', (worker, code, signal) => { + * if (worker.exitedAfterDisconnect === true) { + * console.log('Oh, it was just voluntary – no need to worry'); + * } + * }); + * + * // kill worker + * worker.kill(); + * ``` + * @since v6.0.0 + */ + exitedAfterDisconnect: boolean; + /** + * events.EventEmitter + * 1. disconnect + * 2. error + * 3. exit + * 4. listening + * 5. message + * 6. online + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'disconnect', listener: () => void): this; + addListener(event: 'error', listener: (error: Error) => void): this; + addListener(event: 'exit', listener: (code: number, signal: string) => void): this; + addListener(event: 'listening', listener: (address: Address) => void): this; + addListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + addListener(event: 'online', listener: () => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: 'disconnect'): boolean; + emit(event: 'error', error: Error): boolean; + emit(event: 'exit', code: number, signal: string): boolean; + emit(event: 'listening', address: Address): boolean; + emit(event: 'message', message: any, handle: net.Socket | net.Server): boolean; + emit(event: 'online'): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'disconnect', listener: () => void): this; + on(event: 'error', listener: (error: Error) => void): this; + on(event: 'exit', listener: (code: number, signal: string) => void): this; + on(event: 'listening', listener: (address: Address) => void): this; + on(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + on(event: 'online', listener: () => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'disconnect', listener: () => void): this; + once(event: 'error', listener: (error: Error) => void): this; + once(event: 'exit', listener: (code: number, signal: string) => void): this; + once(event: 'listening', listener: (address: Address) => void): this; + once(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + once(event: 'online', listener: () => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'disconnect', listener: () => void): this; + prependListener(event: 'error', listener: (error: Error) => void): this; + prependListener(event: 'exit', listener: (code: number, signal: string) => void): this; + prependListener(event: 'listening', listener: (address: Address) => void): this; + prependListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + prependListener(event: 'online', listener: () => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'disconnect', listener: () => void): this; + prependOnceListener(event: 'error', listener: (error: Error) => void): this; + prependOnceListener(event: 'exit', listener: (code: number, signal: string) => void): this; + prependOnceListener(event: 'listening', listener: (address: Address) => void): this; + prependOnceListener(event: 'message', listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + prependOnceListener(event: 'online', listener: () => void): this; + } + export interface Cluster extends EventEmitter { + disconnect(callback?: () => void): void; + fork(env?: any): Worker; + /** @deprecated since v16.0.0 - use isPrimary. */ + readonly isMaster: boolean; + readonly isPrimary: boolean; + readonly isWorker: boolean; + schedulingPolicy: number; + readonly settings: ClusterSettings; + /** @deprecated since v16.0.0 - use setupPrimary. */ + setupMaster(settings?: ClusterSettings): void; + /** + * `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in cluster.settings. + */ + setupPrimary(settings?: ClusterSettings): void; + readonly worker?: Worker | undefined; + readonly workers?: NodeJS.Dict | undefined; + readonly SCHED_NONE: number; + readonly SCHED_RR: number; + /** + * events.EventEmitter + * 1. disconnect + * 2. exit + * 3. fork + * 4. listening + * 5. message + * 6. online + * 7. setup + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'disconnect', listener: (worker: Worker) => void): this; + addListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this; + addListener(event: 'fork', listener: (worker: Worker) => void): this; + addListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this; + addListener(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + addListener(event: 'online', listener: (worker: Worker) => void): this; + addListener(event: 'setup', listener: (settings: ClusterSettings) => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: 'disconnect', worker: Worker): boolean; + emit(event: 'exit', worker: Worker, code: number, signal: string): boolean; + emit(event: 'fork', worker: Worker): boolean; + emit(event: 'listening', worker: Worker, address: Address): boolean; + emit(event: 'message', worker: Worker, message: any, handle: net.Socket | net.Server): boolean; + emit(event: 'online', worker: Worker): boolean; + emit(event: 'setup', settings: ClusterSettings): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'disconnect', listener: (worker: Worker) => void): this; + on(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this; + on(event: 'fork', listener: (worker: Worker) => void): this; + on(event: 'listening', listener: (worker: Worker, address: Address) => void): this; + on(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + on(event: 'online', listener: (worker: Worker) => void): this; + on(event: 'setup', listener: (settings: ClusterSettings) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'disconnect', listener: (worker: Worker) => void): this; + once(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this; + once(event: 'fork', listener: (worker: Worker) => void): this; + once(event: 'listening', listener: (worker: Worker, address: Address) => void): this; + once(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + once(event: 'online', listener: (worker: Worker) => void): this; + once(event: 'setup', listener: (settings: ClusterSettings) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'disconnect', listener: (worker: Worker) => void): this; + prependListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this; + prependListener(event: 'fork', listener: (worker: Worker) => void): this; + prependListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this; + // the handle is a net.Socket or net.Server object, or undefined. + prependListener(event: 'message', listener: (worker: Worker, message: any, handle?: net.Socket | net.Server) => void): this; + prependListener(event: 'online', listener: (worker: Worker) => void): this; + prependListener(event: 'setup', listener: (settings: ClusterSettings) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'disconnect', listener: (worker: Worker) => void): this; + prependOnceListener(event: 'exit', listener: (worker: Worker, code: number, signal: string) => void): this; + prependOnceListener(event: 'fork', listener: (worker: Worker) => void): this; + prependOnceListener(event: 'listening', listener: (worker: Worker, address: Address) => void): this; + // the handle is a net.Socket or net.Server object, or undefined. + prependOnceListener(event: 'message', listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; + prependOnceListener(event: 'online', listener: (worker: Worker) => void): this; + prependOnceListener(event: 'setup', listener: (settings: ClusterSettings) => void): this; + } + const cluster: Cluster; + export default cluster; +} +declare module 'node:cluster' { + export * from 'cluster'; + export { default as default } from 'cluster'; +} diff --git a/frontend/node_modules/@types/node/console.d.ts b/frontend/node_modules/@types/node/console.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ede7a53f25beea72a20f85cfbbaa6c8ce52805ca --- /dev/null +++ b/frontend/node_modules/@types/node/console.d.ts @@ -0,0 +1,412 @@ +/** + * The `console` module provides a simple debugging console that is similar to the + * JavaScript console mechanism provided by web browsers. + * + * The module exports two specific components: + * + * * A `Console` class with methods such as `console.log()`, `console.error()` and`console.warn()` that can be used to write to any Node.js stream. + * * A global `console` instance configured to write to `process.stdout` and `process.stderr`. The global `console` can be used without calling`require('console')`. + * + * _**Warning**_: The global console object's methods are neither consistently + * synchronous like the browser APIs they resemble, nor are they consistently + * asynchronous like all other Node.js streams. See the `note on process I/O` for + * more information. + * + * Example using the global `console`: + * + * ```js + * console.log('hello world'); + * // Prints: hello world, to stdout + * console.log('hello %s', 'world'); + * // Prints: hello world, to stdout + * console.error(new Error('Whoops, something bad happened')); + * // Prints error message and stack trace to stderr: + * // Error: Whoops, something bad happened + * // at [eval]:5:15 + * // at Script.runInThisContext (node:vm:132:18) + * // at Object.runInThisContext (node:vm:309:38) + * // at node:internal/process/execution:77:19 + * // at [eval]-wrapper:6:22 + * // at evalScript (node:internal/process/execution:76:60) + * // at node:internal/main/eval_string:23:3 + * + * const name = 'Will Robinson'; + * console.warn(`Danger ${name}! Danger!`); + * // Prints: Danger Will Robinson! Danger!, to stderr + * ``` + * + * Example using the `Console` class: + * + * ```js + * const out = getStreamSomehow(); + * const err = getStreamSomehow(); + * const myConsole = new console.Console(out, err); + * + * myConsole.log('hello world'); + * // Prints: hello world, to out + * myConsole.log('hello %s', 'world'); + * // Prints: hello world, to out + * myConsole.error(new Error('Whoops, something bad happened')); + * // Prints: [Error: Whoops, something bad happened], to err + * + * const name = 'Will Robinson'; + * myConsole.warn(`Danger ${name}! Danger!`); + * // Prints: Danger Will Robinson! Danger!, to err + * ``` + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/console.js) + */ +declare module 'console' { + import console = require('node:console'); + export = console; +} +declare module 'node:console' { + import { InspectOptions } from 'node:util'; + global { + // This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build + interface Console { + Console: console.ConsoleConstructor; + /** + * `console.assert()` writes a message if `value` is [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) or omitted. It only + * writes a message and does not otherwise affect execution. The output always + * starts with `"Assertion failed"`. If provided, `message` is formatted using `util.format()`. + * + * If `value` is [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy), nothing happens. + * + * ```js + * console.assert(true, 'does nothing'); + * + * console.assert(false, 'Whoops %s work', 'didn\'t'); + * // Assertion failed: Whoops didn't work + * + * console.assert(); + * // Assertion failed + * ``` + * @since v0.1.101 + * @param value The value tested for being truthy. + * @param message All arguments besides `value` are used as error message. + */ + assert(value: any, message?: string, ...optionalParams: any[]): void; + /** + * When `stdout` is a TTY, calling `console.clear()` will attempt to clear the + * TTY. When `stdout` is not a TTY, this method does nothing. + * + * The specific operation of `console.clear()` can vary across operating systems + * and terminal types. For most Linux operating systems, `console.clear()`operates similarly to the `clear` shell command. On Windows, `console.clear()`will clear only the output in the + * current terminal viewport for the Node.js + * binary. + * @since v8.3.0 + */ + clear(): void; + /** + * Maintains an internal counter specific to `label` and outputs to `stdout` the + * number of times `console.count()` has been called with the given `label`. + * + * ```js + * > console.count() + * default: 1 + * undefined + * > console.count('default') + * default: 2 + * undefined + * > console.count('abc') + * abc: 1 + * undefined + * > console.count('xyz') + * xyz: 1 + * undefined + * > console.count('abc') + * abc: 2 + * undefined + * > console.count() + * default: 3 + * undefined + * > + * ``` + * @since v8.3.0 + * @param label The display label for the counter. + */ + count(label?: string): void; + /** + * Resets the internal counter specific to `label`. + * + * ```js + * > console.count('abc'); + * abc: 1 + * undefined + * > console.countReset('abc'); + * undefined + * > console.count('abc'); + * abc: 1 + * undefined + * > + * ``` + * @since v8.3.0 + * @param label The display label for the counter. + */ + countReset(label?: string): void; + /** + * The `console.debug()` function is an alias for {@link log}. + * @since v8.0.0 + */ + debug(message?: any, ...optionalParams: any[]): void; + /** + * Uses `util.inspect()` on `obj` and prints the resulting string to `stdout`. + * This function bypasses any custom `inspect()` function defined on `obj`. + * @since v0.1.101 + */ + dir(obj: any, options?: InspectOptions): void; + /** + * This method calls `console.log()` passing it the arguments received. + * This method does not produce any XML formatting. + * @since v8.0.0 + */ + dirxml(...data: any[]): void; + /** + * Prints to `stderr` with newline. Multiple arguments can be passed, with the + * first used as the primary message and all additional used as substitution + * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to `util.format()`). + * + * ```js + * const code = 5; + * console.error('error #%d', code); + * // Prints: error #5, to stderr + * console.error('error', code); + * // Prints: error 5, to stderr + * ``` + * + * If formatting elements (e.g. `%d`) are not found in the first string then `util.inspect()` is called on each argument and the resulting string + * values are concatenated. See `util.format()` for more information. + * @since v0.1.100 + */ + error(message?: any, ...optionalParams: any[]): void; + /** + * Increases indentation of subsequent lines by spaces for `groupIndentation`length. + * + * If one or more `label`s are provided, those are printed first without the + * additional indentation. + * @since v8.5.0 + */ + group(...label: any[]): void; + /** + * An alias for {@link group}. + * @since v8.5.0 + */ + groupCollapsed(...label: any[]): void; + /** + * Decreases indentation of subsequent lines by spaces for `groupIndentation`length. + * @since v8.5.0 + */ + groupEnd(): void; + /** + * The `console.info()` function is an alias for {@link log}. + * @since v0.1.100 + */ + info(message?: any, ...optionalParams: any[]): void; + /** + * Prints to `stdout` with newline. Multiple arguments can be passed, with the + * first used as the primary message and all additional used as substitution + * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to `util.format()`). + * + * ```js + * const count = 5; + * console.log('count: %d', count); + * // Prints: count: 5, to stdout + * console.log('count:', count); + * // Prints: count: 5, to stdout + * ``` + * + * See `util.format()` for more information. + * @since v0.1.100 + */ + log(message?: any, ...optionalParams: any[]): void; + /** + * Try to construct a table with the columns of the properties of `tabularData`(or use `properties`) and rows of `tabularData` and log it. Falls back to just + * logging the argument if it can’t be parsed as tabular. + * + * ```js + * // These can't be parsed as tabular data + * console.table(Symbol()); + * // Symbol() + * + * console.table(undefined); + * // undefined + * + * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }]); + * // ┌─────────┬─────┬─────┐ + * // │ (index) │ a │ b │ + * // ├─────────┼─────┼─────┤ + * // │ 0 │ 1 │ 'Y' │ + * // │ 1 │ 'Z' │ 2 │ + * // └─────────┴─────┴─────┘ + * + * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }], ['a']); + * // ┌─────────┬─────┐ + * // │ (index) │ a │ + * // ├─────────┼─────┤ + * // │ 0 │ 1 │ + * // │ 1 │ 'Z' │ + * // └─────────┴─────┘ + * ``` + * @since v10.0.0 + * @param properties Alternate properties for constructing the table. + */ + table(tabularData: any, properties?: ReadonlyArray): void; + /** + * Starts a timer that can be used to compute the duration of an operation. Timers + * are identified by a unique `label`. Use the same `label` when calling {@link timeEnd} to stop the timer and output the elapsed time in + * suitable time units to `stdout`. For example, if the elapsed + * time is 3869ms, `console.timeEnd()` displays "3.869s". + * @since v0.1.104 + */ + time(label?: string): void; + /** + * Stops a timer that was previously started by calling {@link time} and + * prints the result to `stdout`: + * + * ```js + * console.time('100-elements'); + * for (let i = 0; i < 100; i++) {} + * console.timeEnd('100-elements'); + * // prints 100-elements: 225.438ms + * ``` + * @since v0.1.104 + */ + timeEnd(label?: string): void; + /** + * For a timer that was previously started by calling {@link time}, prints + * the elapsed time and other `data` arguments to `stdout`: + * + * ```js + * console.time('process'); + * const value = expensiveProcess1(); // Returns 42 + * console.timeLog('process', value); + * // Prints "process: 365.227ms 42". + * doExpensiveProcess2(value); + * console.timeEnd('process'); + * ``` + * @since v10.7.0 + */ + timeLog(label?: string, ...data: any[]): void; + /** + * Prints to `stderr` the string `'Trace: '`, followed by the `util.format()` formatted message and stack trace to the current position in the code. + * + * ```js + * console.trace('Show me'); + * // Prints: (stack trace will vary based on where trace is called) + * // Trace: Show me + * // at repl:2:9 + * // at REPLServer.defaultEval (repl.js:248:27) + * // at bound (domain.js:287:14) + * // at REPLServer.runBound [as eval] (domain.js:300:12) + * // at REPLServer. (repl.js:412:12) + * // at emitOne (events.js:82:20) + * // at REPLServer.emit (events.js:169:7) + * // at REPLServer.Interface._onLine (readline.js:210:10) + * // at REPLServer.Interface._line (readline.js:549:8) + * // at REPLServer.Interface._ttyWrite (readline.js:826:14) + * ``` + * @since v0.1.104 + */ + trace(message?: any, ...optionalParams: any[]): void; + /** + * The `console.warn()` function is an alias for {@link error}. + * @since v0.1.100 + */ + warn(message?: any, ...optionalParams: any[]): void; + // --- Inspector mode only --- + /** + * This method does not display anything unless used in the inspector. + * Starts a JavaScript CPU profile with an optional label. + */ + profile(label?: string): void; + /** + * This method does not display anything unless used in the inspector. + * Stops the current JavaScript CPU profiling session if one has been started and prints the report to the Profiles panel of the inspector. + */ + profileEnd(label?: string): void; + /** + * This method does not display anything unless used in the inspector. + * Adds an event with the label `label` to the Timeline panel of the inspector. + */ + timeStamp(label?: string): void; + } + /** + * The `console` module provides a simple debugging console that is similar to the + * JavaScript console mechanism provided by web browsers. + * + * The module exports two specific components: + * + * * A `Console` class with methods such as `console.log()`, `console.error()` and`console.warn()` that can be used to write to any Node.js stream. + * * A global `console` instance configured to write to `process.stdout` and `process.stderr`. The global `console` can be used without calling`require('console')`. + * + * _**Warning**_: The global console object's methods are neither consistently + * synchronous like the browser APIs they resemble, nor are they consistently + * asynchronous like all other Node.js streams. See the `note on process I/O` for + * more information. + * + * Example using the global `console`: + * + * ```js + * console.log('hello world'); + * // Prints: hello world, to stdout + * console.log('hello %s', 'world'); + * // Prints: hello world, to stdout + * console.error(new Error('Whoops, something bad happened')); + * // Prints error message and stack trace to stderr: + * // Error: Whoops, something bad happened + * // at [eval]:5:15 + * // at Script.runInThisContext (node:vm:132:18) + * // at Object.runInThisContext (node:vm:309:38) + * // at node:internal/process/execution:77:19 + * // at [eval]-wrapper:6:22 + * // at evalScript (node:internal/process/execution:76:60) + * // at node:internal/main/eval_string:23:3 + * + * const name = 'Will Robinson'; + * console.warn(`Danger ${name}! Danger!`); + * // Prints: Danger Will Robinson! Danger!, to stderr + * ``` + * + * Example using the `Console` class: + * + * ```js + * const out = getStreamSomehow(); + * const err = getStreamSomehow(); + * const myConsole = new console.Console(out, err); + * + * myConsole.log('hello world'); + * // Prints: hello world, to out + * myConsole.log('hello %s', 'world'); + * // Prints: hello world, to out + * myConsole.error(new Error('Whoops, something bad happened')); + * // Prints: [Error: Whoops, something bad happened], to err + * + * const name = 'Will Robinson'; + * myConsole.warn(`Danger ${name}! Danger!`); + * // Prints: Danger Will Robinson! Danger!, to err + * ``` + * @see [source](https://github.com/nodejs/node/blob/v16.4.2/lib/console.js) + */ + namespace console { + interface ConsoleConstructorOptions { + stdout: NodeJS.WritableStream; + stderr?: NodeJS.WritableStream | undefined; + ignoreErrors?: boolean | undefined; + colorMode?: boolean | 'auto' | undefined; + inspectOptions?: InspectOptions | undefined; + /** + * Set group indentation + * @default 2 + */ + groupIndentation?: number | undefined; + } + interface ConsoleConstructor { + prototype: Console; + new (stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream, ignoreErrors?: boolean): Console; + new (options: ConsoleConstructorOptions): Console; + } + } + var console: Console; + } + export = globalThis.console; +} diff --git a/frontend/node_modules/@types/node/constants.d.ts b/frontend/node_modules/@types/node/constants.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..208020dcbab4ebcd7955b2abcb7ae49185f5976e --- /dev/null +++ b/frontend/node_modules/@types/node/constants.d.ts @@ -0,0 +1,18 @@ +/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */ +declare module 'constants' { + import { constants as osConstants, SignalConstants } from 'node:os'; + import { constants as cryptoConstants } from 'node:crypto'; + import { constants as fsConstants } from 'node:fs'; + + const exp: typeof osConstants.errno & + typeof osConstants.priority & + SignalConstants & + typeof cryptoConstants & + typeof fsConstants; + export = exp; +} + +declare module 'node:constants' { + import constants = require('constants'); + export = constants; +} diff --git a/frontend/node_modules/@types/node/crypto.d.ts b/frontend/node_modules/@types/node/crypto.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a896ae713da7992b79df3807864a88781f1c1a20 --- /dev/null +++ b/frontend/node_modules/@types/node/crypto.d.ts @@ -0,0 +1,3307 @@ +/** + * The `crypto` module provides cryptographic functionality that includes a set of + * wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign, and verify functions. + * + * ```js + * const { createHmac } = await import('crypto'); + * + * const secret = 'abcdefg'; + * const hash = createHmac('sha256', secret) + * .update('I love cupcakes') + * .digest('hex'); + * console.log(hash); + * // Prints: + * // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e + * ``` + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/crypto.js) + */ +declare module 'crypto' { + import * as stream from 'node:stream'; + import { PeerCertificate } from 'node:tls'; + interface Certificate { + /** + * @deprecated + * @param spkac + * @returns The challenge component of the `spkac` data structure, + * which includes a public key and a challenge. + */ + exportChallenge(spkac: BinaryLike): Buffer; + /** + * @deprecated + * @param spkac + * @param encoding The encoding of the spkac string. + * @returns The public key component of the `spkac` data structure, + * which includes a public key and a challenge. + */ + exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer; + /** + * @deprecated + * @param spkac + * @returns `true` if the given `spkac` data structure is valid, + * `false` otherwise. + */ + verifySpkac(spkac: NodeJS.ArrayBufferView): boolean; + } + const Certificate: Certificate & { + /** @deprecated since v14.9.0 - Use static methods of `crypto.Certificate` instead. */ + new (): Certificate; + /** @deprecated since v14.9.0 - Use static methods of `crypto.Certificate` instead. */ + (): Certificate; + /** + * @param spkac + * @returns The challenge component of the `spkac` data structure, + * which includes a public key and a challenge. + */ + exportChallenge(spkac: BinaryLike): Buffer; + /** + * @param spkac + * @param encoding The encoding of the spkac string. + * @returns The public key component of the `spkac` data structure, + * which includes a public key and a challenge. + */ + exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer; + /** + * @param spkac + * @returns `true` if the given `spkac` data structure is valid, + * `false` otherwise. + */ + verifySpkac(spkac: NodeJS.ArrayBufferView): boolean; + }; + namespace constants { + // https://nodejs.org/dist/latest-v10.x/docs/api/crypto.html#crypto_crypto_constants + const OPENSSL_VERSION_NUMBER: number; + /** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */ + const SSL_OP_ALL: number; + /** Allows legacy insecure renegotiation between OpenSSL and unpatched clients or servers. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */ + const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number; + /** Attempts to use the server's preferences instead of the client's when selecting a cipher. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */ + const SSL_OP_CIPHER_SERVER_PREFERENCE: number; + /** Instructs OpenSSL to use Cisco's "speshul" version of DTLS_BAD_VER. */ + const SSL_OP_CISCO_ANYCONNECT: number; + /** Instructs OpenSSL to turn on cookie exchange. */ + const SSL_OP_COOKIE_EXCHANGE: number; + /** Instructs OpenSSL to add server-hello extension from an early version of the cryptopro draft. */ + const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number; + /** Instructs OpenSSL to disable a SSL 3.0/TLS 1.0 vulnerability workaround added in OpenSSL 0.9.6d. */ + const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number; + /** Instructs OpenSSL to always use the tmp_rsa key when performing RSA operations. */ + const SSL_OP_EPHEMERAL_RSA: number; + /** Allows initial connection to servers that do not support RI. */ + const SSL_OP_LEGACY_SERVER_CONNECT: number; + const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number; + const SSL_OP_MICROSOFT_SESS_ID_BUG: number; + /** Instructs OpenSSL to disable the workaround for a man-in-the-middle protocol-version vulnerability in the SSL 2.0 server implementation. */ + const SSL_OP_MSIE_SSLV2_RSA_PADDING: number; + const SSL_OP_NETSCAPE_CA_DN_BUG: number; + const SSL_OP_NETSCAPE_CHALLENGE_BUG: number; + const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number; + const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number; + /** Instructs OpenSSL to disable support for SSL/TLS compression. */ + const SSL_OP_NO_COMPRESSION: number; + const SSL_OP_NO_QUERY_MTU: number; + /** Instructs OpenSSL to always start a new session when performing renegotiation. */ + const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number; + const SSL_OP_NO_SSLv2: number; + const SSL_OP_NO_SSLv3: number; + const SSL_OP_NO_TICKET: number; + const SSL_OP_NO_TLSv1: number; + const SSL_OP_NO_TLSv1_1: number; + const SSL_OP_NO_TLSv1_2: number; + const SSL_OP_PKCS1_CHECK_1: number; + const SSL_OP_PKCS1_CHECK_2: number; + /** Instructs OpenSSL to always create a new key when using temporary/ephemeral DH parameters. */ + const SSL_OP_SINGLE_DH_USE: number; + /** Instructs OpenSSL to always create a new key when using temporary/ephemeral ECDH parameters. */ + const SSL_OP_SINGLE_ECDH_USE: number; + const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number; + const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number; + const SSL_OP_TLS_BLOCK_PADDING_BUG: number; + const SSL_OP_TLS_D5_BUG: number; + /** Instructs OpenSSL to disable version rollback attack detection. */ + const SSL_OP_TLS_ROLLBACK_BUG: number; + const ENGINE_METHOD_RSA: number; + const ENGINE_METHOD_DSA: number; + const ENGINE_METHOD_DH: number; + const ENGINE_METHOD_RAND: number; + const ENGINE_METHOD_EC: number; + const ENGINE_METHOD_CIPHERS: number; + const ENGINE_METHOD_DIGESTS: number; + const ENGINE_METHOD_PKEY_METHS: number; + const ENGINE_METHOD_PKEY_ASN1_METHS: number; + const ENGINE_METHOD_ALL: number; + const ENGINE_METHOD_NONE: number; + const DH_CHECK_P_NOT_SAFE_PRIME: number; + const DH_CHECK_P_NOT_PRIME: number; + const DH_UNABLE_TO_CHECK_GENERATOR: number; + const DH_NOT_SUITABLE_GENERATOR: number; + const ALPN_ENABLED: number; + const RSA_PKCS1_PADDING: number; + const RSA_SSLV23_PADDING: number; + const RSA_NO_PADDING: number; + const RSA_PKCS1_OAEP_PADDING: number; + const RSA_X931_PADDING: number; + const RSA_PKCS1_PSS_PADDING: number; + /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the digest size when signing or verifying. */ + const RSA_PSS_SALTLEN_DIGEST: number; + /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the maximum permissible value when signing data. */ + const RSA_PSS_SALTLEN_MAX_SIGN: number; + /** Causes the salt length for RSA_PKCS1_PSS_PADDING to be determined automatically when verifying a signature. */ + const RSA_PSS_SALTLEN_AUTO: number; + const POINT_CONVERSION_COMPRESSED: number; + const POINT_CONVERSION_UNCOMPRESSED: number; + const POINT_CONVERSION_HYBRID: number; + /** Specifies the built-in default cipher list used by Node.js (colon-separated values). */ + const defaultCoreCipherList: string; + /** Specifies the active default cipher list used by the current Node.js process (colon-separated values). */ + const defaultCipherList: string; + } + interface HashOptions extends stream.TransformOptions { + /** + * For XOF hash functions such as `shake256`, the + * outputLength option can be used to specify the desired output length in bytes. + */ + outputLength?: number | undefined; + } + /** @deprecated since v10.0.0 */ + const fips: boolean; + /** + * Creates and returns a `Hash` object that can be used to generate hash digests + * using the given `algorithm`. Optional `options` argument controls stream + * behavior. For XOF hash functions such as `'shake256'`, the `outputLength` option + * can be used to specify the desired output length in bytes. + * + * The `algorithm` is dependent on the available algorithms supported by the + * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. + * On recent releases of OpenSSL, `openssl list -digest-algorithms`(`openssl list-message-digest-algorithms` for older versions of OpenSSL) will + * display the available digest algorithms. + * + * Example: generating the sha256 sum of a file + * + * ```js + * import { + * createReadStream + * } from 'fs'; + * import { argv } from 'process'; + * const { + * createHash + * } = await import('crypto'); + * + * const filename = argv[2]; + * + * const hash = createHash('sha256'); + * + * const input = createReadStream(filename); + * input.on('readable', () => { + * // Only one element is going to be produced by the + * // hash stream. + * const data = input.read(); + * if (data) + * hash.update(data); + * else { + * console.log(`${hash.digest('hex')} ${filename}`); + * } + * }); + * ``` + * @since v0.1.92 + * @param options `stream.transform` options + */ + function createHash(algorithm: string, options?: HashOptions): Hash; + /** + * Creates and returns an `Hmac` object that uses the given `algorithm` and `key`. + * Optional `options` argument controls stream behavior. + * + * The `algorithm` is dependent on the available algorithms supported by the + * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. + * On recent releases of OpenSSL, `openssl list -digest-algorithms`(`openssl list-message-digest-algorithms` for older versions of OpenSSL) will + * display the available digest algorithms. + * + * The `key` is the HMAC key used to generate the cryptographic HMAC hash. If it is + * a `KeyObject`, its type must be `secret`. + * + * Example: generating the sha256 HMAC of a file + * + * ```js + * import { + * createReadStream + * } from 'fs'; + * import { argv } from 'process'; + * const { + * createHmac + * } = await import('crypto'); + * + * const filename = argv[2]; + * + * const hmac = createHmac('sha256', 'a secret'); + * + * const input = createReadStream(filename); + * input.on('readable', () => { + * // Only one element is going to be produced by the + * // hash stream. + * const data = input.read(); + * if (data) + * hmac.update(data); + * else { + * console.log(`${hmac.digest('hex')} ${filename}`); + * } + * }); + * ``` + * @since v0.1.94 + * @param options `stream.transform` options + */ + function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac; + // https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings + type BinaryToTextEncoding = 'base64' | 'base64url' | 'hex'; + type CharacterEncoding = 'utf8' | 'utf-8' | 'utf16le' | 'latin1'; + type LegacyCharacterEncoding = 'ascii' | 'binary' | 'ucs2' | 'ucs-2'; + type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding; + type ECDHKeyFormat = 'compressed' | 'uncompressed' | 'hybrid'; + /** + * The `Hash` class is a utility for creating hash digests of data. It can be + * used in one of two ways: + * + * * As a `stream` that is both readable and writable, where data is written + * to produce a computed hash digest on the readable side, or + * * Using the `hash.update()` and `hash.digest()` methods to produce the + * computed hash. + * + * The {@link createHash} method is used to create `Hash` instances. `Hash`objects are not to be created directly using the `new` keyword. + * + * Example: Using `Hash` objects as streams: + * + * ```js + * const { + * createHash + * } = await import('crypto'); + * + * const hash = createHash('sha256'); + * + * hash.on('readable', () => { + * // Only one element is going to be produced by the + * // hash stream. + * const data = hash.read(); + * if (data) { + * console.log(data.toString('hex')); + * // Prints: + * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50 + * } + * }); + * + * hash.write('some data to hash'); + * hash.end(); + * ``` + * + * Example: Using `Hash` and piped streams: + * + * ```js + * import { createReadStream } from 'fs'; + * import { stdout } from 'process'; + * const { createHash } = await import('crypto'); + * + * const hash = createHash('sha256'); + * + * const input = createReadStream('test.js'); + * input.pipe(hash).setEncoding('hex').pipe(stdout); + * ``` + * + * Example: Using the `hash.update()` and `hash.digest()` methods: + * + * ```js + * const { + * createHash + * } = await import('crypto'); + * + * const hash = createHash('sha256'); + * + * hash.update('some data to hash'); + * console.log(hash.digest('hex')); + * // Prints: + * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50 + * ``` + * @since v0.1.92 + */ + class Hash extends stream.Transform { + private constructor(); + /** + * Creates a new `Hash` object that contains a deep copy of the internal state + * of the current `Hash` object. + * + * The optional `options` argument controls stream behavior. For XOF hash + * functions such as `'shake256'`, the `outputLength` option can be used to + * specify the desired output length in bytes. + * + * An error is thrown when an attempt is made to copy the `Hash` object after + * its `hash.digest()` method has been called. + * + * ```js + * // Calculate a rolling hash. + * const { + * createHash + * } = await import('crypto'); + * + * const hash = createHash('sha256'); + * + * hash.update('one'); + * console.log(hash.copy().digest('hex')); + * + * hash.update('two'); + * console.log(hash.copy().digest('hex')); + * + * hash.update('three'); + * console.log(hash.copy().digest('hex')); + * + * // Etc. + * ``` + * @since v13.1.0 + * @param options `stream.transform` options + */ + copy(options?: stream.TransformOptions): Hash; + /** + * Updates the hash content with the given `data`, the encoding of which + * is given in `inputEncoding`. + * If `encoding` is not provided, and the `data` is a string, an + * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. + * + * This can be called many times with new data as it is streamed. + * @since v0.1.92 + * @param inputEncoding The `encoding` of the `data` string. + */ + update(data: BinaryLike): Hash; + update(data: string, inputEncoding: Encoding): Hash; + /** + * Calculates the digest of all of the data passed to be hashed (using the `hash.update()` method). + * If `encoding` is provided a string will be returned; otherwise + * a `Buffer` is returned. + * + * The `Hash` object can not be used again after `hash.digest()` method has been + * called. Multiple calls will cause an error to be thrown. + * @since v0.1.92 + * @param encoding The `encoding` of the return value. + */ + digest(): Buffer; + digest(encoding: BinaryToTextEncoding): string; + } + /** + * The `Hmac` class is a utility for creating cryptographic HMAC digests. It can + * be used in one of two ways: + * + * * As a `stream` that is both readable and writable, where data is written + * to produce a computed HMAC digest on the readable side, or + * * Using the `hmac.update()` and `hmac.digest()` methods to produce the + * computed HMAC digest. + * + * The {@link createHmac} method is used to create `Hmac` instances. `Hmac`objects are not to be created directly using the `new` keyword. + * + * Example: Using `Hmac` objects as streams: + * + * ```js + * const { + * createHmac + * } = await import('crypto'); + * + * const hmac = createHmac('sha256', 'a secret'); + * + * hmac.on('readable', () => { + * // Only one element is going to be produced by the + * // hash stream. + * const data = hmac.read(); + * if (data) { + * console.log(data.toString('hex')); + * // Prints: + * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e + * } + * }); + * + * hmac.write('some data to hash'); + * hmac.end(); + * ``` + * + * Example: Using `Hmac` and piped streams: + * + * ```js + * import { createReadStream } from 'fs'; + * import { stdout } from 'process'; + * const { + * createHmac + * } = await import('crypto'); + * + * const hmac = createHmac('sha256', 'a secret'); + * + * const input = createReadStream('test.js'); + * input.pipe(hmac).pipe(stdout); + * ``` + * + * Example: Using the `hmac.update()` and `hmac.digest()` methods: + * + * ```js + * const { + * createHmac + * } = await import('crypto'); + * + * const hmac = createHmac('sha256', 'a secret'); + * + * hmac.update('some data to hash'); + * console.log(hmac.digest('hex')); + * // Prints: + * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e + * ``` + * @since v0.1.94 + */ + class Hmac extends stream.Transform { + private constructor(); + /** + * Updates the `Hmac` content with the given `data`, the encoding of which + * is given in `inputEncoding`. + * If `encoding` is not provided, and the `data` is a string, an + * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. + * + * This can be called many times with new data as it is streamed. + * @since v0.1.94 + * @param inputEncoding The `encoding` of the `data` string. + */ + update(data: BinaryLike): Hmac; + update(data: string, inputEncoding: Encoding): Hmac; + /** + * Calculates the HMAC digest of all of the data passed using `hmac.update()`. + * If `encoding` is + * provided a string is returned; otherwise a `Buffer` is returned; + * + * The `Hmac` object can not be used again after `hmac.digest()` has been + * called. Multiple calls to `hmac.digest()` will result in an error being thrown. + * @since v0.1.94 + * @param encoding The `encoding` of the return value. + */ + digest(): Buffer; + digest(encoding: BinaryToTextEncoding): string; + } + type KeyObjectType = 'secret' | 'public' | 'private'; + interface KeyExportOptions { + type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1'; + format: T; + cipher?: string | undefined; + passphrase?: string | Buffer | undefined; + } + interface JwkKeyExportOptions { + format: 'jwk'; + } + interface JsonWebKey { + crv?: string | undefined; + d?: string | undefined; + dp?: string | undefined; + dq?: string | undefined; + e?: string | undefined; + k?: string | undefined; + kty?: string | undefined; + n?: string | undefined; + p?: string | undefined; + q?: string | undefined; + qi?: string | undefined; + x?: string | undefined; + y?: string | undefined; + [key: string]: unknown; + } + interface AsymmetricKeyDetails { + /** + * Key size in bits (RSA, DSA). + */ + modulusLength?: number | undefined; + /** + * Public exponent (RSA). + */ + publicExponent?: bigint | undefined; + /** + * Name of the message digest (RSA-PSS). + */ + hashAlgorithm?: string | undefined; + /** + * Name of the message digest used by MGF1 (RSA-PSS). + */ + mgf1HashAlgorithm?: string | undefined; + /** + * Minimal salt length in bytes (RSA-PSS). + */ + saltLength?: number | undefined; + /** + * Size of q in bits (DSA). + */ + divisorLength?: number | undefined; + /** + * Name of the curve (EC). + */ + namedCurve?: string | undefined; + } + interface JwkKeyExportOptions { + format: 'jwk'; + } + /** + * Node.js uses a `KeyObject` class to represent a symmetric or asymmetric key, + * and each kind of key exposes different functions. The {@link createSecretKey}, {@link createPublicKey} and {@link createPrivateKey} methods are used to create `KeyObject`instances. `KeyObject` + * objects are not to be created directly using the `new`keyword. + * + * Most applications should consider using the new `KeyObject` API instead of + * passing keys as strings or `Buffer`s due to improved security features. + * + * `KeyObject` instances can be passed to other threads via `postMessage()`. + * The receiver obtains a cloned `KeyObject`, and the `KeyObject` does not need to + * be listed in the `transferList` argument. + * @since v11.6.0 + */ + class KeyObject { + private constructor(); + /** + * Example: Converting a `CryptoKey` instance to a `KeyObject`: + * + * ```js + * const { webcrypto, KeyObject } = await import('crypto'); + * const { subtle } = webcrypto; + * + * const key = await subtle.generateKey({ + * name: 'HMAC', + * hash: 'SHA-256', + * length: 256 + * }, true, ['sign', 'verify']); + * + * const keyObject = KeyObject.from(key); + * console.log(keyObject.symmetricKeySize); + * // Prints: 32 (symmetric key size in bytes) + * ``` + * @since v15.0.0 + */ + static from(key: webcrypto.CryptoKey): KeyObject; + /** + * For asymmetric keys, this property represents the type of the key. Supported key + * types are: + * + * * `'rsa'` (OID 1.2.840.113549.1.1.1) + * * `'rsa-pss'` (OID 1.2.840.113549.1.1.10) + * * `'dsa'` (OID 1.2.840.10040.4.1) + * * `'ec'` (OID 1.2.840.10045.2.1) + * * `'x25519'` (OID 1.3.101.110) + * * `'x448'` (OID 1.3.101.111) + * * `'ed25519'` (OID 1.3.101.112) + * * `'ed448'` (OID 1.3.101.113) + * * `'dh'` (OID 1.2.840.113549.1.3.1) + * + * This property is `undefined` for unrecognized `KeyObject` types and symmetric + * keys. + * @since v11.6.0 + */ + asymmetricKeyType?: KeyType | undefined; + /** + * For asymmetric keys, this property represents the size of the embedded key in + * bytes. This property is `undefined` for symmetric keys. + */ + asymmetricKeySize?: number | undefined; + /** + * This property exists only on asymmetric keys. Depending on the type of the key, + * this object contains information about the key. None of the information obtained + * through this property can be used to uniquely identify a key or to compromise + * the security of the key. + * + * For RSA-PSS keys, if the key material contains a `RSASSA-PSS-params` sequence, + * the `hashAlgorithm`, `mgf1HashAlgorithm`, and `saltLength` properties will be + * set. + * + * Other key details might be exposed via this API using additional attributes. + * @since v15.7.0 + */ + asymmetricKeyDetails?: AsymmetricKeyDetails | undefined; + /** + * For symmetric keys, the following encoding options can be used: + * + * For public keys, the following encoding options can be used: + * + * For private keys, the following encoding options can be used: + * + * The result type depends on the selected encoding format, when PEM the + * result is a string, when DER it will be a buffer containing the data + * encoded as DER, when [JWK](https://tools.ietf.org/html/rfc7517) it will be an object. + * + * When [JWK](https://tools.ietf.org/html/rfc7517) encoding format was selected, all other encoding options are + * ignored. + * + * PKCS#1, SEC1, and PKCS#8 type keys can be encrypted by using a combination of + * the `cipher` and `format` options. The PKCS#8 `type` can be used with any`format` to encrypt any key algorithm (RSA, EC, or DH) by specifying a`cipher`. PKCS#1 and SEC1 can only be + * encrypted by specifying a `cipher`when the PEM `format` is used. For maximum compatibility, use PKCS#8 for + * encrypted private keys. Since PKCS#8 defines its own + * encryption mechanism, PEM-level encryption is not supported when encrypting + * a PKCS#8 key. See [RFC 5208](https://www.rfc-editor.org/rfc/rfc5208.txt) for PKCS#8 encryption and [RFC 1421](https://www.rfc-editor.org/rfc/rfc1421.txt) for + * PKCS#1 and SEC1 encryption. + * @since v11.6.0 + */ + export(options: KeyExportOptions<'pem'>): string | Buffer; + export(options?: KeyExportOptions<'der'>): Buffer; + export(options?: JwkKeyExportOptions): JsonWebKey; + /** + * For secret keys, this property represents the size of the key in bytes. This + * property is `undefined` for asymmetric keys. + * @since v11.6.0 + */ + symmetricKeySize?: number | undefined; + /** + * Depending on the type of this `KeyObject`, this property is either`'secret'` for secret (symmetric) keys, `'public'` for public (asymmetric) keys + * or `'private'` for private (asymmetric) keys. + * @since v11.6.0 + */ + type: KeyObjectType; + } + type CipherCCMTypes = 'aes-128-ccm' | 'aes-192-ccm' | 'aes-256-ccm' | 'chacha20-poly1305'; + type CipherGCMTypes = 'aes-128-gcm' | 'aes-192-gcm' | 'aes-256-gcm'; + type BinaryLike = string | NodeJS.ArrayBufferView; + type CipherKey = BinaryLike | KeyObject; + interface CipherCCMOptions extends stream.TransformOptions { + authTagLength: number; + } + interface CipherGCMOptions extends stream.TransformOptions { + authTagLength?: number | undefined; + } + /** + * Creates and returns a `Cipher` object that uses the given `algorithm` and`password`. + * + * The `options` argument controls stream behavior and is optional except when a + * cipher in CCM or OCB mode is used (e.g. `'aes-128-ccm'`). In that case, the`authTagLength` option is required and specifies the length of the + * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication + * tag that will be returned by `getAuthTag()` and defaults to 16 bytes. + * + * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On + * recent OpenSSL releases, `openssl list -cipher-algorithms`(`openssl list-cipher-algorithms` for older versions of OpenSSL) will + * display the available cipher algorithms. + * + * The `password` is used to derive the cipher key and initialization vector (IV). + * The value must be either a `'latin1'` encoded string, a `Buffer`, a`TypedArray`, or a `DataView`. + * + * The implementation of `crypto.createCipher()` derives keys using the OpenSSL + * function [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) with the digest algorithm set to MD5, one + * iteration, and no salt. The lack of salt allows dictionary attacks as the same + * password always creates the same key. The low iteration count and + * non-cryptographically secure hash algorithm allow passwords to be tested very + * rapidly. + * + * In line with OpenSSL's recommendation to use a more modern algorithm instead of [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) it is recommended that + * developers derive a key and IV on + * their own using {@link scrypt} and to use {@link createCipheriv} to create the `Cipher` object. Users should not use ciphers with counter mode + * (e.g. CTR, GCM, or CCM) in `crypto.createCipher()`. A warning is emitted when + * they are used in order to avoid the risk of IV reuse that causes + * vulnerabilities. For the case when IV is reused in GCM, see [Nonce-Disrespecting Adversaries](https://github.com/nonce-disrespect/nonce-disrespect) for details. + * @since v0.1.94 + * @deprecated Since v10.0.0 - Use {@link createCipheriv} instead. + * @param options `stream.transform` options + */ + function createCipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): CipherCCM; + /** @deprecated since v10.0.0 use `createCipheriv()` */ + function createCipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): CipherGCM; + /** @deprecated since v10.0.0 use `createCipheriv()` */ + function createCipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Cipher; + /** + * Creates and returns a `Cipher` object, with the given `algorithm`, `key` and + * initialization vector (`iv`). + * + * The `options` argument controls stream behavior and is optional except when a + * cipher in CCM or OCB mode is used (e.g. `'aes-128-ccm'`). In that case, the`authTagLength` option is required and specifies the length of the + * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication + * tag that will be returned by `getAuthTag()` and defaults to 16 bytes. + * + * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On + * recent OpenSSL releases, `openssl list -cipher-algorithms`(`openssl list-cipher-algorithms` for older versions of OpenSSL) will + * display the available cipher algorithms. + * + * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded + * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be + * a `KeyObject` of type `secret`. If the cipher does not need + * an initialization vector, `iv` may be `null`. + * + * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * Initialization vectors should be unpredictable and unique; ideally, they will be + * cryptographically random. They do not have to be secret: IVs are typically just + * added to ciphertext messages unencrypted. It may sound contradictory that + * something has to be unpredictable and unique, but does not have to be secret; + * remember that an attacker must not be able to predict ahead of time what a + * given IV will be. + * @since v0.1.94 + * @param options `stream.transform` options + */ + function createCipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike | null, options: CipherCCMOptions): CipherCCM; + function createCipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike | null, options?: CipherGCMOptions): CipherGCM; + function createCipheriv(algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions): Cipher; + /** + * Instances of the `Cipher` class are used to encrypt data. The class can be + * used in one of two ways: + * + * * As a `stream` that is both readable and writable, where plain unencrypted + * data is written to produce encrypted data on the readable side, or + * * Using the `cipher.update()` and `cipher.final()` methods to produce + * the encrypted data. + * + * The {@link createCipher} or {@link createCipheriv} methods are + * used to create `Cipher` instances. `Cipher` objects are not to be created + * directly using the `new` keyword. + * + * Example: Using `Cipher` objects as streams: + * + * ```js + * const { + * scrypt, + * randomFill, + * createCipheriv + * } = await import('crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * + * // First, we'll generate the key. The key length is dependent on the algorithm. + * // In this case for aes192, it is 24 bytes (192 bits). + * scrypt(password, 'salt', 24, (err, key) => { + * if (err) throw err; + * // Then, we'll generate a random initialization vector + * randomFill(new Uint8Array(16), (err, iv) => { + * if (err) throw err; + * + * // Once we have the key and iv, we can create and use the cipher... + * const cipher = createCipheriv(algorithm, key, iv); + * + * let encrypted = ''; + * cipher.setEncoding('hex'); + * + * cipher.on('data', (chunk) => encrypted += chunk); + * cipher.on('end', () => console.log(encrypted)); + * + * cipher.write('some clear text data'); + * cipher.end(); + * }); + * }); + * ``` + * + * Example: Using `Cipher` and piped streams: + * + * ```js + * import { + * createReadStream, + * createWriteStream, + * } from 'fs'; + * + * import { + * pipeline + * } from 'stream'; + * + * const { + * scrypt, + * randomFill, + * createCipheriv + * } = await import('crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * + * // First, we'll generate the key. The key length is dependent on the algorithm. + * // In this case for aes192, it is 24 bytes (192 bits). + * scrypt(password, 'salt', 24, (err, key) => { + * if (err) throw err; + * // Then, we'll generate a random initialization vector + * randomFill(new Uint8Array(16), (err, iv) => { + * if (err) throw err; + * + * const cipher = createCipheriv(algorithm, key, iv); + * + * const input = createReadStream('test.js'); + * const output = createWriteStream('test.enc'); + * + * pipeline(input, cipher, output, (err) => { + * if (err) throw err; + * }); + * }); + * }); + * ``` + * + * Example: Using the `cipher.update()` and `cipher.final()` methods: + * + * ```js + * const { + * scrypt, + * randomFill, + * createCipheriv + * } = await import('crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * + * // First, we'll generate the key. The key length is dependent on the algorithm. + * // In this case for aes192, it is 24 bytes (192 bits). + * scrypt(password, 'salt', 24, (err, key) => { + * if (err) throw err; + * // Then, we'll generate a random initialization vector + * randomFill(new Uint8Array(16), (err, iv) => { + * if (err) throw err; + * + * const cipher = createCipheriv(algorithm, key, iv); + * + * let encrypted = cipher.update('some clear text data', 'utf8', 'hex'); + * encrypted += cipher.final('hex'); + * console.log(encrypted); + * }); + * }); + * ``` + * @since v0.1.94 + */ + class Cipher extends stream.Transform { + private constructor(); + /** + * Updates the cipher with `data`. If the `inputEncoding` argument is given, + * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`, `TypedArray`, or`DataView`. If `data` is a `Buffer`, + * `TypedArray`, or `DataView`, then`inputEncoding` is ignored. + * + * The `outputEncoding` specifies the output format of the enciphered + * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned. + * + * The `cipher.update()` method can be called multiple times with new data until `cipher.final()` is called. Calling `cipher.update()` after `cipher.final()` will result in an error being + * thrown. + * @since v0.1.94 + * @param inputEncoding The `encoding` of the data. + * @param outputEncoding The `encoding` of the return value. + */ + update(data: BinaryLike): Buffer; + update(data: string, inputEncoding: Encoding): Buffer; + update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string; + update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string; + /** + * Once the `cipher.final()` method has been called, the `Cipher` object can no + * longer be used to encrypt data. Attempts to call `cipher.final()` more than + * once will result in an error being thrown. + * @since v0.1.94 + * @param outputEncoding The `encoding` of the return value. + * @return Any remaining enciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned. + */ + final(): Buffer; + final(outputEncoding: BufferEncoding): string; + /** + * When using block encryption algorithms, the `Cipher` class will automatically + * add padding to the input data to the appropriate block size. To disable the + * default padding call `cipher.setAutoPadding(false)`. + * + * When `autoPadding` is `false`, the length of the entire input data must be a + * multiple of the cipher's block size or `cipher.final()` will throw an error. + * Disabling automatic padding is useful for non-standard padding, for instance + * using `0x0` instead of PKCS padding. + * + * The `cipher.setAutoPadding()` method must be called before `cipher.final()`. + * @since v0.7.1 + * @param [autoPadding=true] + * @return for method chaining. + */ + setAutoPadding(autoPadding?: boolean): this; + } + interface CipherCCM extends Cipher { + setAAD( + buffer: NodeJS.ArrayBufferView, + options: { + plaintextLength: number; + } + ): this; + getAuthTag(): Buffer; + } + interface CipherGCM extends Cipher { + setAAD( + buffer: NodeJS.ArrayBufferView, + options?: { + plaintextLength: number; + } + ): this; + getAuthTag(): Buffer; + } + /** + * Creates and returns a `Decipher` object that uses the given `algorithm` and`password` (key). + * + * The `options` argument controls stream behavior and is optional except when a + * cipher in CCM or OCB mode is used (e.g. `'aes-128-ccm'`). In that case, the`authTagLength` option is required and specifies the length of the + * authentication tag in bytes, see `CCM mode`. + * + * The implementation of `crypto.createDecipher()` derives keys using the OpenSSL + * function [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) with the digest algorithm set to MD5, one + * iteration, and no salt. The lack of salt allows dictionary attacks as the same + * password always creates the same key. The low iteration count and + * non-cryptographically secure hash algorithm allow passwords to be tested very + * rapidly. + * + * In line with OpenSSL's recommendation to use a more modern algorithm instead of [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) it is recommended that + * developers derive a key and IV on + * their own using {@link scrypt} and to use {@link createDecipheriv} to create the `Decipher` object. + * @since v0.1.94 + * @deprecated Since v10.0.0 - Use {@link createDecipheriv} instead. + * @param options `stream.transform` options + */ + function createDecipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): DecipherCCM; + /** @deprecated since v10.0.0 use `createDecipheriv()` */ + function createDecipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): DecipherGCM; + /** @deprecated since v10.0.0 use `createDecipheriv()` */ + function createDecipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Decipher; + /** + * Creates and returns a `Decipher` object that uses the given `algorithm`, `key`and initialization vector (`iv`). + * + * The `options` argument controls stream behavior and is optional except when a + * cipher in CCM or OCB mode is used (e.g. `'aes-128-ccm'`). In that case, the`authTagLength` option is required and specifies the length of the + * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to restrict accepted authentication tags + * to those with the specified length. + * + * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On + * recent OpenSSL releases, `openssl list -cipher-algorithms`(`openssl list-cipher-algorithms` for older versions of OpenSSL) will + * display the available cipher algorithms. + * + * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded + * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be + * a `KeyObject` of type `secret`. If the cipher does not need + * an initialization vector, `iv` may be `null`. + * + * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * Initialization vectors should be unpredictable and unique; ideally, they will be + * cryptographically random. They do not have to be secret: IVs are typically just + * added to ciphertext messages unencrypted. It may sound contradictory that + * something has to be unpredictable and unique, but does not have to be secret; + * remember that an attacker must not be able to predict ahead of time what a given + * IV will be. + * @since v0.1.94 + * @param options `stream.transform` options + */ + function createDecipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike | null, options: CipherCCMOptions): DecipherCCM; + function createDecipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike | null, options?: CipherGCMOptions): DecipherGCM; + function createDecipheriv(algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions): Decipher; + /** + * Instances of the `Decipher` class are used to decrypt data. The class can be + * used in one of two ways: + * + * * As a `stream` that is both readable and writable, where plain encrypted + * data is written to produce unencrypted data on the readable side, or + * * Using the `decipher.update()` and `decipher.final()` methods to + * produce the unencrypted data. + * + * The {@link createDecipher} or {@link createDecipheriv} methods are + * used to create `Decipher` instances. `Decipher` objects are not to be created + * directly using the `new` keyword. + * + * Example: Using `Decipher` objects as streams: + * + * ```js + * import { Buffer } from 'buffer'; + * const { + * scryptSync, + * createDecipheriv + * } = await import('crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * // Key length is dependent on the algorithm. In this case for aes192, it is + * // 24 bytes (192 bits). + * // Use the async `crypto.scrypt()` instead. + * const key = scryptSync(password, 'salt', 24); + * // The IV is usually passed along with the ciphertext. + * const iv = Buffer.alloc(16, 0); // Initialization vector. + * + * const decipher = createDecipheriv(algorithm, key, iv); + * + * let decrypted = ''; + * decipher.on('readable', () => { + * while (null !== (chunk = decipher.read())) { + * decrypted += chunk.toString('utf8'); + * } + * }); + * decipher.on('end', () => { + * console.log(decrypted); + * // Prints: some clear text data + * }); + * + * // Encrypted with same algorithm, key and iv. + * const encrypted = + * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa'; + * decipher.write(encrypted, 'hex'); + * decipher.end(); + * ``` + * + * Example: Using `Decipher` and piped streams: + * + * ```js + * import { + * createReadStream, + * createWriteStream, + * } from 'fs'; + * import { Buffer } from 'buffer'; + * const { + * scryptSync, + * createDecipheriv + * } = await import('crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * // Use the async `crypto.scrypt()` instead. + * const key = scryptSync(password, 'salt', 24); + * // The IV is usually passed along with the ciphertext. + * const iv = Buffer.alloc(16, 0); // Initialization vector. + * + * const decipher = createDecipheriv(algorithm, key, iv); + * + * const input = createReadStream('test.enc'); + * const output = createWriteStream('test.js'); + * + * input.pipe(decipher).pipe(output); + * ``` + * + * Example: Using the `decipher.update()` and `decipher.final()` methods: + * + * ```js + * import { Buffer } from 'buffer'; + * const { + * scryptSync, + * createDecipheriv + * } = await import('crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * // Use the async `crypto.scrypt()` instead. + * const key = scryptSync(password, 'salt', 24); + * // The IV is usually passed along with the ciphertext. + * const iv = Buffer.alloc(16, 0); // Initialization vector. + * + * const decipher = createDecipheriv(algorithm, key, iv); + * + * // Encrypted using same algorithm, key and iv. + * const encrypted = + * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa'; + * let decrypted = decipher.update(encrypted, 'hex', 'utf8'); + * decrypted += decipher.final('utf8'); + * console.log(decrypted); + * // Prints: some clear text data + * ``` + * @since v0.1.94 + */ + class Decipher extends stream.Transform { + private constructor(); + /** + * Updates the decipher with `data`. If the `inputEncoding` argument is given, + * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`. If `data` is a `Buffer` then `inputEncoding` is + * ignored. + * + * The `outputEncoding` specifies the output format of the enciphered + * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned. + * + * The `decipher.update()` method can be called multiple times with new data until `decipher.final()` is called. Calling `decipher.update()` after `decipher.final()` will result in an error + * being thrown. + * @since v0.1.94 + * @param inputEncoding The `encoding` of the `data` string. + * @param outputEncoding The `encoding` of the return value. + */ + update(data: NodeJS.ArrayBufferView): Buffer; + update(data: string, inputEncoding: Encoding): Buffer; + update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string; + update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string; + /** + * Once the `decipher.final()` method has been called, the `Decipher` object can + * no longer be used to decrypt data. Attempts to call `decipher.final()` more + * than once will result in an error being thrown. + * @since v0.1.94 + * @param outputEncoding The `encoding` of the return value. + * @return Any remaining deciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned. + */ + final(): Buffer; + final(outputEncoding: BufferEncoding): string; + /** + * When data has been encrypted without standard block padding, calling`decipher.setAutoPadding(false)` will disable automatic padding to prevent `decipher.final()` from checking for and + * removing padding. + * + * Turning auto padding off will only work if the input data's length is a + * multiple of the ciphers block size. + * + * The `decipher.setAutoPadding()` method must be called before `decipher.final()`. + * @since v0.7.1 + * @param [autoPadding=true] + * @return for method chaining. + */ + setAutoPadding(auto_padding?: boolean): this; + } + interface DecipherCCM extends Decipher { + setAuthTag(buffer: NodeJS.ArrayBufferView): this; + setAAD( + buffer: NodeJS.ArrayBufferView, + options: { + plaintextLength: number; + } + ): this; + } + interface DecipherGCM extends Decipher { + setAuthTag(buffer: NodeJS.ArrayBufferView): this; + setAAD( + buffer: NodeJS.ArrayBufferView, + options?: { + plaintextLength: number; + } + ): this; + } + interface PrivateKeyInput { + key: string | Buffer; + format?: KeyFormat | undefined; + type?: 'pkcs1' | 'pkcs8' | 'sec1' | undefined; + passphrase?: string | Buffer | undefined; + } + interface PublicKeyInput { + key: string | Buffer; + format?: KeyFormat | undefined; + type?: 'pkcs1' | 'spki' | undefined; + } + /** + * Asynchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`. + * + * ```js + * const { + * generateKey + * } = await import('crypto'); + * + * generateKey('hmac', { length: 64 }, (err, key) => { + * if (err) throw err; + * console.log(key.export().toString('hex')); // 46e..........620 + * }); + * ``` + * @since v15.0.0 + * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`. + */ + function generateKey( + type: 'hmac' | 'aes', + options: { + length: number; + }, + callback: (err: Error | null, key: KeyObject) => void + ): void; + /** + * Synchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`. + * + * ```js + * const { + * generateKeySync + * } = await import('crypto'); + * + * const key = generateKeySync('hmac', { length: 64 }); + * console.log(key.export().toString('hex')); // e89..........41e + * ``` + * @since v15.0.0 + * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`. + */ + function generateKeySync( + type: 'hmac' | 'aes', + options: { + length: number; + } + ): KeyObject; + interface JsonWebKeyInput { + key: JsonWebKey; + format: 'jwk'; + } + /** + * Creates and returns a new key object containing a private key. If `key` is a + * string or `Buffer`, `format` is assumed to be `'pem'`; otherwise, `key`must be an object with the properties described above. + * + * If the private key is encrypted, a `passphrase` must be specified. The length + * of the passphrase is limited to 1024 bytes. + * @since v11.6.0 + */ + function createPrivateKey(key: PrivateKeyInput | string | Buffer | JsonWebKeyInput): KeyObject; + /** + * Creates and returns a new key object containing a public key. If `key` is a + * string or `Buffer`, `format` is assumed to be `'pem'`; if `key` is a `KeyObject`with type `'private'`, the public key is derived from the given private key; + * otherwise, `key` must be an object with the properties described above. + * + * If the format is `'pem'`, the `'key'` may also be an X.509 certificate. + * + * Because public keys can be derived from private keys, a private key may be + * passed instead of a public key. In that case, this function behaves as if {@link createPrivateKey} had been called, except that the type of the + * returned `KeyObject` will be `'public'` and that the private key cannot be + * extracted from the returned `KeyObject`. Similarly, if a `KeyObject` with type`'private'` is given, a new `KeyObject` with type `'public'` will be returned + * and it will be impossible to extract the private key from the returned object. + * @since v11.6.0 + */ + function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject | JsonWebKeyInput): KeyObject; + /** + * Creates and returns a new key object containing a secret key for symmetric + * encryption or `Hmac`. + * @since v11.6.0 + * @param encoding The string encoding when `key` is a string. + */ + function createSecretKey(key: NodeJS.ArrayBufferView): KeyObject; + function createSecretKey(key: string, encoding: BufferEncoding): KeyObject; + /** + * Creates and returns a `Sign` object that uses the given `algorithm`. Use {@link getHashes} to obtain the names of the available digest algorithms. + * Optional `options` argument controls the `stream.Writable` behavior. + * + * In some cases, a `Sign` instance can be created using the name of a signature + * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use + * the corresponding digest algorithm. This does not work for all signature + * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest + * algorithm names. + * @since v0.1.92 + * @param options `stream.Writable` options + */ + function createSign(algorithm: string, options?: stream.WritableOptions): Sign; + type DSAEncoding = 'der' | 'ieee-p1363'; + interface SigningOptions { + /** + * @See crypto.constants.RSA_PKCS1_PADDING + */ + padding?: number | undefined; + saltLength?: number | undefined; + dsaEncoding?: DSAEncoding | undefined; + } + interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {} + interface SignKeyObjectInput extends SigningOptions { + key: KeyObject; + } + interface VerifyPublicKeyInput extends PublicKeyInput, SigningOptions {} + interface VerifyKeyObjectInput extends SigningOptions { + key: KeyObject; + } + type KeyLike = string | Buffer | KeyObject; + /** + * The `Sign` class is a utility for generating signatures. It can be used in one + * of two ways: + * + * * As a writable `stream`, where data to be signed is written and the `sign.sign()` method is used to generate and return the signature, or + * * Using the `sign.update()` and `sign.sign()` methods to produce the + * signature. + * + * The {@link createSign} method is used to create `Sign` instances. The + * argument is the string name of the hash function to use. `Sign` objects are not + * to be created directly using the `new` keyword. + * + * Example: Using `Sign` and `Verify` objects as streams: + * + * ```js + * const { + * generateKeyPairSync, + * createSign, + * createVerify + * } = await import('crypto'); + * + * const { privateKey, publicKey } = generateKeyPairSync('ec', { + * namedCurve: 'sect239k1' + * }); + * + * const sign = createSign('SHA256'); + * sign.write('some data to sign'); + * sign.end(); + * const signature = sign.sign(privateKey, 'hex'); + * + * const verify = createVerify('SHA256'); + * verify.write('some data to sign'); + * verify.end(); + * console.log(verify.verify(publicKey, signature, 'hex')); + * // Prints: true + * ``` + * + * Example: Using the `sign.update()` and `verify.update()` methods: + * + * ```js + * const { + * generateKeyPairSync, + * createSign, + * createVerify + * } = await import('crypto'); + * + * const { privateKey, publicKey } = generateKeyPairSync('rsa', { + * modulusLength: 2048, + * }); + * + * const sign = createSign('SHA256'); + * sign.update('some data to sign'); + * sign.end(); + * const signature = sign.sign(privateKey); + * + * const verify = createVerify('SHA256'); + * verify.update('some data to sign'); + * verify.end(); + * console.log(verify.verify(publicKey, signature)); + * // Prints: true + * ``` + * @since v0.1.92 + */ + class Sign extends stream.Writable { + private constructor(); + /** + * Updates the `Sign` content with the given `data`, the encoding of which + * is given in `inputEncoding`. + * If `encoding` is not provided, and the `data` is a string, an + * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. + * + * This can be called many times with new data as it is streamed. + * @since v0.1.92 + * @param inputEncoding The `encoding` of the `data` string. + */ + update(data: BinaryLike): this; + update(data: string, inputEncoding: Encoding): this; + /** + * Calculates the signature on all the data passed through using either `sign.update()` or `sign.write()`. + * + * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an + * object, the following additional properties can be passed: + * + * If `outputEncoding` is provided a string is returned; otherwise a `Buffer` is returned. + * + * The `Sign` object can not be again used after `sign.sign()` method has been + * called. Multiple calls to `sign.sign()` will result in an error being thrown. + * @since v0.1.92 + */ + sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer; + sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput, outputFormat: BinaryToTextEncoding): string; + } + /** + * Creates and returns a `Verify` object that uses the given algorithm. + * Use {@link getHashes} to obtain an array of names of the available + * signing algorithms. Optional `options` argument controls the`stream.Writable` behavior. + * + * In some cases, a `Verify` instance can be created using the name of a signature + * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use + * the corresponding digest algorithm. This does not work for all signature + * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest + * algorithm names. + * @since v0.1.92 + * @param options `stream.Writable` options + */ + function createVerify(algorithm: string, options?: stream.WritableOptions): Verify; + /** + * The `Verify` class is a utility for verifying signatures. It can be used in one + * of two ways: + * + * * As a writable `stream` where written data is used to validate against the + * supplied signature, or + * * Using the `verify.update()` and `verify.verify()` methods to verify + * the signature. + * + * The {@link createVerify} method is used to create `Verify` instances.`Verify` objects are not to be created directly using the `new` keyword. + * + * See `Sign` for examples. + * @since v0.1.92 + */ + class Verify extends stream.Writable { + private constructor(); + /** + * Updates the `Verify` content with the given `data`, the encoding of which + * is given in `inputEncoding`. + * If `inputEncoding` is not provided, and the `data` is a string, an + * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. + * + * This can be called many times with new data as it is streamed. + * @since v0.1.92 + * @param inputEncoding The `encoding` of the `data` string. + */ + update(data: BinaryLike): Verify; + update(data: string, inputEncoding: Encoding): Verify; + /** + * Verifies the provided data using the given `object` and `signature`. + * + * If `object` is not a `KeyObject`, this function behaves as if`object` had been passed to {@link createPublicKey}. If it is an + * object, the following additional properties can be passed: + * + * The `signature` argument is the previously calculated signature for the data, in + * the `signatureEncoding`. + * If a `signatureEncoding` is specified, the `signature` is expected to be a + * string; otherwise `signature` is expected to be a `Buffer`,`TypedArray`, or `DataView`. + * + * The `verify` object can not be used again after `verify.verify()` has been + * called. Multiple calls to `verify.verify()` will result in an error being + * thrown. + * + * Because public keys can be derived from private keys, a private key may + * be passed instead of a public key. + * @since v0.1.92 + */ + verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: NodeJS.ArrayBufferView): boolean; + verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: string, signature_format?: BinaryToTextEncoding): boolean; + } + /** + * Creates a `DiffieHellman` key exchange object using the supplied `prime` and an + * optional specific `generator`. + * + * The `generator` argument can be a number, string, or `Buffer`. If`generator` is not specified, the value `2` is used. + * + * If `primeEncoding` is specified, `prime` is expected to be a string; otherwise + * a `Buffer`, `TypedArray`, or `DataView` is expected. + * + * If `generatorEncoding` is specified, `generator` is expected to be a string; + * otherwise a number, `Buffer`, `TypedArray`, or `DataView` is expected. + * @since v0.11.12 + * @param primeEncoding The `encoding` of the `prime` string. + * @param [generator=2] + * @param generatorEncoding The `encoding` of the `generator` string. + */ + function createDiffieHellman(primeLength: number, generator?: number | NodeJS.ArrayBufferView): DiffieHellman; + function createDiffieHellman(prime: NodeJS.ArrayBufferView): DiffieHellman; + function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding): DiffieHellman; + function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator: number | NodeJS.ArrayBufferView): DiffieHellman; + function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator: string, generatorEncoding: BinaryToTextEncoding): DiffieHellman; + /** + * The `DiffieHellman` class is a utility for creating Diffie-Hellman key + * exchanges. + * + * Instances of the `DiffieHellman` class can be created using the {@link createDiffieHellman} function. + * + * ```js + * import assert from 'assert'; + * + * const { + * createDiffieHellman + * } = await import('crypto'); + * + * // Generate Alice's keys... + * const alice = createDiffieHellman(2048); + * const aliceKey = alice.generateKeys(); + * + * // Generate Bob's keys... + * const bob = createDiffieHellman(alice.getPrime(), alice.getGenerator()); + * const bobKey = bob.generateKeys(); + * + * // Exchange and generate the secret... + * const aliceSecret = alice.computeSecret(bobKey); + * const bobSecret = bob.computeSecret(aliceKey); + * + * // OK + * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex')); + * ``` + * @since v0.5.0 + */ + class DiffieHellman { + private constructor(); + /** + * Generates private and public Diffie-Hellman key values, and returns + * the public key in the specified `encoding`. This key should be + * transferred to the other party. + * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + generateKeys(): Buffer; + generateKeys(encoding: BinaryToTextEncoding): string; + /** + * Computes the shared secret using `otherPublicKey` as the other + * party's public key and returns the computed shared secret. The supplied + * key is interpreted using the specified `inputEncoding`, and secret is + * encoded using specified `outputEncoding`. + * If the `inputEncoding` is not + * provided, `otherPublicKey` is expected to be a `Buffer`,`TypedArray`, or `DataView`. + * + * If `outputEncoding` is given a string is returned; otherwise, a `Buffer` is returned. + * @since v0.5.0 + * @param inputEncoding The `encoding` of an `otherPublicKey` string. + * @param outputEncoding The `encoding` of the return value. + */ + computeSecret(otherPublicKey: NodeJS.ArrayBufferView): Buffer; + computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): Buffer; + computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string; + computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding: BinaryToTextEncoding): string; + /** + * Returns the Diffie-Hellman prime in the specified `encoding`. + * If `encoding` is provided a string is + * returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + getPrime(): Buffer; + getPrime(encoding: BinaryToTextEncoding): string; + /** + * Returns the Diffie-Hellman generator in the specified `encoding`. + * If `encoding` is provided a string is + * returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + getGenerator(): Buffer; + getGenerator(encoding: BinaryToTextEncoding): string; + /** + * Returns the Diffie-Hellman public key in the specified `encoding`. + * If `encoding` is provided a + * string is returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + getPublicKey(): Buffer; + getPublicKey(encoding: BinaryToTextEncoding): string; + /** + * Returns the Diffie-Hellman private key in the specified `encoding`. + * If `encoding` is provided a + * string is returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + getPrivateKey(): Buffer; + getPrivateKey(encoding: BinaryToTextEncoding): string; + /** + * Sets the Diffie-Hellman public key. If the `encoding` argument is provided,`publicKey` is expected + * to be a string. If no `encoding` is provided, `publicKey` is expected + * to be a `Buffer`, `TypedArray`, or `DataView`. + * @since v0.5.0 + * @param encoding The `encoding` of the `publicKey` string. + */ + setPublicKey(publicKey: NodeJS.ArrayBufferView): void; + setPublicKey(publicKey: string, encoding: BufferEncoding): void; + /** + * Sets the Diffie-Hellman private key. If the `encoding` argument is provided,`privateKey` is expected + * to be a string. If no `encoding` is provided, `privateKey` is expected + * to be a `Buffer`, `TypedArray`, or `DataView`. + * @since v0.5.0 + * @param encoding The `encoding` of the `privateKey` string. + */ + setPrivateKey(privateKey: NodeJS.ArrayBufferView): void; + setPrivateKey(privateKey: string, encoding: BufferEncoding): void; + /** + * A bit field containing any warnings and/or errors resulting from a check + * performed during initialization of the `DiffieHellman` object. + * + * The following values are valid for this property (as defined in `constants`module): + * + * * `DH_CHECK_P_NOT_SAFE_PRIME` + * * `DH_CHECK_P_NOT_PRIME` + * * `DH_UNABLE_TO_CHECK_GENERATOR` + * * `DH_NOT_SUITABLE_GENERATOR` + * @since v0.11.12 + */ + verifyError: number; + } + /** + * Creates a predefined `DiffieHellmanGroup` key exchange object. The + * supported groups are: `'modp1'`, `'modp2'`, `'modp5'` (defined in [RFC 2412](https://www.rfc-editor.org/rfc/rfc2412.txt), but see `Caveats`) and `'modp14'`, `'modp15'`,`'modp16'`, `'modp17'`, + * `'modp18'` (defined in [RFC 3526](https://www.rfc-editor.org/rfc/rfc3526.txt)). The + * returned object mimics the interface of objects created by {@link createDiffieHellman}, but will not allow changing + * the keys (with `diffieHellman.setPublicKey()`, for example). The + * advantage of using this method is that the parties do not have to + * generate nor exchange a group modulus beforehand, saving both processor + * and communication time. + * + * Example (obtaining a shared secret): + * + * ```js + * const { + * getDiffieHellman + * } = await import('crypto'); + * const alice = getDiffieHellman('modp14'); + * const bob = getDiffieHellman('modp14'); + * + * alice.generateKeys(); + * bob.generateKeys(); + * + * const aliceSecret = alice.computeSecret(bob.getPublicKey(), null, 'hex'); + * const bobSecret = bob.computeSecret(alice.getPublicKey(), null, 'hex'); + * + * // aliceSecret and bobSecret should be the same + * console.log(aliceSecret === bobSecret); + * ``` + * @since v0.7.5 + */ + function getDiffieHellman(groupName: string): DiffieHellman; + /** + * Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2) + * implementation. A selected HMAC digest algorithm specified by `digest` is + * applied to derive a key of the requested byte length (`keylen`) from the`password`, `salt` and `iterations`. + * + * The supplied `callback` function is called with two arguments: `err` and`derivedKey`. If an error occurs while deriving the key, `err` will be set; + * otherwise `err` will be `null`. By default, the successfully generated`derivedKey` will be passed to the callback as a `Buffer`. An error will be + * thrown if any of the input arguments specify invalid values or types. + * + * If `digest` is `null`, `'sha1'` will be used. This behavior is deprecated, + * please specify a `digest` explicitly. + * + * The `iterations` argument must be a number set as high as possible. The + * higher the number of iterations, the more secure the derived key will be, + * but will take a longer amount of time to complete. + * + * The `salt` should be as unique as possible. It is recommended that a salt is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * ```js + * const { + * pbkdf2 + * } = await import('crypto'); + * + * pbkdf2('secret', 'salt', 100000, 64, 'sha512', (err, derivedKey) => { + * if (err) throw err; + * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae' + * }); + * ``` + * + * The `crypto.DEFAULT_ENCODING` property can be used to change the way the`derivedKey` is passed to the callback. This property, however, has been + * deprecated and use should be avoided. + * + * ```js + * import crypto from 'crypto'; + * crypto.DEFAULT_ENCODING = 'hex'; + * crypto.pbkdf2('secret', 'salt', 100000, 512, 'sha512', (err, derivedKey) => { + * if (err) throw err; + * console.log(derivedKey); // '3745e48...aa39b34' + * }); + * ``` + * + * An array of supported digest functions can be retrieved using {@link getHashes}. + * + * This API uses libuv's threadpool, which can have surprising and + * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. + * @since v0.5.5 + */ + function pbkdf2(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string, callback: (err: Error | null, derivedKey: Buffer) => void): void; + /** + * Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2) + * implementation. A selected HMAC digest algorithm specified by `digest` is + * applied to derive a key of the requested byte length (`keylen`) from the`password`, `salt` and `iterations`. + * + * If an error occurs an `Error` will be thrown, otherwise the derived key will be + * returned as a `Buffer`. + * + * If `digest` is `null`, `'sha1'` will be used. This behavior is deprecated, + * please specify a `digest` explicitly. + * + * The `iterations` argument must be a number set as high as possible. The + * higher the number of iterations, the more secure the derived key will be, + * but will take a longer amount of time to complete. + * + * The `salt` should be as unique as possible. It is recommended that a salt is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * ```js + * const { + * pbkdf2Sync + * } = await import('crypto'); + * + * const key = pbkdf2Sync('secret', 'salt', 100000, 64, 'sha512'); + * console.log(key.toString('hex')); // '3745e48...08d59ae' + * ``` + * + * The `crypto.DEFAULT_ENCODING` property may be used to change the way the`derivedKey` is returned. This property, however, is deprecated and use + * should be avoided. + * + * ```js + * import crypto from 'crypto'; + * crypto.DEFAULT_ENCODING = 'hex'; + * const key = crypto.pbkdf2Sync('secret', 'salt', 100000, 512, 'sha512'); + * console.log(key); // '3745e48...aa39b34' + * ``` + * + * An array of supported digest functions can be retrieved using {@link getHashes}. + * @since v0.9.3 + */ + function pbkdf2Sync(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string): Buffer; + /** + * Generates cryptographically strong pseudorandom data. The `size` argument + * is a number indicating the number of bytes to generate. + * + * If a `callback` function is provided, the bytes are generated asynchronously + * and the `callback` function is invoked with two arguments: `err` and `buf`. + * If an error occurs, `err` will be an `Error` object; otherwise it is `null`. The`buf` argument is a `Buffer` containing the generated bytes. + * + * ```js + * // Asynchronous + * const { + * randomBytes + * } = await import('crypto'); + * + * randomBytes(256, (err, buf) => { + * if (err) throw err; + * console.log(`${buf.length} bytes of random data: ${buf.toString('hex')}`); + * }); + * ``` + * + * If the `callback` function is not provided, the random bytes are generated + * synchronously and returned as a `Buffer`. An error will be thrown if + * there is a problem generating the bytes. + * + * ```js + * // Synchronous + * const { + * randomBytes + * } = await import('crypto'); + * + * const buf = randomBytes(256); + * console.log( + * `${buf.length} bytes of random data: ${buf.toString('hex')}`); + * ``` + * + * The `crypto.randomBytes()` method will not complete until there is + * sufficient entropy available. + * This should normally never take longer than a few milliseconds. The only time + * when generating the random bytes may conceivably block for a longer period of + * time is right after boot, when the whole system is still low on entropy. + * + * This API uses libuv's threadpool, which can have surprising and + * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. + * + * The asynchronous version of `crypto.randomBytes()` is carried out in a single + * threadpool request. To minimize threadpool task length variation, partition + * large `randomBytes` requests when doing so as part of fulfilling a client + * request. + * @since v0.5.8 + * @param size The number of bytes to generate. The `size` must not be larger than `2**31 - 1`. + * @return if the `callback` function is not provided. + */ + function randomBytes(size: number): Buffer; + function randomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void; + function pseudoRandomBytes(size: number): Buffer; + function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void; + /** + * Return a random integer `n` such that `min <= n < max`. This + * implementation avoids [modulo bias](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Modulo_bias). + * + * The range (`max - min`) must be less than 248. `min` and `max` must + * be [safe integers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger). + * + * If the `callback` function is not provided, the random integer is + * generated synchronously. + * + * ```js + * // Asynchronous + * const { + * randomInt + * } = await import('crypto'); + * + * randomInt(3, (err, n) => { + * if (err) throw err; + * console.log(`Random number chosen from (0, 1, 2): ${n}`); + * }); + * ``` + * + * ```js + * // Synchronous + * const { + * randomInt + * } = await import('crypto'); + * + * const n = randomInt(3); + * console.log(`Random number chosen from (0, 1, 2): ${n}`); + * ``` + * + * ```js + * // With `min` argument + * const { + * randomInt + * } = await import('crypto'); + * + * const n = randomInt(1, 7); + * console.log(`The dice rolled: ${n}`); + * ``` + * @since v14.10.0, v12.19.0 + * @param [min=0] Start of random range (inclusive). + * @param max End of random range (exclusive). + * @param callback `function(err, n) {}`. + */ + function randomInt(max: number): number; + function randomInt(min: number, max: number): number; + function randomInt(max: number, callback: (err: Error | null, value: number) => void): void; + function randomInt(min: number, max: number, callback: (err: Error | null, value: number) => void): void; + /** + * Synchronous version of {@link randomFill}. + * + * ```js + * import { Buffer } from 'buffer'; + * const { randomFillSync } = await import('crypto'); + * + * const buf = Buffer.alloc(10); + * console.log(randomFillSync(buf).toString('hex')); + * + * randomFillSync(buf, 5); + * console.log(buf.toString('hex')); + * + * // The above is equivalent to the following: + * randomFillSync(buf, 5, 5); + * console.log(buf.toString('hex')); + * ``` + * + * Any `ArrayBuffer`, `TypedArray` or `DataView` instance may be passed as`buffer`. + * + * ```js + * import { Buffer } from 'buffer'; + * const { randomFillSync } = await import('crypto'); + * + * const a = new Uint32Array(10); + * console.log(Buffer.from(randomFillSync(a).buffer, + * a.byteOffset, a.byteLength).toString('hex')); + * + * const b = new DataView(new ArrayBuffer(10)); + * console.log(Buffer.from(randomFillSync(b).buffer, + * b.byteOffset, b.byteLength).toString('hex')); + * + * const c = new ArrayBuffer(10); + * console.log(Buffer.from(randomFillSync(c)).toString('hex')); + * ``` + * @since v7.10.0, v6.13.0 + * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`. + * @param [offset=0] + * @param [size=buffer.length - offset] + * @return The object passed as `buffer` argument. + */ + function randomFillSync(buffer: T, offset?: number, size?: number): T; + /** + * This function is similar to {@link randomBytes} but requires the first + * argument to be a `Buffer` that will be filled. It also + * requires that a callback is passed in. + * + * If the `callback` function is not provided, an error will be thrown. + * + * ```js + * import { Buffer } from 'buffer'; + * const { randomFill } = await import('crypto'); + * + * const buf = Buffer.alloc(10); + * randomFill(buf, (err, buf) => { + * if (err) throw err; + * console.log(buf.toString('hex')); + * }); + * + * randomFill(buf, 5, (err, buf) => { + * if (err) throw err; + * console.log(buf.toString('hex')); + * }); + * + * // The above is equivalent to the following: + * randomFill(buf, 5, 5, (err, buf) => { + * if (err) throw err; + * console.log(buf.toString('hex')); + * }); + * ``` + * + * Any `ArrayBuffer`, `TypedArray`, or `DataView` instance may be passed as`buffer`. + * + * While this includes instances of `Float32Array` and `Float64Array`, this + * function should not be used to generate random floating-point numbers. The + * result may contain `+Infinity`, `-Infinity`, and `NaN`, and even if the array + * contains finite numbers only, they are not drawn from a uniform random + * distribution and have no meaningful lower or upper bounds. + * + * ```js + * import { Buffer } from 'buffer'; + * const { randomFill } = await import('crypto'); + * + * const a = new Uint32Array(10); + * randomFill(a, (err, buf) => { + * if (err) throw err; + * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength) + * .toString('hex')); + * }); + * + * const b = new DataView(new ArrayBuffer(10)); + * randomFill(b, (err, buf) => { + * if (err) throw err; + * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength) + * .toString('hex')); + * }); + * + * const c = new ArrayBuffer(10); + * randomFill(c, (err, buf) => { + * if (err) throw err; + * console.log(Buffer.from(buf).toString('hex')); + * }); + * ``` + * + * This API uses libuv's threadpool, which can have surprising and + * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. + * + * The asynchronous version of `crypto.randomFill()` is carried out in a single + * threadpool request. To minimize threadpool task length variation, partition + * large `randomFill` requests when doing so as part of fulfilling a client + * request. + * @since v7.10.0, v6.13.0 + * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`. + * @param [offset=0] + * @param [size=buffer.length - offset] + * @param callback `function(err, buf) {}`. + */ + function randomFill(buffer: T, callback: (err: Error | null, buf: T) => void): void; + function randomFill(buffer: T, offset: number, callback: (err: Error | null, buf: T) => void): void; + function randomFill(buffer: T, offset: number, size: number, callback: (err: Error | null, buf: T) => void): void; + interface ScryptOptions { + cost?: number | undefined; + blockSize?: number | undefined; + parallelization?: number | undefined; + N?: number | undefined; + r?: number | undefined; + p?: number | undefined; + maxmem?: number | undefined; + } + /** + * Provides an asynchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based + * key derivation function that is designed to be expensive computationally and + * memory-wise in order to make brute-force attacks unrewarding. + * + * The `salt` should be as unique as possible. It is recommended that a salt is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * The `callback` function is called with two arguments: `err` and `derivedKey`.`err` is an exception object when key derivation fails, otherwise `err` is`null`. `derivedKey` is passed to the + * callback as a `Buffer`. + * + * An exception is thrown when any of the input arguments specify invalid values + * or types. + * + * ```js + * const { + * scrypt + * } = await import('crypto'); + * + * // Using the factory defaults. + * scrypt('password', 'salt', 64, (err, derivedKey) => { + * if (err) throw err; + * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae' + * }); + * // Using a custom N parameter. Must be a power of two. + * scrypt('password', 'salt', 64, { N: 1024 }, (err, derivedKey) => { + * if (err) throw err; + * console.log(derivedKey.toString('hex')); // '3745e48...aa39b34' + * }); + * ``` + * @since v10.5.0 + */ + function scrypt(password: BinaryLike, salt: BinaryLike, keylen: number, callback: (err: Error | null, derivedKey: Buffer) => void): void; + function scrypt(password: BinaryLike, salt: BinaryLike, keylen: number, options: ScryptOptions, callback: (err: Error | null, derivedKey: Buffer) => void): void; + /** + * Provides a synchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based + * key derivation function that is designed to be expensive computationally and + * memory-wise in order to make brute-force attacks unrewarding. + * + * The `salt` should be as unique as possible. It is recommended that a salt is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * An exception is thrown when key derivation fails, otherwise the derived key is + * returned as a `Buffer`. + * + * An exception is thrown when any of the input arguments specify invalid values + * or types. + * + * ```js + * const { + * scryptSync + * } = await import('crypto'); + * // Using the factory defaults. + * + * const key1 = scryptSync('password', 'salt', 64); + * console.log(key1.toString('hex')); // '3745e48...08d59ae' + * // Using a custom N parameter. Must be a power of two. + * const key2 = scryptSync('password', 'salt', 64, { N: 1024 }); + * console.log(key2.toString('hex')); // '3745e48...aa39b34' + * ``` + * @since v10.5.0 + */ + function scryptSync(password: BinaryLike, salt: BinaryLike, keylen: number, options?: ScryptOptions): Buffer; + interface RsaPublicKey { + key: KeyLike; + padding?: number | undefined; + } + interface RsaPrivateKey { + key: KeyLike; + passphrase?: string | undefined; + /** + * @default 'sha1' + */ + oaepHash?: string | undefined; + oaepLabel?: NodeJS.TypedArray | undefined; + padding?: number | undefined; + } + /** + * Encrypts the content of `buffer` with `key` and returns a new `Buffer` with encrypted content. The returned data can be decrypted using + * the corresponding private key, for example using {@link privateDecrypt}. + * + * If `key` is not a `KeyObject`, this function behaves as if`key` had been passed to {@link createPublicKey}. If it is an + * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_OAEP_PADDING`. + * + * Because RSA public keys can be derived from private keys, a private key may + * be passed instead of a public key. + * @since v0.11.14 + */ + function publicEncrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; + /** + * Decrypts `buffer` with `key`.`buffer` was previously encrypted using + * the corresponding private key, for example using {@link privateEncrypt}. + * + * If `key` is not a `KeyObject`, this function behaves as if`key` had been passed to {@link createPublicKey}. If it is an + * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_PADDING`. + * + * Because RSA public keys can be derived from private keys, a private key may + * be passed instead of a public key. + * @since v1.1.0 + */ + function publicDecrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; + /** + * Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using + * the corresponding public key, for example using {@link publicEncrypt}. + * + * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an + * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_OAEP_PADDING`. + * @since v0.11.14 + */ + function privateDecrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; + /** + * Encrypts `buffer` with `privateKey`. The returned data can be decrypted using + * the corresponding public key, for example using {@link publicDecrypt}. + * + * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an + * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_PADDING`. + * @since v1.1.0 + */ + function privateEncrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; + /** + * ```js + * const { + * getCiphers + * } = await import('crypto'); + * + * console.log(getCiphers()); // ['aes-128-cbc', 'aes-128-ccm', ...] + * ``` + * @since v0.9.3 + * @return An array with the names of the supported cipher algorithms. + */ + function getCiphers(): string[]; + /** + * ```js + * const { + * getCurves + * } = await import('crypto'); + * + * console.log(getCurves()); // ['Oakley-EC2N-3', 'Oakley-EC2N-4', ...] + * ``` + * @since v2.3.0 + * @return An array with the names of the supported elliptic curves. + */ + function getCurves(): string[]; + /** + * @since v10.0.0 + * @return `1` if and only if a FIPS compliant crypto provider is currently in use, `0` otherwise. A future semver-major release may change the return type of this API to a {boolean}. + */ + function getFips(): 1 | 0; + /** + * ```js + * const { + * getHashes + * } = await import('crypto'); + * + * console.log(getHashes()); // ['DSA', 'DSA-SHA', 'DSA-SHA1', ...] + * ``` + * @since v0.9.3 + * @return An array of the names of the supported hash algorithms, such as `'RSA-SHA256'`. Hash algorithms are also called "digest" algorithms. + */ + function getHashes(): string[]; + /** + * The `ECDH` class is a utility for creating Elliptic Curve Diffie-Hellman (ECDH) + * key exchanges. + * + * Instances of the `ECDH` class can be created using the {@link createECDH} function. + * + * ```js + * import assert from 'assert'; + * + * const { + * createECDH + * } = await import('crypto'); + * + * // Generate Alice's keys... + * const alice = createECDH('secp521r1'); + * const aliceKey = alice.generateKeys(); + * + * // Generate Bob's keys... + * const bob = createECDH('secp521r1'); + * const bobKey = bob.generateKeys(); + * + * // Exchange and generate the secret... + * const aliceSecret = alice.computeSecret(bobKey); + * const bobSecret = bob.computeSecret(aliceKey); + * + * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex')); + * // OK + * ``` + * @since v0.11.14 + */ + class ECDH { + private constructor(); + /** + * Converts the EC Diffie-Hellman public key specified by `key` and `curve` to the + * format specified by `format`. The `format` argument specifies point encoding + * and can be `'compressed'`, `'uncompressed'` or `'hybrid'`. The supplied key is + * interpreted using the specified `inputEncoding`, and the returned key is encoded + * using the specified `outputEncoding`. + * + * Use {@link getCurves} to obtain a list of available curve names. + * On recent OpenSSL releases, `openssl ecparam -list_curves` will also display + * the name and description of each available elliptic curve. + * + * If `format` is not specified the point will be returned in `'uncompressed'`format. + * + * If the `inputEncoding` is not provided, `key` is expected to be a `Buffer`,`TypedArray`, or `DataView`. + * + * Example (uncompressing a key): + * + * ```js + * const { + * createECDH, + * ECDH + * } = await import('crypto'); + * + * const ecdh = createECDH('secp256k1'); + * ecdh.generateKeys(); + * + * const compressedKey = ecdh.getPublicKey('hex', 'compressed'); + * + * const uncompressedKey = ECDH.convertKey(compressedKey, + * 'secp256k1', + * 'hex', + * 'hex', + * 'uncompressed'); + * + * // The converted key and the uncompressed public key should be the same + * console.log(uncompressedKey === ecdh.getPublicKey('hex')); + * ``` + * @since v10.0.0 + * @param inputEncoding The `encoding` of the `key` string. + * @param outputEncoding The `encoding` of the return value. + * @param [format='uncompressed'] + */ + static convertKey( + key: BinaryLike, + curve: string, + inputEncoding?: BinaryToTextEncoding, + outputEncoding?: 'latin1' | 'hex' | 'base64' | 'base64url', + format?: 'uncompressed' | 'compressed' | 'hybrid' + ): Buffer | string; + /** + * Generates private and public EC Diffie-Hellman key values, and returns + * the public key in the specified `format` and `encoding`. This key should be + * transferred to the other party. + * + * The `format` argument specifies point encoding and can be `'compressed'` or`'uncompressed'`. If `format` is not specified, the point will be returned in`'uncompressed'` format. + * + * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned. + * @since v0.11.14 + * @param encoding The `encoding` of the return value. + * @param [format='uncompressed'] + */ + generateKeys(): Buffer; + generateKeys(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string; + /** + * Computes the shared secret using `otherPublicKey` as the other + * party's public key and returns the computed shared secret. The supplied + * key is interpreted using specified `inputEncoding`, and the returned secret + * is encoded using the specified `outputEncoding`. + * If the `inputEncoding` is not + * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or`DataView`. + * + * If `outputEncoding` is given a string will be returned; otherwise a `Buffer` is returned. + * + * `ecdh.computeSecret` will throw an`ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY` error when `otherPublicKey`lies outside of the elliptic curve. Since `otherPublicKey` is + * usually supplied from a remote user over an insecure network, + * be sure to handle this exception accordingly. + * @since v0.11.14 + * @param inputEncoding The `encoding` of the `otherPublicKey` string. + * @param outputEncoding The `encoding` of the return value. + */ + computeSecret(otherPublicKey: NodeJS.ArrayBufferView): Buffer; + computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): Buffer; + computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string; + computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding: BinaryToTextEncoding): string; + /** + * If `encoding` is specified, a string is returned; otherwise a `Buffer` is + * returned. + * @since v0.11.14 + * @param encoding The `encoding` of the return value. + * @return The EC Diffie-Hellman in the specified `encoding`. + */ + getPrivateKey(): Buffer; + getPrivateKey(encoding: BinaryToTextEncoding): string; + /** + * The `format` argument specifies point encoding and can be `'compressed'` or`'uncompressed'`. If `format` is not specified the point will be returned in`'uncompressed'` format. + * + * If `encoding` is specified, a string is returned; otherwise a `Buffer` is + * returned. + * @since v0.11.14 + * @param encoding The `encoding` of the return value. + * @param [format='uncompressed'] + * @return The EC Diffie-Hellman public key in the specified `encoding` and `format`. + */ + getPublicKey(): Buffer; + getPublicKey(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string; + /** + * Sets the EC Diffie-Hellman private key. + * If `encoding` is provided, `privateKey` is expected + * to be a string; otherwise `privateKey` is expected to be a `Buffer`,`TypedArray`, or `DataView`. + * + * If `privateKey` is not valid for the curve specified when the `ECDH` object was + * created, an error is thrown. Upon setting the private key, the associated + * public point (key) is also generated and set in the `ECDH` object. + * @since v0.11.14 + * @param encoding The `encoding` of the `privateKey` string. + */ + setPrivateKey(privateKey: NodeJS.ArrayBufferView): void; + setPrivateKey(privateKey: string, encoding: BinaryToTextEncoding): void; + } + /** + * Creates an Elliptic Curve Diffie-Hellman (`ECDH`) key exchange object using a + * predefined curve specified by the `curveName` string. Use {@link getCurves} to obtain a list of available curve names. On recent + * OpenSSL releases, `openssl ecparam -list_curves` will also display the name + * and description of each available elliptic curve. + * @since v0.11.14 + */ + function createECDH(curveName: string): ECDH; + /** + * This function is based on a constant-time algorithm. + * Returns true if `a` is equal to `b`, without leaking timing information that + * would allow an attacker to guess one of the values. This is suitable for + * comparing HMAC digests or secret values like authentication cookies or [capability urls](https://www.w3.org/TR/capability-urls/). + * + * `a` and `b` must both be `Buffer`s, `TypedArray`s, or `DataView`s, and they + * must have the same byte length. + * + * If at least one of `a` and `b` is a `TypedArray` with more than one byte per + * entry, such as `Uint16Array`, the result will be computed using the platform + * byte order. + * + * Use of `crypto.timingSafeEqual` does not guarantee that the _surrounding_ code + * is timing-safe. Care should be taken to ensure that the surrounding code does + * not introduce timing vulnerabilities. + * @since v6.6.0 + */ + function timingSafeEqual(a: NodeJS.ArrayBufferView, b: NodeJS.ArrayBufferView): boolean; + /** @deprecated since v10.0.0 */ + const DEFAULT_ENCODING: BufferEncoding; + type KeyType = 'rsa' | 'rsa-pss' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448'; + type KeyFormat = 'pem' | 'der'; + interface BasePrivateKeyEncodingOptions { + format: T; + cipher?: string | undefined; + passphrase?: string | undefined; + } + interface KeyPairKeyObjectResult { + publicKey: KeyObject; + privateKey: KeyObject; + } + interface ED25519KeyPairKeyObjectOptions {} + interface ED448KeyPairKeyObjectOptions {} + interface X25519KeyPairKeyObjectOptions {} + interface X448KeyPairKeyObjectOptions {} + interface ECKeyPairKeyObjectOptions { + /** + * Name of the curve to use + */ + namedCurve: string; + } + interface RSAKeyPairKeyObjectOptions { + /** + * Key size in bits + */ + modulusLength: number; + /** + * Public exponent + * @default 0x10001 + */ + publicExponent?: number | undefined; + } + interface RSAPSSKeyPairKeyObjectOptions { + /** + * Key size in bits + */ + modulusLength: number; + /** + * Public exponent + * @default 0x10001 + */ + publicExponent?: number | undefined; + /** + * Name of the message digest + */ + hashAlgorithm?: string; + /** + * Name of the message digest used by MGF1 + */ + mgf1HashAlgorithm?: string; + /** + * Minimal salt length in bytes + */ + saltLength?: string; + } + interface DSAKeyPairKeyObjectOptions { + /** + * Key size in bits + */ + modulusLength: number; + /** + * Size of q in bits + */ + divisorLength: number; + } + interface RSAKeyPairOptions { + /** + * Key size in bits + */ + modulusLength: number; + /** + * Public exponent + * @default 0x10001 + */ + publicExponent?: number | undefined; + publicKeyEncoding: { + type: 'pkcs1' | 'spki'; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: 'pkcs1' | 'pkcs8'; + }; + } + interface RSAPSSKeyPairOptions { + /** + * Key size in bits + */ + modulusLength: number; + /** + * Public exponent + * @default 0x10001 + */ + publicExponent?: number | undefined; + /** + * Name of the message digest + */ + hashAlgorithm?: string; + /** + * Name of the message digest used by MGF1 + */ + mgf1HashAlgorithm?: string; + /** + * Minimal salt length in bytes + */ + saltLength?: string; + publicKeyEncoding: { + type: 'spki'; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: 'pkcs8'; + }; + } + interface DSAKeyPairOptions { + /** + * Key size in bits + */ + modulusLength: number; + /** + * Size of q in bits + */ + divisorLength: number; + publicKeyEncoding: { + type: 'spki'; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: 'pkcs8'; + }; + } + interface ECKeyPairOptions { + /** + * Name of the curve to use. + */ + namedCurve: string; + publicKeyEncoding: { + type: 'pkcs1' | 'spki'; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: 'sec1' | 'pkcs8'; + }; + } + interface ED25519KeyPairOptions { + publicKeyEncoding: { + type: 'spki'; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: 'pkcs8'; + }; + } + interface ED448KeyPairOptions { + publicKeyEncoding: { + type: 'spki'; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: 'pkcs8'; + }; + } + interface X25519KeyPairOptions { + publicKeyEncoding: { + type: 'spki'; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: 'pkcs8'; + }; + } + interface X448KeyPairOptions { + publicKeyEncoding: { + type: 'spki'; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: 'pkcs8'; + }; + } + interface KeyPairSyncResult { + publicKey: T1; + privateKey: T2; + } + /** + * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC, + * Ed25519, Ed448, X25519, X448, and DH are currently supported. + * + * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function + * behaves as if `keyObject.export()` had been called on its result. Otherwise, + * the respective part of the key is returned as a `KeyObject`. + * + * When encoding public keys, it is recommended to use `'spki'`. When encoding + * private keys, it is recommended to use `'pkcs8'` with a strong passphrase, + * and to keep the passphrase confidential. + * + * ```js + * const { + * generateKeyPairSync + * } = await import('crypto'); + * + * const { + * publicKey, + * privateKey, + * } = generateKeyPairSync('rsa', { + * modulusLength: 4096, + * publicKeyEncoding: { + * type: 'spki', + * format: 'pem' + * }, + * privateKeyEncoding: { + * type: 'pkcs8', + * format: 'pem', + * cipher: 'aes-256-cbc', + * passphrase: 'top secret' + * } + * }); + * ``` + * + * The return value `{ publicKey, privateKey }` represents the generated key pair. + * When PEM encoding was selected, the respective key will be a string, otherwise + * it will be a buffer containing the data encoded as DER. + * @since v10.12.0 + * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`. + */ + function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa', options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult; + function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions): KeyPairKeyObjectResult; + function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'dsa', options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult; + function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ec', options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult; + function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ed25519', options?: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult; + function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'der', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): KeyPairKeyObjectResult; + function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'x25519', options?: X25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult; + function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'der', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'x448', options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult; + /** + * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC, + * Ed25519, Ed448, X25519, X448, and DH are currently supported. + * + * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function + * behaves as if `keyObject.export()` had been called on its result. Otherwise, + * the respective part of the key is returned as a `KeyObject`. + * + * It is recommended to encode public keys as `'spki'` and private keys as`'pkcs8'` with encryption for long-term storage: + * + * ```js + * const { + * generateKeyPair + * } = await import('crypto'); + * + * generateKeyPair('rsa', { + * modulusLength: 4096, + * publicKeyEncoding: { + * type: 'spki', + * format: 'pem' + * }, + * privateKeyEncoding: { + * type: 'pkcs8', + * format: 'pem', + * cipher: 'aes-256-cbc', + * passphrase: 'top secret' + * } + * }, (err, publicKey, privateKey) => { + * // Handle errors and use the generated key pair. + * }); + * ``` + * + * On completion, `callback` will be called with `err` set to `undefined` and`publicKey` / `privateKey` representing the generated key pair. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a `Promise` for an `Object` with `publicKey` and `privateKey` properties. + * @since v10.12.0 + * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`. + */ + function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'rsa', options: RSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'dsa', options: DSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'ec', options: ECKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'ed25519', options: ED25519KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'ed448', options: ED448KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'x25519', options: X25519KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'x448', options: X448KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + namespace generateKeyPair { + function __promisify__( + type: 'rsa', + options: RSAKeyPairOptions<'pem', 'pem'> + ): Promise<{ + publicKey: string; + privateKey: string; + }>; + function __promisify__( + type: 'rsa', + options: RSAKeyPairOptions<'pem', 'der'> + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; + function __promisify__( + type: 'rsa', + options: RSAKeyPairOptions<'der', 'pem'> + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; + function __promisify__( + type: 'rsa', + options: RSAKeyPairOptions<'der', 'der'> + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; + function __promisify__(type: 'rsa', options: RSAKeyPairKeyObjectOptions): Promise; + function __promisify__( + type: 'rsa-pss', + options: RSAPSSKeyPairOptions<'pem', 'pem'> + ): Promise<{ + publicKey: string; + privateKey: string; + }>; + function __promisify__( + type: 'rsa-pss', + options: RSAPSSKeyPairOptions<'pem', 'der'> + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; + function __promisify__( + type: 'rsa-pss', + options: RSAPSSKeyPairOptions<'der', 'pem'> + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; + function __promisify__( + type: 'rsa-pss', + options: RSAPSSKeyPairOptions<'der', 'der'> + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; + function __promisify__(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions): Promise; + function __promisify__( + type: 'dsa', + options: DSAKeyPairOptions<'pem', 'pem'> + ): Promise<{ + publicKey: string; + privateKey: string; + }>; + function __promisify__( + type: 'dsa', + options: DSAKeyPairOptions<'pem', 'der'> + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; + function __promisify__( + type: 'dsa', + options: DSAKeyPairOptions<'der', 'pem'> + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; + function __promisify__( + type: 'dsa', + options: DSAKeyPairOptions<'der', 'der'> + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; + function __promisify__(type: 'dsa', options: DSAKeyPairKeyObjectOptions): Promise; + function __promisify__( + type: 'ec', + options: ECKeyPairOptions<'pem', 'pem'> + ): Promise<{ + publicKey: string; + privateKey: string; + }>; + function __promisify__( + type: 'ec', + options: ECKeyPairOptions<'pem', 'der'> + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; + function __promisify__( + type: 'ec', + options: ECKeyPairOptions<'der', 'pem'> + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; + function __promisify__( + type: 'ec', + options: ECKeyPairOptions<'der', 'der'> + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; + function __promisify__(type: 'ec', options: ECKeyPairKeyObjectOptions): Promise; + function __promisify__( + type: 'ed25519', + options: ED25519KeyPairOptions<'pem', 'pem'> + ): Promise<{ + publicKey: string; + privateKey: string; + }>; + function __promisify__( + type: 'ed25519', + options: ED25519KeyPairOptions<'pem', 'der'> + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; + function __promisify__( + type: 'ed25519', + options: ED25519KeyPairOptions<'der', 'pem'> + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; + function __promisify__( + type: 'ed25519', + options: ED25519KeyPairOptions<'der', 'der'> + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; + function __promisify__(type: 'ed25519', options?: ED25519KeyPairKeyObjectOptions): Promise; + function __promisify__( + type: 'ed448', + options: ED448KeyPairOptions<'pem', 'pem'> + ): Promise<{ + publicKey: string; + privateKey: string; + }>; + function __promisify__( + type: 'ed448', + options: ED448KeyPairOptions<'pem', 'der'> + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; + function __promisify__( + type: 'ed448', + options: ED448KeyPairOptions<'der', 'pem'> + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; + function __promisify__( + type: 'ed448', + options: ED448KeyPairOptions<'der', 'der'> + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; + function __promisify__(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): Promise; + function __promisify__( + type: 'x25519', + options: X25519KeyPairOptions<'pem', 'pem'> + ): Promise<{ + publicKey: string; + privateKey: string; + }>; + function __promisify__( + type: 'x25519', + options: X25519KeyPairOptions<'pem', 'der'> + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; + function __promisify__( + type: 'x25519', + options: X25519KeyPairOptions<'der', 'pem'> + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; + function __promisify__( + type: 'x25519', + options: X25519KeyPairOptions<'der', 'der'> + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; + function __promisify__(type: 'x25519', options?: X25519KeyPairKeyObjectOptions): Promise; + function __promisify__( + type: 'x448', + options: X448KeyPairOptions<'pem', 'pem'> + ): Promise<{ + publicKey: string; + privateKey: string; + }>; + function __promisify__( + type: 'x448', + options: X448KeyPairOptions<'pem', 'der'> + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; + function __promisify__( + type: 'x448', + options: X448KeyPairOptions<'der', 'pem'> + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; + function __promisify__( + type: 'x448', + options: X448KeyPairOptions<'der', 'der'> + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; + function __promisify__(type: 'x448', options?: X448KeyPairKeyObjectOptions): Promise; + } + /** + * Calculates and returns the signature for `data` using the given private key and + * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is + * dependent upon the key type (especially Ed25519 and Ed448). + * + * If `key` is not a `KeyObject`, this function behaves as if `key` had been + * passed to {@link createPrivateKey}. If it is an object, the following + * additional properties can be passed: + * + * If the `callback` function is provided this function uses libuv's threadpool. + * @since v12.0.0 + */ + function sign(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer; + function sign( + algorithm: string | null | undefined, + data: NodeJS.ArrayBufferView, + key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput, + callback: (error: Error | null, data: Buffer) => void + ): void; + /** + * Verifies the given signature for `data` using the given key and algorithm. If`algorithm` is `null` or `undefined`, then the algorithm is dependent upon the + * key type (especially Ed25519 and Ed448). + * + * If `key` is not a `KeyObject`, this function behaves as if `key` had been + * passed to {@link createPublicKey}. If it is an object, the following + * additional properties can be passed: + * + * The `signature` argument is the previously calculated signature for the `data`. + * + * Because public keys can be derived from private keys, a private key or a public + * key may be passed for `key`. + * + * If the `callback` function is provided this function uses libuv's threadpool. + * @since v12.0.0 + */ + function verify(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: NodeJS.ArrayBufferView): boolean; + function verify( + algorithm: string | null | undefined, + data: NodeJS.ArrayBufferView, + key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, + signature: NodeJS.ArrayBufferView, + callback: (error: Error | null, result: boolean) => void + ): void; + /** + * Computes the Diffie-Hellman secret based on a `privateKey` and a `publicKey`. + * Both keys must have the same `asymmetricKeyType`, which must be one of `'dh'`(for Diffie-Hellman), `'ec'` (for ECDH), `'x448'`, or `'x25519'` (for ECDH-ES). + * @since v13.9.0, v12.17.0 + */ + function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }): Buffer; + type CipherMode = 'cbc' | 'ccm' | 'cfb' | 'ctr' | 'ecb' | 'gcm' | 'ocb' | 'ofb' | 'stream' | 'wrap' | 'xts'; + interface CipherInfoOptions { + /** + * A test key length. + */ + keyLength?: number | undefined; + /** + * A test IV length. + */ + ivLength?: number | undefined; + } + interface CipherInfo { + /** + * The name of the cipher. + */ + name: string; + /** + * The nid of the cipher. + */ + nid: number; + /** + * The block size of the cipher in bytes. + * This property is omitted when mode is 'stream'. + */ + blockSize?: number | undefined; + /** + * The expected or default initialization vector length in bytes. + * This property is omitted if the cipher does not use an initialization vector. + */ + ivLength?: number | undefined; + /** + * The expected or default key length in bytes. + */ + keyLength: number; + /** + * The cipher mode. + */ + mode: CipherMode; + } + /** + * Returns information about a given cipher. + * + * Some ciphers accept variable length keys and initialization vectors. By default, + * the `crypto.getCipherInfo()` method will return the default values for these + * ciphers. To test if a given key length or iv length is acceptable for given + * cipher, use the `keyLength` and `ivLength` options. If the given values are + * unacceptable, `undefined` will be returned. + * @since v15.0.0 + * @param nameOrNid The name or nid of the cipher to query. + */ + function getCipherInfo(nameOrNid: string | number, options?: CipherInfoOptions): CipherInfo | undefined; + /** + * HKDF is a simple key derivation function defined in RFC 5869\. The given `ikm`,`salt` and `info` are used with the `digest` to derive a key of `keylen` bytes. + * + * The supplied `callback` function is called with two arguments: `err` and`derivedKey`. If an errors occurs while deriving the key, `err` will be set; + * otherwise `err` will be `null`. The successfully generated `derivedKey` will + * be passed to the callback as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). An error will be thrown if any + * of the input arguments specify invalid values or types. + * + * ```js + * import { Buffer } from 'buffer'; + * const { + * hkdf + * } = await import('crypto'); + * + * hkdf('sha512', 'key', 'salt', 'info', 64, (err, derivedKey) => { + * if (err) throw err; + * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653' + * }); + * ``` + * @since v15.0.0 + * @param digest The digest algorithm to use. + * @param ikm The input keying material. It must be at least one byte in length. + * @param salt The salt value. Must be provided but can be zero-length. + * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes. + * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512` + * generates 64-byte hashes, making the maximum HKDF output 16320 bytes). + */ + function hkdf(digest: string, irm: BinaryLike | KeyObject, salt: BinaryLike, info: BinaryLike, keylen: number, callback: (err: Error | null, derivedKey: ArrayBuffer) => void): void; + /** + * Provides a synchronous HKDF key derivation function as defined in RFC 5869\. The + * given `ikm`, `salt` and `info` are used with the `digest` to derive a key of`keylen` bytes. + * + * The successfully generated `derivedKey` will be returned as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). + * + * An error will be thrown if any of the input arguments specify invalid values or + * types, or if the derived key cannot be generated. + * + * ```js + * import { Buffer } from 'buffer'; + * const { + * hkdfSync + * } = await import('crypto'); + * + * const derivedKey = hkdfSync('sha512', 'key', 'salt', 'info', 64); + * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653' + * ``` + * @since v15.0.0 + * @param digest The digest algorithm to use. + * @param ikm The input keying material. It must be at least one byte in length. + * @param salt The salt value. Must be provided but can be zero-length. + * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes. + * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512` + * generates 64-byte hashes, making the maximum HKDF output 16320 bytes). + */ + function hkdfSync(digest: string, ikm: BinaryLike | KeyObject, salt: BinaryLike, info: BinaryLike, keylen: number): ArrayBuffer; + interface SecureHeapUsage { + /** + * The total allocated secure heap size as specified using the `--secure-heap=n` command-line flag. + */ + total: number; + /** + * The minimum allocation from the secure heap as specified using the `--secure-heap-min` command-line flag. + */ + min: number; + /** + * The total number of bytes currently allocated from the secure heap. + */ + used: number; + /** + * The calculated ratio of `used` to `total` allocated bytes. + */ + utilization: number; + } + /** + * @since v15.6.0 + */ + function secureHeapUsed(): SecureHeapUsage; + interface RandomUUIDOptions { + /** + * By default, to improve performance, + * Node.js will pre-emptively generate and persistently cache enough + * random data to generate up to 128 random UUIDs. To generate a UUID + * without using the cache, set `disableEntropyCache` to `true`. + * + * @default `false` + */ + disableEntropyCache?: boolean | undefined; + } + /** + * Generates a random [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) version 4 UUID. The UUID is generated using a + * cryptographic pseudorandom number generator. + * @since v15.6.0 + */ + function randomUUID(options?: RandomUUIDOptions): string; + interface X509CheckOptions { + /** + * @default 'always' + */ + subject: 'always' | 'never'; + /** + * @default true + */ + wildcards: boolean; + /** + * @default true + */ + partialWildcards: boolean; + /** + * @default false + */ + multiLabelWildcards: boolean; + /** + * @default false + */ + singleLabelSubdomains: boolean; + } + /** + * Encapsulates an X509 certificate and provides read-only access to + * its information. + * + * ```js + * const { X509Certificate } = await import('crypto'); + * + * const x509 = new X509Certificate('{... pem encoded cert ...}'); + * + * console.log(x509.subject); + * ``` + * @since v15.6.0 + */ + class X509Certificate { + /** + * Will be \`true\` if this is a Certificate Authority (ca) certificate. + * @since v15.6.0 + */ + readonly ca: boolean; + /** + * The SHA-1 fingerprint of this certificate. + * @since v15.6.0 + */ + readonly fingerprint: string; + /** + * The SHA-256 fingerprint of this certificate. + * @since v15.6.0 + */ + readonly fingerprint256: string; + /** + * The complete subject of this certificate. + * @since v15.6.0 + */ + readonly subject: string; + /** + * The subject alternative name specified for this certificate. + * @since v15.6.0 + */ + readonly subjectAltName: string; + /** + * The information access content of this certificate. + * @since v15.6.0 + */ + readonly infoAccess: string; + /** + * An array detailing the key usages for this certificate. + * @since v15.6.0 + */ + readonly keyUsage: string[]; + /** + * The issuer identification included in this certificate. + * @since v15.6.0 + */ + readonly issuer: string; + /** + * The issuer certificate or `undefined` if the issuer certificate is not + * available. + * @since v15.9.0 + */ + readonly issuerCertificate?: X509Certificate | undefined; + /** + * The public key `KeyObject` for this certificate. + * @since v15.6.0 + */ + readonly publicKey: KeyObject; + /** + * A `Buffer` containing the DER encoding of this certificate. + * @since v15.6.0 + */ + readonly raw: Buffer; + /** + * The serial number of this certificate. + * @since v15.6.0 + */ + readonly serialNumber: string; + /** + * The date/time from which this certificate is considered valid. + * @since v15.6.0 + */ + readonly validFrom: string; + /** + * The date/time until which this certificate is considered valid. + * @since v15.6.0 + */ + readonly validTo: string; + constructor(buffer: BinaryLike); + /** + * Checks whether the certificate matches the given email address. + * @since v15.6.0 + * @return Returns `email` if the certificate matches, `undefined` if it does not. + */ + checkEmail(email: string, options?: X509CheckOptions): string | undefined; + /** + * Checks whether the certificate matches the given host name. + * @since v15.6.0 + * @return Returns `name` if the certificate matches, `undefined` if it does not. + */ + checkHost(name: string, options?: X509CheckOptions): string | undefined; + /** + * Checks whether the certificate matches the given IP address (IPv4 or IPv6). + * @since v15.6.0 + * @return Returns `ip` if the certificate matches, `undefined` if it does not. + */ + checkIP(ip: string, options?: X509CheckOptions): string | undefined; + /** + * Checks whether this certificate was issued by the given `otherCert`. + * @since v15.6.0 + */ + checkIssued(otherCert: X509Certificate): boolean; + /** + * Checks whether the public key for this certificate is consistent with + * the given private key. + * @since v15.6.0 + * @param privateKey A private key. + */ + checkPrivateKey(privateKey: KeyObject): boolean; + /** + * There is no standard JSON encoding for X509 certificates. The`toJSON()` method returns a string containing the PEM encoded + * certificate. + * @since v15.6.0 + */ + toJSON(): string; + /** + * Returns information about this certificate using the legacy `certificate object` encoding. + * @since v15.6.0 + */ + toLegacyObject(): PeerCertificate; + /** + * Returns the PEM-encoded certificate. + * @since v15.6.0 + */ + toString(): string; + /** + * Verifies that this certificate was signed by the given public key. + * Does not perform any other validation checks on the certificate. + * @since v15.6.0 + * @param publicKey A public key. + */ + verify(publicKey: KeyObject): boolean; + } + type LargeNumberLike = NodeJS.ArrayBufferView | SharedArrayBuffer | ArrayBuffer | bigint; + interface GeneratePrimeOptions { + add?: LargeNumberLike | undefined; + rem?: LargeNumberLike | undefined; + /** + * @default false + */ + safe?: boolean | undefined; + bigint?: boolean | undefined; + } + interface GeneratePrimeOptionsBigInt extends GeneratePrimeOptions { + bigint: true; + } + interface GeneratePrimeOptionsArrayBuffer extends GeneratePrimeOptions { + bigint?: false | undefined; + } + /** + * Generates a pseudorandom prime of `size` bits. + * + * If `options.safe` is `true`, the prime will be a safe prime -- that is,`(prime - 1) / 2` will also be a prime. + * + * The `options.add` and `options.rem` parameters can be used to enforce additional + * requirements, e.g., for Diffie-Hellman: + * + * * If `options.add` and `options.rem` are both set, the prime will satisfy the + * condition that `prime % add = rem`. + * * If only `options.add` is set and `options.safe` is not `true`, the prime will + * satisfy the condition that `prime % add = 1`. + * * If only `options.add` is set and `options.safe` is set to `true`, the prime + * will instead satisfy the condition that `prime % add = 3`. This is necessary + * because `prime % add = 1` for `options.add > 2` would contradict the condition + * enforced by `options.safe`. + * * `options.rem` is ignored if `options.add` is not given. + * + * Both `options.add` and `options.rem` must be encoded as big-endian sequences + * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or`DataView`. + * + * By default, the prime is encoded as a big-endian sequence of octets + * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a + * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided. + * @since v15.8.0 + * @param size The size (in bits) of the prime to generate. + */ + function generatePrime(size: number, callback: (err: Error | null, prime: ArrayBuffer) => void): void; + function generatePrime(size: number, options: GeneratePrimeOptionsBigInt, callback: (err: Error | null, prime: bigint) => void): void; + function generatePrime(size: number, options: GeneratePrimeOptionsArrayBuffer, callback: (err: Error | null, prime: ArrayBuffer) => void): void; + function generatePrime(size: number, options: GeneratePrimeOptions, callback: (err: Error | null, prime: ArrayBuffer | bigint) => void): void; + /** + * Generates a pseudorandom prime of `size` bits. + * + * If `options.safe` is `true`, the prime will be a safe prime -- that is,`(prime - 1) / 2` will also be a prime. + * + * The `options.add` and `options.rem` parameters can be used to enforce additional + * requirements, e.g., for Diffie-Hellman: + * + * * If `options.add` and `options.rem` are both set, the prime will satisfy the + * condition that `prime % add = rem`. + * * If only `options.add` is set and `options.safe` is not `true`, the prime will + * satisfy the condition that `prime % add = 1`. + * * If only `options.add` is set and `options.safe` is set to `true`, the prime + * will instead satisfy the condition that `prime % add = 3`. This is necessary + * because `prime % add = 1` for `options.add > 2` would contradict the condition + * enforced by `options.safe`. + * * `options.rem` is ignored if `options.add` is not given. + * + * Both `options.add` and `options.rem` must be encoded as big-endian sequences + * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or`DataView`. + * + * By default, the prime is encoded as a big-endian sequence of octets + * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a + * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided. + * @since v15.8.0 + * @param size The size (in bits) of the prime to generate. + */ + function generatePrimeSync(size: number): ArrayBuffer; + function generatePrimeSync(size: number, options: GeneratePrimeOptionsBigInt): bigint; + function generatePrimeSync(size: number, options: GeneratePrimeOptionsArrayBuffer): ArrayBuffer; + function generatePrimeSync(size: number, options: GeneratePrimeOptions): ArrayBuffer | bigint; + interface CheckPrimeOptions { + /** + * The number of Miller-Rabin probabilistic primality iterations to perform. + * When the value is 0 (zero), a number of checks is used that yields a false positive rate of at most 2-64 for random input. + * Care must be used when selecting a number of checks. + * Refer to the OpenSSL documentation for the BN_is_prime_ex function nchecks options for more details. + * + * @default 0 + */ + checks?: number | undefined; + } + /** + * Checks the primality of the `candidate`. + * @since v15.8.0 + * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length. + */ + function checkPrime(value: LargeNumberLike, callback: (err: Error | null, result: boolean) => void): void; + function checkPrime(value: LargeNumberLike, options: CheckPrimeOptions, callback: (err: Error | null, result: boolean) => void): void; + /** + * Checks the primality of the `candidate`. + * @since v15.8.0 + * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length. + * @return `true` if the candidate is a prime with an error probability less than `0.25 ** options.checks`. + */ + function checkPrimeSync(candidate: LargeNumberLike, options?: CheckPrimeOptions): boolean; + namespace webcrypto { + class CryptoKey {} // placeholder + } +} +declare module 'node:crypto' { + export * from 'crypto'; +} diff --git a/frontend/node_modules/@types/node/dgram.d.ts b/frontend/node_modules/@types/node/dgram.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d7b9ee2d22a9ba5d1ed397ce59932fa847bcf789 --- /dev/null +++ b/frontend/node_modules/@types/node/dgram.d.ts @@ -0,0 +1,545 @@ +/** + * The `dgram` module provides an implementation of UDP datagram sockets. + * + * ```js + * import dgram from 'dgram'; + * + * const server = dgram.createSocket('udp4'); + * + * server.on('error', (err) => { + * console.log(`server error:\n${err.stack}`); + * server.close(); + * }); + * + * server.on('message', (msg, rinfo) => { + * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); + * }); + * + * server.on('listening', () => { + * const address = server.address(); + * console.log(`server listening ${address.address}:${address.port}`); + * }); + * + * server.bind(41234); + * // Prints: server listening 0.0.0.0:41234 + * ``` + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/dgram.js) + */ +declare module 'dgram' { + import { AddressInfo } from 'node:net'; + import * as dns from 'node:dns'; + import { EventEmitter, Abortable } from 'node:events'; + interface RemoteInfo { + address: string; + family: 'IPv4' | 'IPv6'; + port: number; + size: number; + } + interface BindOptions { + port?: number | undefined; + address?: string | undefined; + exclusive?: boolean | undefined; + fd?: number | undefined; + } + type SocketType = 'udp4' | 'udp6'; + interface SocketOptions extends Abortable { + type: SocketType; + reuseAddr?: boolean | undefined; + /** + * @default false + */ + ipv6Only?: boolean | undefined; + recvBufferSize?: number | undefined; + sendBufferSize?: number | undefined; + lookup?: ((hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void) | undefined; + } + /** + * Creates a `dgram.Socket` object. Once the socket is created, calling `socket.bind()` will instruct the socket to begin listening for datagram + * messages. When `address` and `port` are not passed to `socket.bind()` the + * method will bind the socket to the "all interfaces" address on a random port + * (it does the right thing for both `udp4` and `udp6` sockets). The bound address + * and port can be retrieved using `socket.address().address` and `socket.address().port`. + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.close()` on the socket: + * + * ```js + * const controller = new AbortController(); + * const { signal } = controller; + * const server = dgram.createSocket({ type: 'udp4', signal }); + * server.on('message', (msg, rinfo) => { + * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); + * }); + * // Later, when you want to close the server. + * controller.abort(); + * ``` + * @since v0.11.13 + * @param options Available options are: + * @param callback Attached as a listener for `'message'` events. Optional. + */ + function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; + function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; + /** + * Encapsulates the datagram functionality. + * + * New instances of `dgram.Socket` are created using {@link createSocket}. + * The `new` keyword is not to be used to create `dgram.Socket` instances. + * @since v0.1.99 + */ + class Socket extends EventEmitter { + /** + * Tells the kernel to join a multicast group at the given `multicastAddress` and`multicastInterface` using the `IP_ADD_MEMBERSHIP` socket option. If the`multicastInterface` argument is not + * specified, the operating system will choose + * one interface and will add membership to it. To add membership to every + * available interface, call `addMembership` multiple times, once per interface. + * + * When called on an unbound socket, this method will implicitly bind to a random + * port, listening on all interfaces. + * + * When sharing a UDP socket across multiple `cluster` workers, the`socket.addMembership()` function must be called only once or an`EADDRINUSE` error will occur: + * + * ```js + * import cluster from 'cluster'; + * import dgram from 'dgram'; + * + * if (cluster.isPrimary) { + * cluster.fork(); // Works ok. + * cluster.fork(); // Fails with EADDRINUSE. + * } else { + * const s = dgram.createSocket('udp4'); + * s.bind(1234, () => { + * s.addMembership('224.0.0.114'); + * }); + * } + * ``` + * @since v0.6.9 + */ + addMembership(multicastAddress: string, multicastInterface?: string): void; + /** + * Returns an object containing the address information for a socket. + * For UDP sockets, this object will contain `address`, `family` and `port`properties. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.1.99 + */ + address(): AddressInfo; + /** + * For UDP sockets, causes the `dgram.Socket` to listen for datagram + * messages on a named `port` and optional `address`. If `port` is not + * specified or is `0`, the operating system will attempt to bind to a + * random port. If `address` is not specified, the operating system will + * attempt to listen on all addresses. Once binding is complete, a`'listening'` event is emitted and the optional `callback` function is + * called. + * + * Specifying both a `'listening'` event listener and passing a`callback` to the `socket.bind()` method is not harmful but not very + * useful. + * + * A bound datagram socket keeps the Node.js process running to receive + * datagram messages. + * + * If binding fails, an `'error'` event is generated. In rare case (e.g. + * attempting to bind with a closed socket), an `Error` may be thrown. + * + * Example of a UDP server listening on port 41234: + * + * ```js + * import dgram from 'dgram'; + * + * const server = dgram.createSocket('udp4'); + * + * server.on('error', (err) => { + * console.log(`server error:\n${err.stack}`); + * server.close(); + * }); + * + * server.on('message', (msg, rinfo) => { + * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); + * }); + * + * server.on('listening', () => { + * const address = server.address(); + * console.log(`server listening ${address.address}:${address.port}`); + * }); + * + * server.bind(41234); + * // Prints: server listening 0.0.0.0:41234 + * ``` + * @since v0.1.99 + * @param callback with no parameters. Called when binding is complete. + */ + bind(port?: number, address?: string, callback?: () => void): this; + bind(port?: number, callback?: () => void): this; + bind(callback?: () => void): this; + bind(options: BindOptions, callback?: () => void): this; + /** + * Close the underlying socket and stop listening for data on it. If a callback is + * provided, it is added as a listener for the `'close'` event. + * @since v0.1.99 + * @param callback Called when the socket has been closed. + */ + close(callback?: () => void): this; + /** + * Associates the `dgram.Socket` to a remote address and port. Every + * message sent by this handle is automatically sent to that destination. Also, + * the socket will only receive messages from that remote peer. + * Trying to call `connect()` on an already connected socket will result + * in an `ERR_SOCKET_DGRAM_IS_CONNECTED` exception. If `address` is not + * provided, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for `udp6` sockets) + * will be used by default. Once the connection is complete, a `'connect'` event + * is emitted and the optional `callback` function is called. In case of failure, + * the `callback` is called or, failing this, an `'error'` event is emitted. + * @since v12.0.0 + * @param callback Called when the connection is completed or on error. + */ + connect(port: number, address?: string, callback?: () => void): void; + connect(port: number, callback: () => void): void; + /** + * A synchronous function that disassociates a connected `dgram.Socket` from + * its remote address. Trying to call `disconnect()` on an unbound or already + * disconnected socket will result in an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception. + * @since v12.0.0 + */ + disconnect(): void; + /** + * Instructs the kernel to leave a multicast group at `multicastAddress` using the`IP_DROP_MEMBERSHIP` socket option. This method is automatically called by the + * kernel when the socket is closed or the process terminates, so most apps will + * never have reason to call this. + * + * If `multicastInterface` is not specified, the operating system will attempt to + * drop membership on all valid interfaces. + * @since v0.6.9 + */ + dropMembership(multicastAddress: string, multicastInterface?: string): void; + /** + * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. + * @since v8.7.0 + * @return the `SO_RCVBUF` socket receive buffer size in bytes. + */ + getRecvBufferSize(): number; + /** + * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. + * @since v8.7.0 + * @return the `SO_SNDBUF` socket send buffer size in bytes. + */ + getSendBufferSize(): number; + /** + * By default, binding a socket will cause it to block the Node.js process from + * exiting as long as the socket is open. The `socket.unref()` method can be used + * to exclude the socket from the reference counting that keeps the Node.js + * process active. The `socket.ref()` method adds the socket back to the reference + * counting and restores the default behavior. + * + * Calling `socket.ref()` multiples times will have no additional effect. + * + * The `socket.ref()` method returns a reference to the socket so calls can be + * chained. + * @since v0.9.1 + */ + ref(): this; + /** + * Returns an object containing the `address`, `family`, and `port` of the remote + * endpoint. This method throws an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception + * if the socket is not connected. + * @since v12.0.0 + */ + remoteAddress(): AddressInfo; + /** + * Broadcasts a datagram on the socket. + * For connectionless sockets, the destination `port` and `address` must be + * specified. Connected sockets, on the other hand, will use their associated + * remote endpoint, so the `port` and `address` arguments must not be set. + * + * The `msg` argument contains the message to be sent. + * Depending on its type, different behavior can apply. If `msg` is a `Buffer`, + * any `TypedArray` or a `DataView`, + * the `offset` and `length` specify the offset within the `Buffer` where the + * message begins and the number of bytes in the message, respectively. + * If `msg` is a `String`, then it is automatically converted to a `Buffer`with `'utf8'` encoding. With messages that + * contain multi-byte characters, `offset` and `length` will be calculated with + * respect to `byte length` and not the character position. + * If `msg` is an array, `offset` and `length` must not be specified. + * + * The `address` argument is a string. If the value of `address` is a host name, + * DNS will be used to resolve the address of the host. If `address` is not + * provided or otherwise falsy, `'127.0.0.1'` (for `udp4` sockets) or `'::1'`(for `udp6` sockets) will be used by default. + * + * If the socket has not been previously bound with a call to `bind`, the socket + * is assigned a random port number and is bound to the "all interfaces" address + * (`'0.0.0.0'` for `udp4` sockets, `'::0'` for `udp6` sockets.) + * + * An optional `callback` function may be specified to as a way of reporting + * DNS errors or for determining when it is safe to reuse the `buf` object. + * DNS lookups delay the time to send for at least one tick of the + * Node.js event loop. + * + * The only way to know for sure that the datagram has been sent is by using a`callback`. If an error occurs and a `callback` is given, the error will be + * passed as the first argument to the `callback`. If a `callback` is not given, + * the error is emitted as an `'error'` event on the `socket` object. + * + * Offset and length are optional but both _must_ be set if either are used. + * They are supported only when the first argument is a `Buffer`, a `TypedArray`, + * or a `DataView`. + * + * This method throws `ERR_SOCKET_BAD_PORT` if called on an unbound socket. + * + * Example of sending a UDP packet to a port on `localhost`; + * + * ```js + * import dgram from 'dgram'; + * import { Buffer } from 'buffer'; + * + * const message = Buffer.from('Some bytes'); + * const client = dgram.createSocket('udp4'); + * client.send(message, 41234, 'localhost', (err) => { + * client.close(); + * }); + * ``` + * + * Example of sending a UDP packet composed of multiple buffers to a port on`127.0.0.1`; + * + * ```js + * import dgram from 'dgram'; + * import { Buffer } from 'buffer'; + * + * const buf1 = Buffer.from('Some '); + * const buf2 = Buffer.from('bytes'); + * const client = dgram.createSocket('udp4'); + * client.send([buf1, buf2], 41234, (err) => { + * client.close(); + * }); + * ``` + * + * Sending multiple buffers might be faster or slower depending on the + * application and operating system. Run benchmarks to + * determine the optimal strategy on a case-by-case basis. Generally speaking, + * however, sending multiple buffers is faster. + * + * Example of sending a UDP packet using a socket connected to a port on`localhost`: + * + * ```js + * import dgram from 'dgram'; + * import { Buffer } from 'buffer'; + * + * const message = Buffer.from('Some bytes'); + * const client = dgram.createSocket('udp4'); + * client.connect(41234, 'localhost', (err) => { + * client.send(message, (err) => { + * client.close(); + * }); + * }); + * ``` + * @since v0.1.99 + * @param msg Message to be sent. + * @param offset Offset in the buffer where the message starts. + * @param length Number of bytes in the message. + * @param port Destination port. + * @param address Destination host name or IP address. + * @param callback Called when the message has been sent. + */ + send(msg: string | Uint8Array | ReadonlyArray, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void; + send(msg: string | Uint8Array | ReadonlyArray, port?: number, callback?: (error: Error | null, bytes: number) => void): void; + send(msg: string | Uint8Array | ReadonlyArray, callback?: (error: Error | null, bytes: number) => void): void; + send(msg: string | Uint8Array, offset: number, length: number, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void; + send(msg: string | Uint8Array, offset: number, length: number, port?: number, callback?: (error: Error | null, bytes: number) => void): void; + send(msg: string | Uint8Array, offset: number, length: number, callback?: (error: Error | null, bytes: number) => void): void; + /** + * Sets or clears the `SO_BROADCAST` socket option. When set to `true`, UDP + * packets may be sent to a local interface's broadcast address. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.6.9 + */ + setBroadcast(flag: boolean): void; + /** + * _All references to scope in this section are referring to [IPv6 Zone Indices](https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses), which are defined by [RFC + * 4007](https://tools.ietf.org/html/rfc4007). In string form, an IP_ + * _with a scope index is written as `'IP%scope'` where scope is an interface name_ + * _or interface number._ + * + * Sets the default outgoing multicast interface of the socket to a chosen + * interface or back to system interface selection. The `multicastInterface` must + * be a valid string representation of an IP from the socket's family. + * + * For IPv4 sockets, this should be the IP configured for the desired physical + * interface. All packets sent to multicast on the socket will be sent on the + * interface determined by the most recent successful use of this call. + * + * For IPv6 sockets, `multicastInterface` should include a scope to indicate the + * interface as in the examples that follow. In IPv6, individual `send` calls can + * also use explicit scope in addresses, so only packets sent to a multicast + * address without specifying an explicit scope are affected by the most recent + * successful use of this call. + * + * This method throws `EBADF` if called on an unbound socket. + * + * #### Example: IPv6 outgoing multicast interface + * + * On most systems, where scope format uses the interface name: + * + * ```js + * const socket = dgram.createSocket('udp6'); + * + * socket.bind(1234, () => { + * socket.setMulticastInterface('::%eth1'); + * }); + * ``` + * + * On Windows, where scope format uses an interface number: + * + * ```js + * const socket = dgram.createSocket('udp6'); + * + * socket.bind(1234, () => { + * socket.setMulticastInterface('::%2'); + * }); + * ``` + * + * #### Example: IPv4 outgoing multicast interface + * + * All systems use an IP of the host on the desired physical interface: + * + * ```js + * const socket = dgram.createSocket('udp4'); + * + * socket.bind(1234, () => { + * socket.setMulticastInterface('10.0.0.2'); + * }); + * ``` + * @since v8.6.0 + */ + setMulticastInterface(multicastInterface: string): void; + /** + * Sets or clears the `IP_MULTICAST_LOOP` socket option. When set to `true`, + * multicast packets will also be received on the local interface. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.3.8 + */ + setMulticastLoopback(flag: boolean): boolean; + /** + * Sets the `IP_MULTICAST_TTL` socket option. While TTL generally stands for + * "Time to Live", in this context it specifies the number of IP hops that a + * packet is allowed to travel through, specifically for multicast traffic. Each + * router or gateway that forwards a packet decrements the TTL. If the TTL is + * decremented to 0 by a router, it will not be forwarded. + * + * The `ttl` argument may be between 0 and 255\. The default on most systems is `1`. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.3.8 + */ + setMulticastTTL(ttl: number): number; + /** + * Sets the `SO_RCVBUF` socket option. Sets the maximum socket receive buffer + * in bytes. + * + * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. + * @since v8.7.0 + */ + setRecvBufferSize(size: number): void; + /** + * Sets the `SO_SNDBUF` socket option. Sets the maximum socket send buffer + * in bytes. + * + * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. + * @since v8.7.0 + */ + setSendBufferSize(size: number): void; + /** + * Sets the `IP_TTL` socket option. While TTL generally stands for "Time to Live", + * in this context it specifies the number of IP hops that a packet is allowed to + * travel through. Each router or gateway that forwards a packet decrements the + * TTL. If the TTL is decremented to 0 by a router, it will not be forwarded. + * Changing TTL values is typically done for network probes or when multicasting. + * + * The `ttl` argument may be between between 1 and 255\. The default on most systems + * is 64. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.1.101 + */ + setTTL(ttl: number): number; + /** + * By default, binding a socket will cause it to block the Node.js process from + * exiting as long as the socket is open. The `socket.unref()` method can be used + * to exclude the socket from the reference counting that keeps the Node.js + * process active, allowing the process to exit even if the socket is still + * listening. + * + * Calling `socket.unref()` multiple times will have no addition effect. + * + * The `socket.unref()` method returns a reference to the socket so calls can be + * chained. + * @since v0.9.1 + */ + unref(): this; + /** + * Tells the kernel to join a source-specific multicast channel at the given`sourceAddress` and `groupAddress`, using the `multicastInterface` with the`IP_ADD_SOURCE_MEMBERSHIP` socket + * option. If the `multicastInterface` argument + * is not specified, the operating system will choose one interface and will add + * membership to it. To add membership to every available interface, call`socket.addSourceSpecificMembership()` multiple times, once per interface. + * + * When called on an unbound socket, this method will implicitly bind to a random + * port, listening on all interfaces. + * @since v13.1.0, v12.16.0 + */ + addSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void; + /** + * Instructs the kernel to leave a source-specific multicast channel at the given`sourceAddress` and `groupAddress` using the `IP_DROP_SOURCE_MEMBERSHIP`socket option. This method is + * automatically called by the kernel when the + * socket is closed or the process terminates, so most apps will never have + * reason to call this. + * + * If `multicastInterface` is not specified, the operating system will attempt to + * drop membership on all valid interfaces. + * @since v13.1.0, v12.16.0 + */ + dropSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void; + /** + * events.EventEmitter + * 1. close + * 2. connect + * 3. error + * 4. listening + * 5. message + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'connect', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'listening', listener: () => void): this; + addListener(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: 'close'): boolean; + emit(event: 'connect'): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'listening'): boolean; + emit(event: 'message', msg: Buffer, rinfo: RemoteInfo): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'connect', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'listening', listener: () => void): this; + on(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'connect', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'listening', listener: () => void): this; + once(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'connect', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'listening', listener: () => void): this; + prependListener(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'connect', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'listening', listener: () => void): this; + prependOnceListener(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + } +} +declare module 'node:dgram' { + export * from 'dgram'; +} diff --git a/frontend/node_modules/@types/node/diagnostics_channel.d.ts b/frontend/node_modules/@types/node/diagnostics_channel.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d6747dad5fe1787669b606f81a87831095bd0fca --- /dev/null +++ b/frontend/node_modules/@types/node/diagnostics_channel.d.ts @@ -0,0 +1,134 @@ +/** + * The `diagnostics_channel` module provides an API to create named channels + * to report arbitrary message data for diagnostics purposes. + * + * It can be accessed using: + * + * ```js + * import diagnostics_channel from 'diagnostics_channel'; + * ``` + * + * It is intended that a module writer wanting to report diagnostics messages + * will create one or many top-level channels to report messages through. + * Channels may also be acquired at runtime but it is not encouraged + * due to the additional overhead of doing so. Channels may be exported for + * convenience, but as long as the name is known it can be acquired anywhere. + * + * If you intend for your module to produce diagnostics data for others to + * consume it is recommended that you include documentation of what named + * channels are used along with the shape of the message data. Channel names + * should generally include the module name to avoid collisions with data from + * other modules. + * @experimental + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/diagnostics_channel.js) + */ +declare module 'diagnostics_channel' { + /** + * Check if there are active subscribers to the named channel. This is helpful if + * the message you want to send might be expensive to prepare. + * + * This API is optional but helpful when trying to publish messages from very + * performance-sensitive code. + * + * ```js + * import diagnostics_channel from 'diagnostics_channel'; + * + * if (diagnostics_channel.hasSubscribers('my-channel')) { + * // There are subscribers, prepare and publish message + * } + * ``` + * @since v15.1.0, v14.17.0 + * @param name The channel name + * @return If there are active subscribers + */ + function hasSubscribers(name: string): boolean; + /** + * This is the primary entry-point for anyone wanting to interact with a named + * channel. It produces a channel object which is optimized to reduce overhead at + * publish time as much as possible. + * + * ```js + * import diagnostics_channel from 'diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * ``` + * @since v15.1.0, v14.17.0 + * @param name The channel name + * @return The named channel object + */ + function channel(name: string): Channel; + type ChannelListener = (name: string, message: unknown) => void; + /** + * The class `Channel` represents an individual named channel within the data + * pipeline. It is use to track subscribers and to publish messages when there + * are subscribers present. It exists as a separate object to avoid channel + * lookups at publish time, enabling very fast publish speeds and allowing + * for heavy use while incurring very minimal cost. Channels are created with {@link channel}, constructing a channel directly + * with `new Channel(name)` is not supported. + * @since v15.1.0, v14.17.0 + */ + class Channel { + readonly name: string; + /** + * Check if there are active subscribers to this channel. This is helpful if + * the message you want to send might be expensive to prepare. + * + * This API is optional but helpful when trying to publish messages from very + * performance-sensitive code. + * + * ```js + * import diagnostics_channel from 'diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * if (channel.hasSubscribers) { + * // There are subscribers, prepare and publish message + * } + * ``` + * @since v15.1.0, v14.17.0 + */ + readonly hasSubscribers: boolean; + private constructor(name: string); + /** + * Register a message handler to subscribe to this channel. This message handler + * will be run synchronously whenever a message is published to the channel. Any + * errors thrown in the message handler will trigger an `'uncaughtException'`. + * + * ```js + * import diagnostics_channel from 'diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * channel.subscribe((message, name) => { + * // Received data + * }); + * ``` + * @since v15.1.0, v14.17.0 + * @param onMessage The handler to receive channel messages + */ + subscribe(onMessage: ChannelListener): void; + /** + * Remove a message handler previously registered to this channel with `channel.subscribe(onMessage)`. + * + * ```js + * import diagnostics_channel from 'diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * function onMessage(message, name) { + * // Received data + * } + * + * channel.subscribe(onMessage); + * + * channel.unsubscribe(onMessage); + * ``` + * @since v15.1.0, v14.17.0 + * @param onMessage The previous subscribed handler to remove + */ + unsubscribe(onMessage: ChannelListener): void; + } +} +declare module 'node:diagnostics_channel' { + export * from 'diagnostics_channel'; +} diff --git a/frontend/node_modules/@types/node/dns.d.ts b/frontend/node_modules/@types/node/dns.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..11af817782f48296484c2c301346d7b24e683a2d --- /dev/null +++ b/frontend/node_modules/@types/node/dns.d.ts @@ -0,0 +1,643 @@ +/** + * The `dns` module enables name resolution. For example, use it to look up IP + * addresses of host names. + * + * Although named for the [Domain Name System (DNS)](https://en.wikipedia.org/wiki/Domain_Name_System), it does not always use the + * DNS protocol for lookups. {@link lookup} uses the operating system + * facilities to perform name resolution. It may not need to perform any network + * communication. To perform name resolution the way other applications on the same + * system do, use {@link lookup}. + * + * ```js + * const dns = require('dns'); + * + * dns.lookup('example.org', (err, address, family) => { + * console.log('address: %j family: IPv%s', address, family); + * }); + * // address: "93.184.216.34" family: IPv4 + * ``` + * + * All other functions in the `dns` module connect to an actual DNS server to + * perform name resolution. They will always use the network to perform DNS + * queries. These functions do not use the same set of configuration files used by {@link lookup} (e.g. `/etc/hosts`). Use these functions to always perform + * DNS queries, bypassing other name-resolution facilities. + * + * ```js + * const dns = require('dns'); + * + * dns.resolve4('archive.org', (err, addresses) => { + * if (err) throw err; + * + * console.log(`addresses: ${JSON.stringify(addresses)}`); + * + * addresses.forEach((a) => { + * dns.reverse(a, (err, hostnames) => { + * if (err) { + * throw err; + * } + * console.log(`reverse for ${a}: ${JSON.stringify(hostnames)}`); + * }); + * }); + * }); + * ``` + * + * See the `Implementation considerations section` for more information. + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/dns.js) + */ +declare module 'dns' { + import * as dnsPromises from 'node:dns/promises'; + // Supported getaddrinfo flags. + export const ADDRCONFIG: number; + export const V4MAPPED: number; + /** + * If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as + * well as IPv4 mapped IPv6 addresses. + */ + export const ALL: number; + export interface LookupOptions { + family?: number | undefined; + hints?: number | undefined; + all?: boolean | undefined; + verbatim?: boolean | undefined; + } + export interface LookupOneOptions extends LookupOptions { + all?: false | undefined; + } + export interface LookupAllOptions extends LookupOptions { + all: true; + } + export interface LookupAddress { + address: string; + family: number; + } + /** + * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or + * AAAA (IPv6) record. All `option` properties are optional. If `options` is an + * integer, then it must be `4` or `6` – if `options` is not provided, then IPv4 + * and IPv6 addresses are both returned if found. + * + * With the `all` option set to `true`, the arguments for `callback` change to`(err, addresses)`, with `addresses` being an array of objects with the + * properties `address` and `family`. + * + * On error, `err` is an `Error` object, where `err.code` is the error code. + * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when + * the host name does not exist but also when the lookup fails in other ways + * such as no available file descriptors. + * + * `dns.lookup()` does not necessarily have anything to do with the DNS protocol. + * The implementation uses an operating system facility that can associate names + * with addresses, and vice versa. This implementation can have subtle but + * important consequences on the behavior of any Node.js program. Please take some + * time to consult the `Implementation considerations section` before using`dns.lookup()`. + * + * Example usage: + * + * ```js + * const dns = require('dns'); + * const options = { + * family: 6, + * hints: dns.ADDRCONFIG | dns.V4MAPPED, + * }; + * dns.lookup('example.com', options, (err, address, family) => + * console.log('address: %j family: IPv%s', address, family)); + * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6 + * + * // When options.all is true, the result will be an Array. + * options.all = true; + * dns.lookup('example.com', options, (err, addresses) => + * console.log('addresses: %j', addresses)); + * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}] + * ``` + * + * If this method is invoked as its `util.promisify()` ed version, and `all`is not set to `true`, it returns a `Promise` for an `Object` with `address` and`family` properties. + * @since v0.1.90 + */ + export function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void; + export function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void; + export function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void): void; + export function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void): void; + export function lookup(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void; + export namespace lookup { + function __promisify__(hostname: string, options: LookupAllOptions): Promise; + function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise; + function __promisify__(hostname: string, options: LookupOptions): Promise; + } + /** + * Resolves the given `address` and `port` into a host name and service using + * the operating system's underlying `getnameinfo` implementation. + * + * If `address` is not a valid IP address, a `TypeError` will be thrown. + * The `port` will be coerced to a number. If it is not a legal port, a `TypeError`will be thrown. + * + * On an error, `err` is an `Error` object, where `err.code` is the error code. + * + * ```js + * const dns = require('dns'); + * dns.lookupService('127.0.0.1', 22, (err, hostname, service) => { + * console.log(hostname, service); + * // Prints: localhost ssh + * }); + * ``` + * + * If this method is invoked as its `util.promisify()` ed version, it returns a`Promise` for an `Object` with `hostname` and `service` properties. + * @since v0.11.14 + */ + export function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void): void; + export namespace lookupService { + function __promisify__( + address: string, + port: number + ): Promise<{ + hostname: string; + service: string; + }>; + } + export interface ResolveOptions { + ttl: boolean; + } + export interface ResolveWithTtlOptions extends ResolveOptions { + ttl: true; + } + export interface RecordWithTtl { + address: string; + ttl: number; + } + /** @deprecated Use `AnyARecord` or `AnyAaaaRecord` instead. */ + export type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord; + export interface AnyARecord extends RecordWithTtl { + type: 'A'; + } + export interface AnyAaaaRecord extends RecordWithTtl { + type: 'AAAA'; + } + export interface CaaRecord { + critial: number; + issue?: string | undefined; + issuewild?: string | undefined; + iodef?: string | undefined; + contactemail?: string | undefined; + contactphone?: string | undefined; + } + export interface MxRecord { + priority: number; + exchange: string; + } + export interface AnyMxRecord extends MxRecord { + type: 'MX'; + } + export interface NaptrRecord { + flags: string; + service: string; + regexp: string; + replacement: string; + order: number; + preference: number; + } + export interface AnyNaptrRecord extends NaptrRecord { + type: 'NAPTR'; + } + export interface SoaRecord { + nsname: string; + hostmaster: string; + serial: number; + refresh: number; + retry: number; + expire: number; + minttl: number; + } + export interface AnySoaRecord extends SoaRecord { + type: 'SOA'; + } + export interface SrvRecord { + priority: number; + weight: number; + port: number; + name: string; + } + export interface AnySrvRecord extends SrvRecord { + type: 'SRV'; + } + export interface AnyTxtRecord { + type: 'TXT'; + entries: string[]; + } + export interface AnyNsRecord { + type: 'NS'; + value: string; + } + export interface AnyPtrRecord { + type: 'PTR'; + value: string; + } + export interface AnyCnameRecord { + type: 'CNAME'; + value: string; + } + export type AnyRecord = AnyARecord | AnyAaaaRecord | AnyCnameRecord | AnyMxRecord | AnyNaptrRecord | AnyNsRecord | AnyPtrRecord | AnySoaRecord | AnySrvRecord | AnyTxtRecord; + /** + * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array + * of the resource records. The `callback` function has arguments`(err, records)`. When successful, `records` will be an array of resource + * records. The type and structure of individual results varies based on `rrtype`: + * + * + * + * On error, `err` is an `Error` object, where `err.code` is one of the `DNS error codes`. + * @since v0.1.27 + * @param hostname Host name to resolve. + * @param [rrtype='A'] Resource record type. + */ + export function resolve(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: 'A', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: 'AAAA', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: 'ANY', callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void; + export function resolve(hostname: string, rrtype: 'CNAME', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: 'MX', callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void; + export function resolve(hostname: string, rrtype: 'NAPTR', callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void; + export function resolve(hostname: string, rrtype: 'NS', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: 'PTR', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: 'SOA', callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void): void; + export function resolve(hostname: string, rrtype: 'SRV', callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void; + export function resolve(hostname: string, rrtype: 'TXT', callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void; + export function resolve( + hostname: string, + rrtype: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void + ): void; + export namespace resolve { + function __promisify__(hostname: string, rrtype?: 'A' | 'AAAA' | 'CNAME' | 'NS' | 'PTR'): Promise; + function __promisify__(hostname: string, rrtype: 'ANY'): Promise; + function __promisify__(hostname: string, rrtype: 'MX'): Promise; + function __promisify__(hostname: string, rrtype: 'NAPTR'): Promise; + function __promisify__(hostname: string, rrtype: 'SOA'): Promise; + function __promisify__(hostname: string, rrtype: 'SRV'): Promise; + function __promisify__(hostname: string, rrtype: 'TXT'): Promise; + function __promisify__(hostname: string, rrtype: string): Promise; + } + /** + * Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the`hostname`. The `addresses` argument passed to the `callback` function + * will contain an array of IPv4 addresses (e.g.`['74.125.79.104', '74.125.79.105', '74.125.79.106']`). + * @since v0.1.16 + * @param hostname Host name to resolve. + */ + export function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void; + export function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void; + export namespace resolve4 { + function __promisify__(hostname: string): Promise; + function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; + function __promisify__(hostname: string, options?: ResolveOptions): Promise; + } + /** + * Uses the DNS protocol to resolve a IPv6 addresses (`AAAA` records) for the`hostname`. The `addresses` argument passed to the `callback` function + * will contain an array of IPv6 addresses. + * @since v0.1.16 + * @param hostname Host name to resolve. + */ + export function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void; + export function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void; + export namespace resolve6 { + function __promisify__(hostname: string): Promise; + function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; + function __promisify__(hostname: string, options?: ResolveOptions): Promise; + } + /** + * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. The`addresses` argument passed to the `callback` function + * will contain an array of canonical name records available for the `hostname`(e.g. `['bar.example.com']`). + * @since v0.3.2 + */ + export function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export namespace resolveCname { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve `CAA` records for the `hostname`. The`addresses` argument passed to the `callback` function + * will contain an array of certification authority authorization records + * available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`). + * @since v15.0.0 + */ + export function resolveCaa(hostname: string, callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void): void; + export namespace resolveCaa { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the`hostname`. The `addresses` argument passed to the `callback` function will + * contain an array of objects containing both a `priority` and `exchange`property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`). + * @since v0.1.27 + */ + export function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void; + export namespace resolveMx { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve regular expression based records (`NAPTR`records) for the `hostname`. The `addresses` argument passed to the `callback`function will contain an array of + * objects with the following properties: + * + * * `flags` + * * `service` + * * `regexp` + * * `replacement` + * * `order` + * * `preference` + * + * ```js + * { + * flags: 's', + * service: 'SIP+D2U', + * regexp: '', + * replacement: '_sip._udp.example.com', + * order: 30, + * preference: 100 + * } + * ``` + * @since v0.9.12 + */ + export function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void; + export namespace resolveNaptr { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve name server records (`NS` records) for the`hostname`. The `addresses` argument passed to the `callback` function will + * contain an array of name server records available for `hostname`(e.g. `['ns1.example.com', 'ns2.example.com']`). + * @since v0.1.90 + */ + export function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export namespace resolveNs { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve pointer records (`PTR` records) for the`hostname`. The `addresses` argument passed to the `callback` function will + * be an array of strings containing the reply records. + * @since v6.0.0 + */ + export function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + export namespace resolvePtr { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for + * the `hostname`. The `address` argument passed to the `callback` function will + * be an object with the following properties: + * + * * `nsname` + * * `hostmaster` + * * `serial` + * * `refresh` + * * `retry` + * * `expire` + * * `minttl` + * + * ```js + * { + * nsname: 'ns.example.com', + * hostmaster: 'root.example.com', + * serial: 2013101809, + * refresh: 10000, + * retry: 2400, + * expire: 604800, + * minttl: 3600 + * } + * ``` + * @since v0.11.10 + */ + export function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void): void; + export namespace resolveSoa { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve service records (`SRV` records) for the`hostname`. The `addresses` argument passed to the `callback` function will + * be an array of objects with the following properties: + * + * * `priority` + * * `weight` + * * `port` + * * `name` + * + * ```js + * { + * priority: 10, + * weight: 5, + * port: 21223, + * name: 'service.example.com' + * } + * ``` + * @since v0.1.27 + */ + export function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void; + export namespace resolveSrv { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve text queries (`TXT` records) for the`hostname`. The `records` argument passed to the `callback` function is a + * two-dimensional array of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of + * one record. Depending on the use case, these could be either joined together or + * treated separately. + * @since v0.1.27 + */ + export function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void; + export namespace resolveTxt { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query). + * The `ret` argument passed to the `callback` function will be an array containing + * various types of records. Each object has a property `type` that indicates the + * type of the current record. And depending on the `type`, additional properties + * will be present on the object: + * + * + * + * Here is an example of the `ret` object passed to the callback: + * + * ```js + * [ { type: 'A', address: '127.0.0.1', ttl: 299 }, + * { type: 'CNAME', value: 'example.com' }, + * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 }, + * { type: 'NS', value: 'ns1.example.com' }, + * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] }, + * { type: 'SOA', + * nsname: 'ns1.example.com', + * hostmaster: 'admin.example.com', + * serial: 156696742, + * refresh: 900, + * retry: 900, + * expire: 1800, + * minttl: 60 } ] + * ``` + * + * DNS server operators may choose not to respond to `ANY`queries. It may be better to call individual methods like {@link resolve4},{@link resolveMx}, and so on. For more details, see [RFC + * 8482](https://tools.ietf.org/html/rfc8482). + */ + export function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void; + export namespace resolveAny { + function __promisify__(hostname: string): Promise; + } + /** + * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an + * array of host names. + * + * On error, `err` is an `Error` object, where `err.code` is + * one of the `DNS error codes`. + * @since v0.1.16 + */ + export function reverse(ip: string, callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void): void; + /** + * Sets the IP address and port of servers to be used when performing DNS + * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted + * addresses. If the port is the IANA default DNS port (53) it can be omitted. + * + * ```js + * dns.setServers([ + * '4.4.4.4', + * '[2001:4860:4860::8888]', + * '4.4.4.4:1053', + * '[2001:4860:4860::8888]:1053', + * ]); + * ``` + * + * An error will be thrown if an invalid address is provided. + * + * The `dns.setServers()` method must not be called while a DNS query is in + * progress. + * + * The {@link setServers} method affects only {@link resolve},`dns.resolve*()` and {@link reverse} (and specifically _not_ {@link lookup}). + * + * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html). + * That is, if attempting to resolve with the first server provided results in a`NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with + * subsequent servers provided. Fallback DNS servers will only be used if the + * earlier ones time out or result in some other error. + * @since v0.11.3 + * @param servers array of `RFC 5952` formatted addresses + */ + export function setServers(servers: ReadonlyArray): void; + /** + * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6), + * that are currently configured for DNS resolution. A string will include a port + * section if a custom port is used. + * + * ```js + * [ + * '4.4.4.4', + * '2001:4860:4860::8888', + * '4.4.4.4:1053', + * '[2001:4860:4860::8888]:1053', + * ] + * ``` + * @since v0.11.3 + */ + export function getServers(): string[]; + // Error codes + export const NODATA: string; + export const FORMERR: string; + export const SERVFAIL: string; + export const NOTFOUND: string; + export const NOTIMP: string; + export const REFUSED: string; + export const BADQUERY: string; + export const BADNAME: string; + export const BADFAMILY: string; + export const BADRESP: string; + export const CONNREFUSED: string; + export const TIMEOUT: string; + export const EOF: string; + export const FILE: string; + export const NOMEM: string; + export const DESTRUCTION: string; + export const BADSTR: string; + export const BADFLAGS: string; + export const NONAME: string; + export const BADHINTS: string; + export const NOTINITIALIZED: string; + export const LOADIPHLPAPI: string; + export const ADDRGETNETWORKPARAMS: string; + export const CANCELLED: string; + export interface ResolverOptions { + timeout?: number | undefined; + /** + * @default 4 + */ + tries?: number; + } + /** + * An independent resolver for DNS requests. + * + * Creating a new resolver uses the default server settings. Setting + * the servers used for a resolver using `resolver.setServers()` does not affect + * other resolvers: + * + * ```js + * const { Resolver } = require('dns'); + * const resolver = new Resolver(); + * resolver.setServers(['4.4.4.4']); + * + * // This request will use the server at 4.4.4.4, independent of global settings. + * resolver.resolve4('example.org', (err, addresses) => { + * // ... + * }); + * ``` + * + * The following methods from the `dns` module are available: + * + * * `resolver.getServers()` + * * `resolver.resolve()` + * * `resolver.resolve4()` + * * `resolver.resolve6()` + * * `resolver.resolveAny()` + * * `resolver.resolveCaa()` + * * `resolver.resolveCname()` + * * `resolver.resolveMx()` + * * `resolver.resolveNaptr()` + * * `resolver.resolveNs()` + * * `resolver.resolvePtr()` + * * `resolver.resolveSoa()` + * * `resolver.resolveSrv()` + * * `resolver.resolveTxt()` + * * `resolver.reverse()` + * * `resolver.setServers()` + * @since v8.3.0 + */ + export class Resolver { + constructor(options?: ResolverOptions); + /** + * Cancel all outstanding DNS queries made by this resolver. The corresponding + * callbacks will be called with an error with code `ECANCELLED`. + * @since v8.3.0 + */ + cancel(): void; + getServers: typeof getServers; + resolve: typeof resolve; + resolve4: typeof resolve4; + resolve6: typeof resolve6; + resolveAny: typeof resolveAny; + resolveCname: typeof resolveCname; + resolveMx: typeof resolveMx; + resolveNaptr: typeof resolveNaptr; + resolveNs: typeof resolveNs; + resolvePtr: typeof resolvePtr; + resolveSoa: typeof resolveSoa; + resolveSrv: typeof resolveSrv; + resolveTxt: typeof resolveTxt; + reverse: typeof reverse; + /** + * The resolver instance will send its requests from the specified IP address. + * This allows programs to specify outbound interfaces when used on multi-homed + * systems. + * + * If a v4 or v6 address is not specified, it is set to the default, and the + * operating system will choose a local address automatically. + * + * The resolver will use the v4 local address when making requests to IPv4 DNS + * servers, and the v6 local address when making requests to IPv6 DNS servers. + * The `rrtype` of resolution requests has no impact on the local address used. + * @since v15.1.0 + * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address. + * @param [ipv6='::0'] A string representation of an IPv6 address. + */ + setLocalAddress(ipv4?: string, ipv6?: string): void; + setServers: typeof setServers; + } + export { dnsPromises as promises }; +} +declare module 'node:dns' { + export * from 'dns'; +} diff --git a/frontend/node_modules/@types/node/dns/promises.d.ts b/frontend/node_modules/@types/node/dns/promises.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..fbfe1dbb7bff8a398be497f231b0749282217a75 --- /dev/null +++ b/frontend/node_modules/@types/node/dns/promises.d.ts @@ -0,0 +1,357 @@ +/** + * The `dns.promises` API provides an alternative set of asynchronous DNS methods + * that return `Promise` objects rather than using callbacks. The API is accessible + * via `require('dns').promises` or `require('dns/promises')`. + * @since v10.6.0 + */ +declare module 'dns/promises' { + import { + LookupAddress, + LookupOneOptions, + LookupAllOptions, + LookupOptions, + AnyRecord, + CaaRecord, + MxRecord, + NaptrRecord, + SoaRecord, + SrvRecord, + ResolveWithTtlOptions, + RecordWithTtl, + ResolveOptions, + ResolverOptions, + } from 'node:dns'; + /** + * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6), + * that are currently configured for DNS resolution. A string will include a port + * section if a custom port is used. + * + * ```js + * [ + * '4.4.4.4', + * '2001:4860:4860::8888', + * '4.4.4.4:1053', + * '[2001:4860:4860::8888]:1053', + * ] + * ``` + * @since v10.6.0 + */ + function getServers(): string[]; + /** + * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or + * AAAA (IPv6) record. All `option` properties are optional. If `options` is an + * integer, then it must be `4` or `6` – if `options` is not provided, then IPv4 + * and IPv6 addresses are both returned if found. + * + * With the `all` option set to `true`, the `Promise` is resolved with `addresses`being an array of objects with the properties `address` and `family`. + * + * On error, the `Promise` is rejected with an `Error` object, where `err.code`is the error code. + * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when + * the host name does not exist but also when the lookup fails in other ways + * such as no available file descriptors. + * + * `dnsPromises.lookup()` does not necessarily have anything to do with the DNS + * protocol. The implementation uses an operating system facility that can + * associate names with addresses, and vice versa. This implementation can have + * subtle but important consequences on the behavior of any Node.js program. Please + * take some time to consult the `Implementation considerations section` before + * using `dnsPromises.lookup()`. + * + * Example usage: + * + * ```js + * const dns = require('dns'); + * const dnsPromises = dns.promises; + * const options = { + * family: 6, + * hints: dns.ADDRCONFIG | dns.V4MAPPED, + * }; + * + * dnsPromises.lookup('example.com', options).then((result) => { + * console.log('address: %j family: IPv%s', result.address, result.family); + * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6 + * }); + * + * // When options.all is true, the result will be an Array. + * options.all = true; + * dnsPromises.lookup('example.com', options).then((result) => { + * console.log('addresses: %j', result); + * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}] + * }); + * ``` + * @since v10.6.0 + */ + function lookup(hostname: string, family: number): Promise; + function lookup(hostname: string, options: LookupOneOptions): Promise; + function lookup(hostname: string, options: LookupAllOptions): Promise; + function lookup(hostname: string, options: LookupOptions): Promise; + function lookup(hostname: string): Promise; + /** + * Resolves the given `address` and `port` into a host name and service using + * the operating system's underlying `getnameinfo` implementation. + * + * If `address` is not a valid IP address, a `TypeError` will be thrown. + * The `port` will be coerced to a number. If it is not a legal port, a `TypeError`will be thrown. + * + * On error, the `Promise` is rejected with an `Error` object, where `err.code`is the error code. + * + * ```js + * const dnsPromises = require('dns').promises; + * dnsPromises.lookupService('127.0.0.1', 22).then((result) => { + * console.log(result.hostname, result.service); + * // Prints: localhost ssh + * }); + * ``` + * @since v10.6.0 + */ + function lookupService( + address: string, + port: number + ): Promise<{ + hostname: string; + service: string; + }>; + /** + * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array + * of the resource records. When successful, the `Promise` is resolved with an + * array of resource records. The type and structure of individual results vary + * based on `rrtype`: + * + * + * + * On error, the `Promise` is rejected with an `Error` object, where `err.code`is one of the `DNS error codes`. + * @since v10.6.0 + * @param hostname Host name to resolve. + * @param [rrtype='A'] Resource record type. + */ + function resolve(hostname: string): Promise; + function resolve(hostname: string, rrtype: 'A'): Promise; + function resolve(hostname: string, rrtype: 'AAAA'): Promise; + function resolve(hostname: string, rrtype: 'ANY'): Promise; + function resolve(hostname: string, rrtype: 'CAA'): Promise; + function resolve(hostname: string, rrtype: 'CNAME'): Promise; + function resolve(hostname: string, rrtype: 'MX'): Promise; + function resolve(hostname: string, rrtype: 'NAPTR'): Promise; + function resolve(hostname: string, rrtype: 'NS'): Promise; + function resolve(hostname: string, rrtype: 'PTR'): Promise; + function resolve(hostname: string, rrtype: 'SOA'): Promise; + function resolve(hostname: string, rrtype: 'SRV'): Promise; + function resolve(hostname: string, rrtype: 'TXT'): Promise; + function resolve(hostname: string, rrtype: string): Promise; + /** + * Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the`hostname`. On success, the `Promise` is resolved with an array of IPv4 + * addresses (e.g. `['74.125.79.104', '74.125.79.105', '74.125.79.106']`). + * @since v10.6.0 + * @param hostname Host name to resolve. + */ + function resolve4(hostname: string): Promise; + function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise; + function resolve4(hostname: string, options: ResolveOptions): Promise; + /** + * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the`hostname`. On success, the `Promise` is resolved with an array of IPv6 + * addresses. + * @since v10.6.0 + * @param hostname Host name to resolve. + */ + function resolve6(hostname: string): Promise; + function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise; + function resolve6(hostname: string, options: ResolveOptions): Promise; + /** + * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query). + * On success, the `Promise` is resolved with an array containing various types of + * records. Each object has a property `type` that indicates the type of the + * current record. And depending on the `type`, additional properties will be + * present on the object: + * + * + * + * Here is an example of the result object: + * + * ```js + * [ { type: 'A', address: '127.0.0.1', ttl: 299 }, + * { type: 'CNAME', value: 'example.com' }, + * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 }, + * { type: 'NS', value: 'ns1.example.com' }, + * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] }, + * { type: 'SOA', + * nsname: 'ns1.example.com', + * hostmaster: 'admin.example.com', + * serial: 156696742, + * refresh: 900, + * retry: 900, + * expire: 1800, + * minttl: 60 } ] + * ``` + * @since v10.6.0 + */ + function resolveAny(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve `CAA` records for the `hostname`. On success, + * the `Promise` is resolved with an array of objects containing available + * certification authority authorization records available for the `hostname`(e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'},{critical: 128, issue: 'pki.example.com'}]`). + * @since v15.0.0 + */ + function resolveCaa(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. On success, + * the `Promise` is resolved with an array of canonical name records available for + * the `hostname` (e.g. `['bar.example.com']`). + * @since v10.6.0 + */ + function resolveCname(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the`hostname`. On success, the `Promise` is resolved with an array of objects + * containing both a `priority` and `exchange` property (e.g.`[{priority: 10, exchange: 'mx.example.com'}, ...]`). + * @since v10.6.0 + */ + function resolveMx(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve regular expression based records (`NAPTR`records) for the `hostname`. On success, the `Promise` is resolved with an array + * of objects with the following properties: + * + * * `flags` + * * `service` + * * `regexp` + * * `replacement` + * * `order` + * * `preference` + * + * ```js + * { + * flags: 's', + * service: 'SIP+D2U', + * regexp: '', + * replacement: '_sip._udp.example.com', + * order: 30, + * preference: 100 + * } + * ``` + * @since v10.6.0 + */ + function resolveNaptr(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve name server records (`NS` records) for the`hostname`. On success, the `Promise` is resolved with an array of name server + * records available for `hostname` (e.g.`['ns1.example.com', 'ns2.example.com']`). + * @since v10.6.0 + */ + function resolveNs(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve pointer records (`PTR` records) for the`hostname`. On success, the `Promise` is resolved with an array of strings + * containing the reply records. + * @since v10.6.0 + */ + function resolvePtr(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for + * the `hostname`. On success, the `Promise` is resolved with an object with the + * following properties: + * + * * `nsname` + * * `hostmaster` + * * `serial` + * * `refresh` + * * `retry` + * * `expire` + * * `minttl` + * + * ```js + * { + * nsname: 'ns.example.com', + * hostmaster: 'root.example.com', + * serial: 2013101809, + * refresh: 10000, + * retry: 2400, + * expire: 604800, + * minttl: 3600 + * } + * ``` + * @since v10.6.0 + */ + function resolveSoa(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve service records (`SRV` records) for the`hostname`. On success, the `Promise` is resolved with an array of objects with + * the following properties: + * + * * `priority` + * * `weight` + * * `port` + * * `name` + * + * ```js + * { + * priority: 10, + * weight: 5, + * port: 21223, + * name: 'service.example.com' + * } + * ``` + * @since v10.6.0 + */ + function resolveSrv(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve text queries (`TXT` records) for the`hostname`. On success, the `Promise` is resolved with a two-dimensional array + * of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of + * one record. Depending on the use case, these could be either joined together or + * treated separately. + * @since v10.6.0 + */ + function resolveTxt(hostname: string): Promise; + /** + * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an + * array of host names. + * + * On error, the `Promise` is rejected with an `Error` object, where `err.code`is one of the `DNS error codes`. + * @since v10.6.0 + */ + function reverse(ip: string): Promise; + /** + * Sets the IP address and port of servers to be used when performing DNS + * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted + * addresses. If the port is the IANA default DNS port (53) it can be omitted. + * + * ```js + * dnsPromises.setServers([ + * '4.4.4.4', + * '[2001:4860:4860::8888]', + * '4.4.4.4:1053', + * '[2001:4860:4860::8888]:1053', + * ]); + * ``` + * + * An error will be thrown if an invalid address is provided. + * + * The `dnsPromises.setServers()` method must not be called while a DNS query is in + * progress. + * + * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html). + * That is, if attempting to resolve with the first server provided results in a`NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with + * subsequent servers provided. Fallback DNS servers will only be used if the + * earlier ones time out or result in some other error. + * @since v10.6.0 + * @param servers array of `RFC 5952` formatted addresses + */ + function setServers(servers: ReadonlyArray): void; + class Resolver { + constructor(options?: ResolverOptions); + cancel(): void; + getServers: typeof getServers; + resolve: typeof resolve; + resolve4: typeof resolve4; + resolve6: typeof resolve6; + resolveAny: typeof resolveAny; + resolveCname: typeof resolveCname; + resolveMx: typeof resolveMx; + resolveNaptr: typeof resolveNaptr; + resolveNs: typeof resolveNs; + resolvePtr: typeof resolvePtr; + resolveSoa: typeof resolveSoa; + resolveSrv: typeof resolveSrv; + resolveTxt: typeof resolveTxt; + reverse: typeof reverse; + setLocalAddress(ipv4?: string, ipv6?: string): void; + setServers: typeof setServers; + } +} +declare module 'node:dns/promises' { + export * from 'dns/promises'; +} diff --git a/frontend/node_modules/@types/node/domain.d.ts b/frontend/node_modules/@types/node/domain.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..383e38557813207be3f5ea45cb45262d48d95014 --- /dev/null +++ b/frontend/node_modules/@types/node/domain.d.ts @@ -0,0 +1,169 @@ +/** + * **This module is pending deprecation.** Once a replacement API has been + * finalized, this module will be fully deprecated. Most developers should**not** have cause to use this module. Users who absolutely must have + * the functionality that domains provide may rely on it for the time being + * but should expect to have to migrate to a different solution + * in the future. + * + * Domains provide a way to handle multiple different IO operations as a + * single group. If any of the event emitters or callbacks registered to a + * domain emit an `'error'` event, or throw an error, then the domain object + * will be notified, rather than losing the context of the error in the`process.on('uncaughtException')` handler, or causing the program to + * exit immediately with an error code. + * @deprecated Since v1.4.2 - Deprecated + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/domain.js) + */ +declare module 'domain' { + import EventEmitter = require('node:events'); + /** + * The `Domain` class encapsulates the functionality of routing errors and + * uncaught exceptions to the active `Domain` object. + * + * To handle the errors that it catches, listen to its `'error'` event. + */ + class Domain extends EventEmitter { + /** + * An array of timers and event emitters that have been explicitly added + * to the domain. + */ + members: Array; + /** + * The `enter()` method is plumbing used by the `run()`, `bind()`, and`intercept()` methods to set the active domain. It sets `domain.active` and`process.domain` to the domain, and implicitly + * pushes the domain onto the domain + * stack managed by the domain module (see {@link exit} for details on the + * domain stack). The call to `enter()` delimits the beginning of a chain of + * asynchronous calls and I/O operations bound to a domain. + * + * Calling `enter()` changes only the active domain, and does not alter the domain + * itself. `enter()` and `exit()` can be called an arbitrary number of times on a + * single domain. + */ + enter(): void; + /** + * The `exit()` method exits the current domain, popping it off the domain stack. + * Any time execution is going to switch to the context of a different chain of + * asynchronous calls, it's important to ensure that the current domain is exited. + * The call to `exit()` delimits either the end of or an interruption to the chain + * of asynchronous calls and I/O operations bound to a domain. + * + * If there are multiple, nested domains bound to the current execution context,`exit()` will exit any domains nested within this domain. + * + * Calling `exit()` changes only the active domain, and does not alter the domain + * itself. `enter()` and `exit()` can be called an arbitrary number of times on a + * single domain. + */ + exit(): void; + /** + * Run the supplied function in the context of the domain, implicitly + * binding all event emitters, timers, and lowlevel requests that are + * created in that context. Optionally, arguments can be passed to + * the function. + * + * This is the most basic way to use a domain. + * + * ```js + * const domain = require('domain'); + * const fs = require('fs'); + * const d = domain.create(); + * d.on('error', (er) => { + * console.error('Caught error!', er); + * }); + * d.run(() => { + * process.nextTick(() => { + * setTimeout(() => { // Simulating some various async stuff + * fs.open('non-existent file', 'r', (er, fd) => { + * if (er) throw er; + * // proceed... + * }); + * }, 100); + * }); + * }); + * ``` + * + * In this example, the `d.on('error')` handler will be triggered, rather + * than crashing the program. + */ + run(fn: (...args: any[]) => T, ...args: any[]): T; + /** + * Explicitly adds an emitter to the domain. If any event handlers called by + * the emitter throw an error, or if the emitter emits an `'error'` event, it + * will be routed to the domain's `'error'` event, just like with implicit + * binding. + * + * This also works with timers that are returned from `setInterval()` and `setTimeout()`. If their callback function throws, it will be caught by + * the domain `'error'` handler. + * + * If the Timer or `EventEmitter` was already bound to a domain, it is removed + * from that one, and bound to this one instead. + * @param emitter emitter or timer to be added to the domain + */ + add(emitter: EventEmitter | NodeJS.Timer): void; + /** + * The opposite of {@link add}. Removes domain handling from the + * specified emitter. + * @param emitter emitter or timer to be removed from the domain + */ + remove(emitter: EventEmitter | NodeJS.Timer): void; + /** + * The returned function will be a wrapper around the supplied callback + * function. When the returned function is called, any errors that are + * thrown will be routed to the domain's `'error'` event. + * + * ```js + * const d = domain.create(); + * + * function readSomeFile(filename, cb) { + * fs.readFile(filename, 'utf8', d.bind((er, data) => { + * // If this throws, it will also be passed to the domain. + * return cb(er, data ? JSON.parse(data) : null); + * })); + * } + * + * d.on('error', (er) => { + * // An error occurred somewhere. If we throw it now, it will crash the program + * // with the normal line number and stack message. + * }); + * ``` + * @param callback The callback function + * @return The bound function + */ + bind(callback: T): T; + /** + * This method is almost identical to {@link bind}. However, in + * addition to catching thrown errors, it will also intercept `Error` objects sent as the first argument to the function. + * + * In this way, the common `if (err) return callback(err);` pattern can be replaced + * with a single error handler in a single place. + * + * ```js + * const d = domain.create(); + * + * function readSomeFile(filename, cb) { + * fs.readFile(filename, 'utf8', d.intercept((data) => { + * // Note, the first argument is never passed to the + * // callback since it is assumed to be the 'Error' argument + * // and thus intercepted by the domain. + * + * // If this throws, it will also be passed to the domain + * // so the error-handling logic can be moved to the 'error' + * // event on the domain instead of being repeated throughout + * // the program. + * return cb(null, JSON.parse(data)); + * })); + * } + * + * d.on('error', (er) => { + * // An error occurred somewhere. If we throw it now, it will crash the program + * // with the normal line number and stack message. + * }); + * ``` + * @param callback The callback function + * @return The intercepted function + */ + intercept(callback: T): T; + } + function create(): Domain; +} +declare module 'node:domain' { + export * from 'domain'; +} diff --git a/frontend/node_modules/@types/node/events.d.ts b/frontend/node_modules/@types/node/events.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a1ed5ab7394f3db7d9bc2a8bb1cc1cc501c89394 --- /dev/null +++ b/frontend/node_modules/@types/node/events.d.ts @@ -0,0 +1,623 @@ +/** + * Much of the Node.js core API is built around an idiomatic asynchronous + * event-driven architecture in which certain kinds of objects (called "emitters") + * emit named events that cause `Function` objects ("listeners") to be called. + * + * For instance: a `net.Server` object emits an event each time a peer + * connects to it; a `fs.ReadStream` emits an event when the file is opened; + * a `stream` emits an event whenever data is available to be read. + * + * All objects that emit events are instances of the `EventEmitter` class. These + * objects expose an `eventEmitter.on()` function that allows one or more + * functions to be attached to named events emitted by the object. Typically, + * event names are camel-cased strings but any valid JavaScript property key + * can be used. + * + * When the `EventEmitter` object emits an event, all of the functions attached + * to that specific event are called _synchronously_. Any values returned by the + * called listeners are _ignored_ and discarded. + * + * The following example shows a simple `EventEmitter` instance with a single + * listener. The `eventEmitter.on()` method is used to register listeners, while + * the `eventEmitter.emit()` method is used to trigger the event. + * + * ```js + * const EventEmitter = require('events'); + * + * class MyEmitter extends EventEmitter {} + * + * const myEmitter = new MyEmitter(); + * myEmitter.on('event', () => { + * console.log('an event occurred!'); + * }); + * myEmitter.emit('event'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/events.js) + */ +declare module 'events' { + interface EventEmitterOptions { + /** + * Enables automatic capturing of promise rejection. + */ + captureRejections?: boolean | undefined; + } + interface NodeEventTarget { + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + } + interface DOMEventTarget { + addEventListener( + eventName: string, + listener: (...args: any[]) => void, + opts?: { + once: boolean; + } + ): any; + } + interface StaticEventEmitterOptions { + signal?: AbortSignal | undefined; + } + interface EventEmitter extends NodeJS.EventEmitter {} + /** + * The `EventEmitter` class is defined and exposed by the `events` module: + * + * ```js + * const EventEmitter = require('events'); + * ``` + * + * All `EventEmitter`s emit the event `'newListener'` when new listeners are + * added and `'removeListener'` when existing listeners are removed. + * + * It supports the following option: + * @since v0.1.26 + */ + class EventEmitter { + constructor(options?: EventEmitterOptions); + /** + * Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given + * event or that is rejected if the `EventEmitter` emits `'error'` while waiting. + * The `Promise` will resolve with an array of all the arguments emitted to the + * given event. + * + * This method is intentionally generic and works with the web platform [EventTarget](https://dom.spec.whatwg.org/#interface-eventtarget) interface, which has no special`'error'` event + * semantics and does not listen to the `'error'` event. + * + * ```js + * const { once, EventEmitter } = require('events'); + * + * async function run() { + * const ee = new EventEmitter(); + * + * process.nextTick(() => { + * ee.emit('myevent', 42); + * }); + * + * const [value] = await once(ee, 'myevent'); + * console.log(value); + * + * const err = new Error('kaboom'); + * process.nextTick(() => { + * ee.emit('error', err); + * }); + * + * try { + * await once(ee, 'myevent'); + * } catch (err) { + * console.log('error happened', err); + * } + * } + * + * run(); + * ``` + * + * The special handling of the `'error'` event is only used when `events.once()`is used to wait for another event. If `events.once()` is used to wait for the + * '`error'` event itself, then it is treated as any other kind of event without + * special handling: + * + * ```js + * const { EventEmitter, once } = require('events'); + * + * const ee = new EventEmitter(); + * + * once(ee, 'error') + * .then(([err]) => console.log('ok', err.message)) + * .catch((err) => console.log('error', err.message)); + * + * ee.emit('error', new Error('boom')); + * + * // Prints: ok boom + * ``` + * + * An `AbortSignal` can be used to cancel waiting for the event: + * + * ```js + * const { EventEmitter, once } = require('events'); + * + * const ee = new EventEmitter(); + * const ac = new AbortController(); + * + * async function foo(emitter, event, signal) { + * try { + * await once(emitter, event, { signal }); + * console.log('event emitted!'); + * } catch (error) { + * if (error.name === 'AbortError') { + * console.error('Waiting for the event was canceled!'); + * } else { + * console.error('There was an error', error.message); + * } + * } + * } + * + * foo(ee, 'foo', ac.signal); + * ac.abort(); // Abort waiting for the event + * ee.emit('foo'); // Prints: Waiting for the event was canceled! + * ``` + * @since v11.13.0, v10.16.0 + */ + static once(emitter: NodeEventTarget, eventName: string | symbol, options?: StaticEventEmitterOptions): Promise; + static once(emitter: DOMEventTarget, eventName: string, options?: StaticEventEmitterOptions): Promise; + /** + * ```js + * const { on, EventEmitter } = require('events'); + * + * (async () => { + * const ee = new EventEmitter(); + * + * // Emit later on + * process.nextTick(() => { + * ee.emit('foo', 'bar'); + * ee.emit('foo', 42); + * }); + * + * for await (const event of on(ee, 'foo')) { + * // The execution of this inner block is synchronous and it + * // processes one event at a time (even with await). Do not use + * // if concurrent execution is required. + * console.log(event); // prints ['bar'] [42] + * } + * // Unreachable here + * })(); + * ``` + * + * Returns an `AsyncIterator` that iterates `eventName` events. It will throw + * if the `EventEmitter` emits `'error'`. It removes all listeners when + * exiting the loop. The `value` returned by each iteration is an array + * composed of the emitted event arguments. + * + * An `AbortSignal` can be used to cancel waiting on events: + * + * ```js + * const { on, EventEmitter } = require('events'); + * const ac = new AbortController(); + * + * (async () => { + * const ee = new EventEmitter(); + * + * // Emit later on + * process.nextTick(() => { + * ee.emit('foo', 'bar'); + * ee.emit('foo', 42); + * }); + * + * for await (const event of on(ee, 'foo', { signal: ac.signal })) { + * // The execution of this inner block is synchronous and it + * // processes one event at a time (even with await). Do not use + * // if concurrent execution is required. + * console.log(event); // prints ['bar'] [42] + * } + * // Unreachable here + * })(); + * + * process.nextTick(() => ac.abort()); + * ``` + * @since v13.6.0, v12.16.0 + * @param eventName The name of the event being listened for + * @return that iterates `eventName` events emitted by the `emitter` + */ + static on(emitter: NodeJS.EventEmitter, eventName: string, options?: StaticEventEmitterOptions): AsyncIterableIterator; + /** + * A class method that returns the number of listeners for the given `eventName`registered on the given `emitter`. + * + * ```js + * const { EventEmitter, listenerCount } = require('events'); + * const myEmitter = new EventEmitter(); + * myEmitter.on('event', () => {}); + * myEmitter.on('event', () => {}); + * console.log(listenerCount(myEmitter, 'event')); + * // Prints: 2 + * ``` + * @since v0.9.12 + * @deprecated Since v3.2.0 - Use `listenerCount` instead. + * @param emitter The emitter to query + * @param eventName The event name + */ + static listenerCount(emitter: NodeJS.EventEmitter, eventName: string | symbol): number; + /** + * Returns a copy of the array of listeners for the event named `eventName`. + * + * For `EventEmitter`s this behaves exactly the same as calling `.listeners` on + * the emitter. + * + * For `EventTarget`s this is the only way to get the event listeners for the + * event target. This is useful for debugging and diagnostic purposes. + * + * ```js + * const { getEventListeners, EventEmitter } = require('events'); + * + * { + * const ee = new EventEmitter(); + * const listener = () => console.log('Events are fun'); + * ee.on('foo', listener); + * getEventListeners(ee, 'foo'); // [listener] + * } + * { + * const et = new EventTarget(); + * const listener = () => console.log('Events are fun'); + * et.addEventListener('foo', listener); + * getEventListeners(et, 'foo'); // [listener] + * } + * ``` + * @since v15.2.0 + */ + static getEventListeners(emitter: DOMEventTarget | NodeJS.EventEmitter, name: string | symbol): Function[]; + /** + * This symbol shall be used to install a listener for only monitoring `'error'` + * events. Listeners installed using this symbol are called before the regular + * `'error'` listeners are called. + * + * Installing a listener using this symbol does not change the behavior once an + * `'error'` event is emitted, therefore the process will still crash if no + * regular `'error'` listener is installed. + */ + static readonly errorMonitor: unique symbol; + static readonly captureRejectionSymbol: unique symbol; + /** + * Sets or gets the default captureRejection value for all emitters. + */ + // TODO: These should be described using static getter/setter pairs: + static captureRejections: boolean; + static defaultMaxListeners: number; + } + import internal = require('node:events'); + namespace EventEmitter { + // Should just be `export { EventEmitter }`, but that doesn't work in TypeScript 3.4 + export { internal as EventEmitter }; + export interface Abortable { + /** + * When provided the corresponding `AbortController` can be used to cancel an asynchronous action. + */ + signal?: AbortSignal | undefined; + } + } + global { + namespace NodeJS { + interface EventEmitter { + /** + * Alias for `emitter.on(eventName, listener)`. + * @since v0.1.26 + */ + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + /** + * Adds the `listener` function to the end of the listeners array for the + * event named `eventName`. No checks are made to see if the `listener` has + * already been added. Multiple calls passing the same combination of `eventName`and `listener` will result in the `listener` being added, and called, multiple + * times. + * + * ```js + * server.on('connection', (stream) => { + * console.log('someone connected!'); + * }); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * + * By default, event listeners are invoked in the order they are added. The`emitter.prependListener()` method can be used as an alternative to add the + * event listener to the beginning of the listeners array. + * + * ```js + * const myEE = new EventEmitter(); + * myEE.on('foo', () => console.log('a')); + * myEE.prependListener('foo', () => console.log('b')); + * myEE.emit('foo'); + * // Prints: + * // b + * // a + * ``` + * @since v0.1.101 + * @param eventName The name of the event. + * @param listener The callback function + */ + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + /** + * Adds a **one-time**`listener` function for the event named `eventName`. The + * next time `eventName` is triggered, this listener is removed and then invoked. + * + * ```js + * server.once('connection', (stream) => { + * console.log('Ah, we have our first user!'); + * }); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * + * By default, event listeners are invoked in the order they are added. The`emitter.prependOnceListener()` method can be used as an alternative to add the + * event listener to the beginning of the listeners array. + * + * ```js + * const myEE = new EventEmitter(); + * myEE.once('foo', () => console.log('a')); + * myEE.prependOnceListener('foo', () => console.log('b')); + * myEE.emit('foo'); + * // Prints: + * // b + * // a + * ``` + * @since v0.3.0 + * @param eventName The name of the event. + * @param listener The callback function + */ + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + /** + * Removes the specified `listener` from the listener array for the event named`eventName`. + * + * ```js + * const callback = (stream) => { + * console.log('someone connected!'); + * }; + * server.on('connection', callback); + * // ... + * server.removeListener('connection', callback); + * ``` + * + * `removeListener()` will remove, at most, one instance of a listener from the + * listener array. If any single listener has been added multiple times to the + * listener array for the specified `eventName`, then `removeListener()` must be + * called multiple times to remove each instance. + * + * Once an event is emitted, all listeners attached to it at the + * time of emitting are called in order. This implies that any`removeListener()` or `removeAllListeners()` calls _after_ emitting and_before_ the last listener finishes execution will + * not remove them from`emit()` in progress. Subsequent events behave as expected. + * + * ```js + * const myEmitter = new MyEmitter(); + * + * const callbackA = () => { + * console.log('A'); + * myEmitter.removeListener('event', callbackB); + * }; + * + * const callbackB = () => { + * console.log('B'); + * }; + * + * myEmitter.on('event', callbackA); + * + * myEmitter.on('event', callbackB); + * + * // callbackA removes listener callbackB but it will still be called. + * // Internal listener array at time of emit [callbackA, callbackB] + * myEmitter.emit('event'); + * // Prints: + * // A + * // B + * + * // callbackB is now removed. + * // Internal listener array [callbackA] + * myEmitter.emit('event'); + * // Prints: + * // A + * ``` + * + * Because listeners are managed using an internal array, calling this will + * change the position indices of any listener registered _after_ the listener + * being removed. This will not impact the order in which listeners are called, + * but it means that any copies of the listener array as returned by + * the `emitter.listeners()` method will need to be recreated. + * + * When a single function has been added as a handler multiple times for a single + * event (as in the example below), `removeListener()` will remove the most + * recently added instance. In the example the `once('ping')`listener is removed: + * + * ```js + * const ee = new EventEmitter(); + * + * function pong() { + * console.log('pong'); + * } + * + * ee.on('ping', pong); + * ee.once('ping', pong); + * ee.removeListener('ping', pong); + * + * ee.emit('ping'); + * ee.emit('ping'); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v0.1.26 + */ + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + /** + * Alias for `emitter.removeListener()`. + * @since v10.0.0 + */ + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + /** + * Removes all listeners, or those of the specified `eventName`. + * + * It is bad practice to remove listeners added elsewhere in the code, + * particularly when the `EventEmitter` instance was created by some other + * component or module (e.g. sockets or file streams). + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v0.1.26 + */ + removeAllListeners(event?: string | symbol): this; + /** + * By default `EventEmitter`s will print a warning if more than `10` listeners are + * added for a particular event. This is a useful default that helps finding + * memory leaks. The `emitter.setMaxListeners()` method allows the limit to be + * modified for this specific `EventEmitter` instance. The value can be set to`Infinity` (or `0`) to indicate an unlimited number of listeners. + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v0.3.5 + */ + setMaxListeners(n: number): this; + /** + * Returns the current max listener value for the `EventEmitter` which is either + * set by `emitter.setMaxListeners(n)` or defaults to {@link defaultMaxListeners}. + * @since v1.0.0 + */ + getMaxListeners(): number; + /** + * Returns a copy of the array of listeners for the event named `eventName`. + * + * ```js + * server.on('connection', (stream) => { + * console.log('someone connected!'); + * }); + * console.log(util.inspect(server.listeners('connection'))); + * // Prints: [ [Function] ] + * ``` + * @since v0.1.26 + */ + listeners(eventName: string | symbol): Function[]; + /** + * Returns a copy of the array of listeners for the event named `eventName`, + * including any wrappers (such as those created by `.once()`). + * + * ```js + * const emitter = new EventEmitter(); + * emitter.once('log', () => console.log('log once')); + * + * // Returns a new Array with a function `onceWrapper` which has a property + * // `listener` which contains the original listener bound above + * const listeners = emitter.rawListeners('log'); + * const logFnWrapper = listeners[0]; + * + * // Logs "log once" to the console and does not unbind the `once` event + * logFnWrapper.listener(); + * + * // Logs "log once" to the console and removes the listener + * logFnWrapper(); + * + * emitter.on('log', () => console.log('log persistently')); + * // Will return a new Array with a single function bound by `.on()` above + * const newListeners = emitter.rawListeners('log'); + * + * // Logs "log persistently" twice + * newListeners[0](); + * emitter.emit('log'); + * ``` + * @since v9.4.0 + */ + rawListeners(eventName: string | symbol): Function[]; + /** + * Synchronously calls each of the listeners registered for the event named`eventName`, in the order they were registered, passing the supplied arguments + * to each. + * + * Returns `true` if the event had listeners, `false` otherwise. + * + * ```js + * const EventEmitter = require('events'); + * const myEmitter = new EventEmitter(); + * + * // First listener + * myEmitter.on('event', function firstListener() { + * console.log('Helloooo! first listener'); + * }); + * // Second listener + * myEmitter.on('event', function secondListener(arg1, arg2) { + * console.log(`event with parameters ${arg1}, ${arg2} in second listener`); + * }); + * // Third listener + * myEmitter.on('event', function thirdListener(...args) { + * const parameters = args.join(', '); + * console.log(`event with parameters ${parameters} in third listener`); + * }); + * + * console.log(myEmitter.listeners('event')); + * + * myEmitter.emit('event', 1, 2, 3, 4, 5); + * + * // Prints: + * // [ + * // [Function: firstListener], + * // [Function: secondListener], + * // [Function: thirdListener] + * // ] + * // Helloooo! first listener + * // event with parameters 1, 2 in second listener + * // event with parameters 1, 2, 3, 4, 5 in third listener + * ``` + * @since v0.1.26 + */ + emit(eventName: string | symbol, ...args: any[]): boolean; + /** + * Returns the number of listeners listening to the event named `eventName`. + * @since v3.2.0 + * @param eventName The name of the event being listened for + */ + listenerCount(eventName: string | symbol): number; + /** + * Adds the `listener` function to the _beginning_ of the listeners array for the + * event named `eventName`. No checks are made to see if the `listener` has + * already been added. Multiple calls passing the same combination of `eventName`and `listener` will result in the `listener` being added, and called, multiple + * times. + * + * ```js + * server.prependListener('connection', (stream) => { + * console.log('someone connected!'); + * }); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v6.0.0 + * @param eventName The name of the event. + * @param listener The callback function + */ + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + /** + * Adds a **one-time**`listener` function for the event named `eventName` to the_beginning_ of the listeners array. The next time `eventName` is triggered, this + * listener is removed, and then invoked. + * + * ```js + * server.prependOnceListener('connection', (stream) => { + * console.log('Ah, we have our first user!'); + * }); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v6.0.0 + * @param eventName The name of the event. + * @param listener The callback function + */ + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + /** + * Returns an array listing the events for which the emitter has registered + * listeners. The values in the array are strings or `Symbol`s. + * + * ```js + * const EventEmitter = require('events'); + * const myEE = new EventEmitter(); + * myEE.on('foo', () => {}); + * myEE.on('bar', () => {}); + * + * const sym = Symbol('symbol'); + * myEE.on(sym, () => {}); + * + * console.log(myEE.eventNames()); + * // Prints: [ 'foo', 'bar', Symbol(symbol) ] + * ``` + * @since v6.0.0 + */ + eventNames(): Array; + } + } + } + export = EventEmitter; +} +declare module 'node:events' { + import events = require('events'); + export = events; +} diff --git a/frontend/node_modules/@types/node/fs.d.ts b/frontend/node_modules/@types/node/fs.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0a1cd5a99b1f63b6dc3171cd74d84b371cbfd2e1 --- /dev/null +++ b/frontend/node_modules/@types/node/fs.d.ts @@ -0,0 +1,3748 @@ +/** + * The `fs` module enables interacting with the file system in a + * way modeled on standard POSIX functions. + * + * To use the promise-based APIs: + * + * ```js + * import * as fs from 'fs/promises'; + * ``` + * + * To use the callback and sync APIs: + * + * ```js + * import * as fs from 'fs'; + * ``` + * + * All file system operations have synchronous, callback, and promise-based + * forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM). + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/fs.js) + */ +declare module 'fs' { + import * as stream from 'node:stream'; + import { Abortable, EventEmitter } from 'node:events'; + import { URL } from 'node:url'; + import * as promises from 'node:fs/promises'; + export { promises }; + /** + * Valid types for path values in "fs". + */ + export type PathLike = string | Buffer | URL; + export type PathOrFileDescriptor = PathLike | number; + export type TimeLike = string | number | Date; + export type NoParamCallback = (err: NodeJS.ErrnoException | null) => void; + export type BufferEncodingOption = + | 'buffer' + | { + encoding: 'buffer'; + }; + export interface ObjectEncodingOptions { + encoding?: BufferEncoding | null | undefined; + } + export type EncodingOption = ObjectEncodingOptions | BufferEncoding | undefined | null; + export type OpenMode = number | string; + export type Mode = number | string; + export interface StatsBase { + isFile(): boolean; + isDirectory(): boolean; + isBlockDevice(): boolean; + isCharacterDevice(): boolean; + isSymbolicLink(): boolean; + isFIFO(): boolean; + isSocket(): boolean; + dev: T; + ino: T; + mode: T; + nlink: T; + uid: T; + gid: T; + rdev: T; + size: T; + blksize: T; + blocks: T; + atimeMs: T; + mtimeMs: T; + ctimeMs: T; + birthtimeMs: T; + atime: Date; + mtime: Date; + ctime: Date; + birthtime: Date; + } + export interface Stats extends StatsBase {} + /** + * A `fs.Stats` object provides information about a file. + * + * Objects returned from {@link stat}, {@link lstat} and {@link fstat} and + * their synchronous counterparts are of this type. + * If `bigint` in the `options` passed to those methods is true, the numeric values + * will be `bigint` instead of `number`, and the object will contain additional + * nanosecond-precision properties suffixed with `Ns`. + * + * ```console + * Stats { + * dev: 2114, + * ino: 48064969, + * mode: 33188, + * nlink: 1, + * uid: 85, + * gid: 100, + * rdev: 0, + * size: 527, + * blksize: 4096, + * blocks: 8, + * atimeMs: 1318289051000.1, + * mtimeMs: 1318289051000.1, + * ctimeMs: 1318289051000.1, + * birthtimeMs: 1318289051000.1, + * atime: Mon, 10 Oct 2011 23:24:11 GMT, + * mtime: Mon, 10 Oct 2011 23:24:11 GMT, + * ctime: Mon, 10 Oct 2011 23:24:11 GMT, + * birthtime: Mon, 10 Oct 2011 23:24:11 GMT } + * ``` + * + * `bigint` version: + * + * ```console + * BigIntStats { + * dev: 2114n, + * ino: 48064969n, + * mode: 33188n, + * nlink: 1n, + * uid: 85n, + * gid: 100n, + * rdev: 0n, + * size: 527n, + * blksize: 4096n, + * blocks: 8n, + * atimeMs: 1318289051000n, + * mtimeMs: 1318289051000n, + * ctimeMs: 1318289051000n, + * birthtimeMs: 1318289051000n, + * atimeNs: 1318289051000000000n, + * mtimeNs: 1318289051000000000n, + * ctimeNs: 1318289051000000000n, + * birthtimeNs: 1318289051000000000n, + * atime: Mon, 10 Oct 2011 23:24:11 GMT, + * mtime: Mon, 10 Oct 2011 23:24:11 GMT, + * ctime: Mon, 10 Oct 2011 23:24:11 GMT, + * birthtime: Mon, 10 Oct 2011 23:24:11 GMT } + * ``` + * @since v0.1.21 + */ + export class Stats {} + /** + * A representation of a directory entry, which can be a file or a subdirectory + * within the directory, as returned by reading from an `fs.Dir`. The + * directory entry is a combination of the file name and file type pairs. + * + * Additionally, when {@link readdir} or {@link readdirSync} is called with + * the `withFileTypes` option set to `true`, the resulting array is filled with `fs.Dirent` objects, rather than strings or `Buffer` s. + * @since v10.10.0 + */ + export class Dirent { + /** + * Returns `true` if the `fs.Dirent` object describes a regular file. + * @since v10.10.0 + */ + isFile(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a file system + * directory. + * @since v10.10.0 + */ + isDirectory(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a block device. + * @since v10.10.0 + */ + isBlockDevice(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a character device. + * @since v10.10.0 + */ + isCharacterDevice(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a symbolic link. + * @since v10.10.0 + */ + isSymbolicLink(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a first-in-first-out + * (FIFO) pipe. + * @since v10.10.0 + */ + isFIFO(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a socket. + * @since v10.10.0 + */ + isSocket(): boolean; + /** + * The file name that this `fs.Dirent` object refers to. The type of this + * value is determined by the `options.encoding` passed to {@link readdir} or {@link readdirSync}. + * @since v10.10.0 + */ + name: string; + } + /** + * A class representing a directory stream. + * + * Created by {@link opendir}, {@link opendirSync}, or `fsPromises.opendir()`. + * + * ```js + * import { opendir } from 'fs/promises'; + * + * try { + * const dir = await opendir('./'); + * for await (const dirent of dir) + * console.log(dirent.name); + * } catch (err) { + * console.error(err); + * } + * ``` + * + * When using the async iterator, the `fs.Dir` object will be automatically + * closed after the iterator exits. + * @since v12.12.0 + */ + export class Dir implements AsyncIterable { + /** + * The read-only path of this directory as was provided to {@link opendir},{@link opendirSync}, or `fsPromises.opendir()`. + * @since v12.12.0 + */ + readonly path: string; + /** + * Asynchronously iterates over the directory via `readdir(3)` until all entries have been read. + */ + [Symbol.asyncIterator](): AsyncIterableIterator; + /** + * Asynchronously close the directory's underlying resource handle. + * Subsequent reads will result in errors. + * + * A promise is returned that will be resolved after the resource has been + * closed. + * @since v12.12.0 + */ + close(): Promise; + close(cb: NoParamCallback): void; + /** + * Synchronously close the directory's underlying resource handle. + * Subsequent reads will result in errors. + * @since v12.12.0 + */ + closeSync(): void; + /** + * Asynchronously read the next directory entry via [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) as an `fs.Dirent`. + * + * A promise is returned that will be resolved with an `fs.Dirent`, or `null`if there are no more directory entries to read. + * + * Directory entries returned by this function are in no particular order as + * provided by the operating system's underlying directory mechanisms. + * Entries added or removed while iterating over the directory might not be + * included in the iteration results. + * @since v12.12.0 + * @return containing {fs.Dirent|null} + */ + read(): Promise; + read(cb: (err: NodeJS.ErrnoException | null, dirEnt: Dirent | null) => void): void; + /** + * Synchronously read the next directory entry as an `fs.Dirent`. See the + * POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more detail. + * + * If there are no more directory entries to read, `null` will be returned. + * + * Directory entries returned by this function are in no particular order as + * provided by the operating system's underlying directory mechanisms. + * Entries added or removed while iterating over the directory might not be + * included in the iteration results. + * @since v12.12.0 + */ + readSync(): Dirent | null; + } + export interface FSWatcher extends EventEmitter { + /** + * Stop watching for changes on the given `fs.FSWatcher`. Once stopped, the `fs.FSWatcher` object is no longer usable. + * @since v0.5.8 + */ + close(): void; + /** + * events.EventEmitter + * 1. change + * 2. error + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this; + addListener(event: 'error', listener: (error: Error) => void): this; + addListener(event: 'close', listener: () => void): this; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this; + on(event: 'error', listener: (error: Error) => void): this; + on(event: 'close', listener: () => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this; + once(event: 'error', listener: (error: Error) => void): this; + once(event: 'close', listener: () => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this; + prependListener(event: 'error', listener: (error: Error) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'change', listener: (eventType: string, filename: string | Buffer) => void): this; + prependOnceListener(event: 'error', listener: (error: Error) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + } + /** + * Instances of `fs.ReadStream` are created and returned using the {@link createReadStream} function. + * @since v0.1.93 + */ + export class ReadStream extends stream.Readable { + close(): void; + /** + * The number of bytes that have been read so far. + * @since v6.4.0 + */ + bytesRead: number; + /** + * The path to the file the stream is reading from as specified in the first + * argument to `fs.createReadStream()`. If `path` is passed as a string, then`readStream.path` will be a string. If `path` is passed as a `Buffer`, then`readStream.path` will be a + * `Buffer`. If `fd` is specified, then`readStream.path` will be `undefined`. + * @since v0.1.93 + */ + path: string | Buffer; + /** + * This property is `true` if the underlying file has not been opened yet, + * i.e. before the `'ready'` event is emitted. + * @since v11.2.0, v10.16.0 + */ + pending: boolean; + /** + * events.EventEmitter + * 1. open + * 2. close + * 3. ready + */ + addListener(event: 'close', listener: () => void): this; + addListener(event: 'data', listener: (chunk: Buffer | string) => void): this; + addListener(event: 'end', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'open', listener: (fd: number) => void): this; + addListener(event: 'pause', listener: () => void): this; + addListener(event: 'readable', listener: () => void): this; + addListener(event: 'ready', listener: () => void): this; + addListener(event: 'resume', listener: () => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'data', listener: (chunk: Buffer | string) => void): this; + on(event: 'end', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'open', listener: (fd: number) => void): this; + on(event: 'pause', listener: () => void): this; + on(event: 'readable', listener: () => void): this; + on(event: 'ready', listener: () => void): this; + on(event: 'resume', listener: () => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'data', listener: (chunk: Buffer | string) => void): this; + once(event: 'end', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'open', listener: (fd: number) => void): this; + once(event: 'pause', listener: () => void): this; + once(event: 'readable', listener: () => void): this; + once(event: 'ready', listener: () => void): this; + once(event: 'resume', listener: () => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'data', listener: (chunk: Buffer | string) => void): this; + prependListener(event: 'end', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'open', listener: (fd: number) => void): this; + prependListener(event: 'pause', listener: () => void): this; + prependListener(event: 'readable', listener: () => void): this; + prependListener(event: 'ready', listener: () => void): this; + prependListener(event: 'resume', listener: () => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'data', listener: (chunk: Buffer | string) => void): this; + prependOnceListener(event: 'end', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'open', listener: (fd: number) => void): this; + prependOnceListener(event: 'pause', listener: () => void): this; + prependOnceListener(event: 'readable', listener: () => void): this; + prependOnceListener(event: 'ready', listener: () => void): this; + prependOnceListener(event: 'resume', listener: () => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + /** + * * Extends `stream.Writable` + * + * Instances of `fs.WriteStream` are created and returned using the {@link createWriteStream} function. + * @since v0.1.93 + */ + export class WriteStream extends stream.Writable { + /** + * Closes `writeStream`. Optionally accepts a + * callback that will be executed once the `writeStream`is closed. + * @since v0.9.4 + */ + close(): void; + /** + * The number of bytes written so far. Does not include data that is still queued + * for writing. + * @since v0.4.7 + */ + bytesWritten: number; + /** + * The path to the file the stream is writing to as specified in the first + * argument to {@link createWriteStream}. If `path` is passed as a string, then`writeStream.path` will be a string. If `path` is passed as a `Buffer`, then`writeStream.path` will be a + * `Buffer`. + * @since v0.1.93 + */ + path: string | Buffer; + /** + * This property is `true` if the underlying file has not been opened yet, + * i.e. before the `'ready'` event is emitted. + * @since v11.2.0 + */ + pending: boolean; + /** + * events.EventEmitter + * 1. open + * 2. close + * 3. ready + */ + addListener(event: 'close', listener: () => void): this; + addListener(event: 'drain', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'finish', listener: () => void): this; + addListener(event: 'open', listener: (fd: number) => void): this; + addListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + addListener(event: 'ready', listener: () => void): this; + addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'drain', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'finish', listener: () => void): this; + on(event: 'open', listener: (fd: number) => void): this; + on(event: 'pipe', listener: (src: stream.Readable) => void): this; + on(event: 'ready', listener: () => void): this; + on(event: 'unpipe', listener: (src: stream.Readable) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'drain', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'finish', listener: () => void): this; + once(event: 'open', listener: (fd: number) => void): this; + once(event: 'pipe', listener: (src: stream.Readable) => void): this; + once(event: 'ready', listener: () => void): this; + once(event: 'unpipe', listener: (src: stream.Readable) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'drain', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'finish', listener: () => void): this; + prependListener(event: 'open', listener: (fd: number) => void): this; + prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + prependListener(event: 'ready', listener: () => void): this; + prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'drain', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'finish', listener: () => void): this; + prependOnceListener(event: 'open', listener: (fd: number) => void): this; + prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + prependOnceListener(event: 'ready', listener: () => void): this; + prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + /** + * Asynchronously rename file at `oldPath` to the pathname provided + * as `newPath`. In the case that `newPath` already exists, it will + * be overwritten. If there is a directory at `newPath`, an error will + * be raised instead. No arguments other than a possible exception are + * given to the completion callback. + * + * See also: [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html). + * + * ```js + * import { rename } from 'fs'; + * + * rename('oldFile.txt', 'newFile.txt', (err) => { + * if (err) throw err; + * console.log('Rename complete!'); + * }); + * ``` + * @since v0.0.2 + */ + export function rename(oldPath: PathLike, newPath: PathLike, callback: NoParamCallback): void; + export namespace rename { + /** + * Asynchronous rename(2) - Change the name or location of a file or directory. + * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function __promisify__(oldPath: PathLike, newPath: PathLike): Promise; + } + /** + * Renames the file from `oldPath` to `newPath`. Returns `undefined`. + * + * See the POSIX [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html) documentation for more details. + * @since v0.1.21 + */ + export function renameSync(oldPath: PathLike, newPath: PathLike): void; + /** + * Truncates the file. No arguments other than a possible exception are + * given to the completion callback. A file descriptor can also be passed as the + * first argument. In this case, `fs.ftruncate()` is called. + * + * ```js + * import { truncate } from 'fs'; + * // Assuming that 'path/file.txt' is a regular file. + * truncate('path/file.txt', (err) => { + * if (err) throw err; + * console.log('path/file.txt was truncated'); + * }); + * ``` + * + * Passing a file descriptor is deprecated and may result in an error being thrown + * in the future. + * + * See the POSIX [`truncate(2)`](http://man7.org/linux/man-pages/man2/truncate.2.html) documentation for more details. + * @since v0.8.6 + * @param [len=0] + */ + export function truncate(path: PathLike, len: number | undefined | null, callback: NoParamCallback): void; + /** + * Asynchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function truncate(path: PathLike, callback: NoParamCallback): void; + export namespace truncate { + /** + * Asynchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param len If not specified, defaults to `0`. + */ + function __promisify__(path: PathLike, len?: number | null): Promise; + } + /** + * Truncates the file. Returns `undefined`. A file descriptor can also be + * passed as the first argument. In this case, `fs.ftruncateSync()` is called. + * + * Passing a file descriptor is deprecated and may result in an error being thrown + * in the future. + * @since v0.8.6 + * @param [len=0] + */ + export function truncateSync(path: PathLike, len?: number | null): void; + /** + * Truncates the file descriptor. No arguments other than a possible exception are + * given to the completion callback. + * + * See the POSIX [`ftruncate(2)`](http://man7.org/linux/man-pages/man2/ftruncate.2.html) documentation for more detail. + * + * If the file referred to by the file descriptor was larger than `len` bytes, only + * the first `len` bytes will be retained in the file. + * + * For example, the following program retains only the first four bytes of the + * file: + * + * ```js + * import { open, close, ftruncate } from 'fs'; + * + * function closeFd(fd) { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * + * open('temp.txt', 'r+', (err, fd) => { + * if (err) throw err; + * + * try { + * ftruncate(fd, 4, (err) => { + * closeFd(fd); + * if (err) throw err; + * }); + * } catch (err) { + * closeFd(fd); + * if (err) throw err; + * } + * }); + * ``` + * + * If the file previously was shorter than `len` bytes, it is extended, and the + * extended part is filled with null bytes (`'\0'`): + * + * If `len` is negative then `0` will be used. + * @since v0.8.6 + * @param [len=0] + */ + export function ftruncate(fd: number, len: number | undefined | null, callback: NoParamCallback): void; + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param fd A file descriptor. + */ + export function ftruncate(fd: number, callback: NoParamCallback): void; + export namespace ftruncate { + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param fd A file descriptor. + * @param len If not specified, defaults to `0`. + */ + function __promisify__(fd: number, len?: number | null): Promise; + } + /** + * Truncates the file descriptor. Returns `undefined`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link ftruncate}. + * @since v0.8.6 + * @param [len=0] + */ + export function ftruncateSync(fd: number, len?: number | null): void; + /** + * Asynchronously changes owner and group of a file. No arguments other than a + * possible exception are given to the completion callback. + * + * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail. + * @since v0.1.97 + */ + export function chown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void; + export namespace chown { + /** + * Asynchronous chown(2) - Change ownership of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike, uid: number, gid: number): Promise; + } + /** + * Synchronously changes owner and group of a file. Returns `undefined`. + * This is the synchronous version of {@link chown}. + * + * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail. + * @since v0.1.97 + */ + export function chownSync(path: PathLike, uid: number, gid: number): void; + /** + * Sets the owner of the file. No arguments other than a possible exception are + * given to the completion callback. + * + * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail. + * @since v0.4.7 + */ + export function fchown(fd: number, uid: number, gid: number, callback: NoParamCallback): void; + export namespace fchown { + /** + * Asynchronous fchown(2) - Change ownership of a file. + * @param fd A file descriptor. + */ + function __promisify__(fd: number, uid: number, gid: number): Promise; + } + /** + * Sets the owner of the file. Returns `undefined`. + * + * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail. + * @since v0.4.7 + * @param uid The file's new owner's user id. + * @param gid The file's new group's group id. + */ + export function fchownSync(fd: number, uid: number, gid: number): void; + /** + * Set the owner of the symbolic link. No arguments other than a possible + * exception are given to the completion callback. + * + * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more detail. + */ + export function lchown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void; + export namespace lchown { + /** + * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike, uid: number, gid: number): Promise; + } + /** + * Set the owner for the path. Returns `undefined`. + * + * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more details. + * @param uid The file's new owner's user id. + * @param gid The file's new group's group id. + */ + export function lchownSync(path: PathLike, uid: number, gid: number): void; + /** + * Changes the access and modification times of a file in the same way as {@link utimes}, with the difference that if the path refers to a symbolic + * link, then the link is not dereferenced: instead, the timestamps of the + * symbolic link itself are changed. + * + * No arguments other than a possible exception are given to the completion + * callback. + * @since v14.5.0, v12.19.0 + */ + export function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; + export namespace lutimes { + /** + * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`, + * with the difference that if the path refers to a symbolic link, then the link is not + * dereferenced: instead, the timestamps of the symbolic link itself are changed. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; + } + /** + * Change the file system timestamps of the symbolic link referenced by `path`. + * Returns `undefined`, or throws an exception when parameters are incorrect or + * the operation fails. This is the synchronous version of {@link lutimes}. + * @since v14.5.0, v12.19.0 + */ + export function lutimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void; + /** + * Asynchronously changes the permissions of a file. No arguments other than a + * possible exception are given to the completion callback. + * + * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail. + * + * ```js + * import { chmod } from 'fs'; + * + * chmod('my_file.txt', 0o775, (err) => { + * if (err) throw err; + * console.log('The permissions for file "my_file.txt" have been changed!'); + * }); + * ``` + * @since v0.1.30 + */ + export function chmod(path: PathLike, mode: Mode, callback: NoParamCallback): void; + export namespace chmod { + /** + * Asynchronous chmod(2) - Change permissions of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function __promisify__(path: PathLike, mode: Mode): Promise; + } + /** + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link chmod}. + * + * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail. + * @since v0.6.7 + */ + export function chmodSync(path: PathLike, mode: Mode): void; + /** + * Sets the permissions on the file. No arguments other than a possible exception + * are given to the completion callback. + * + * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail. + * @since v0.4.7 + */ + export function fchmod(fd: number, mode: Mode, callback: NoParamCallback): void; + export namespace fchmod { + /** + * Asynchronous fchmod(2) - Change permissions of a file. + * @param fd A file descriptor. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function __promisify__(fd: number, mode: Mode): Promise; + } + /** + * Sets the permissions on the file. Returns `undefined`. + * + * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail. + * @since v0.4.7 + */ + export function fchmodSync(fd: number, mode: Mode): void; + /** + * Changes the permissions on a symbolic link. No arguments other than a possible + * exception are given to the completion callback. + * + * This method is only implemented on macOS. + * + * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail. + * @deprecated Since v0.4.7 + */ + export function lchmod(path: PathLike, mode: Mode, callback: NoParamCallback): void; + /** @deprecated */ + export namespace lchmod { + /** + * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function __promisify__(path: PathLike, mode: Mode): Promise; + } + /** + * Changes the permissions on a symbolic link. Returns `undefined`. + * + * This method is only implemented on macOS. + * + * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail. + * @deprecated Since v0.4.7 + */ + export function lchmodSync(path: PathLike, mode: Mode): void; + /** + * Asynchronous [`stat(2)`](http://man7.org/linux/man-pages/man2/stat.2.html). The callback gets two arguments `(err, stats)` where`stats` is an `fs.Stats` object. + * + * In case of an error, the `err.code` will be one of `Common System Errors`. + * + * Using `fs.stat()` to check for the existence of a file before calling`fs.open()`, `fs.readFile()` or `fs.writeFile()` is not recommended. + * Instead, user code should open/read/write the file directly and handle the + * error raised if the file is not available. + * + * To check if a file exists without manipulating it afterwards, {@link access} is recommended. + * + * For example, given the following directory structure: + * + * ```text + * - txtDir + * -- file.txt + * - app.js + * ``` + * + * The next program will check for the stats of the given paths: + * + * ```js + * import { stat } from 'fs'; + * + * const pathsToCheck = ['./txtDir', './txtDir/file.txt']; + * + * for (let i = 0; i < pathsToCheck.length; i++) { + * stat(pathsToCheck[i], (err, stats) => { + * console.log(stats.isDirectory()); + * console.log(stats); + * }); + * } + * ``` + * + * The resulting output will resemble: + * + * ```console + * true + * Stats { + * dev: 16777220, + * mode: 16877, + * nlink: 3, + * uid: 501, + * gid: 20, + * rdev: 0, + * blksize: 4096, + * ino: 14214262, + * size: 96, + * blocks: 0, + * atimeMs: 1561174653071.963, + * mtimeMs: 1561174614583.3518, + * ctimeMs: 1561174626623.5366, + * birthtimeMs: 1561174126937.2893, + * atime: 2019-06-22T03:37:33.072Z, + * mtime: 2019-06-22T03:36:54.583Z, + * ctime: 2019-06-22T03:37:06.624Z, + * birthtime: 2019-06-22T03:28:46.937Z + * } + * false + * Stats { + * dev: 16777220, + * mode: 33188, + * nlink: 1, + * uid: 501, + * gid: 20, + * rdev: 0, + * blksize: 4096, + * ino: 14214074, + * size: 8, + * blocks: 8, + * atimeMs: 1561174616618.8555, + * mtimeMs: 1561174614584, + * ctimeMs: 1561174614583.8145, + * birthtimeMs: 1561174007710.7478, + * atime: 2019-06-22T03:36:56.619Z, + * mtime: 2019-06-22T03:36:54.584Z, + * ctime: 2019-06-22T03:36:54.584Z, + * birthtime: 2019-06-22T03:26:47.711Z + * } + * ``` + * @since v0.0.2 + */ + export function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + export function stat( + path: PathLike, + options: + | (StatOptions & { + bigint?: false | undefined; + }) + | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void + ): void; + export function stat( + path: PathLike, + options: StatOptions & { + bigint: true; + }, + callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void + ): void; + export function stat(path: PathLike, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void; + export namespace stat { + /** + * Asynchronous stat(2) - Get file status. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__( + path: PathLike, + options?: StatOptions & { + bigint?: false | undefined; + } + ): Promise; + function __promisify__( + path: PathLike, + options: StatOptions & { + bigint: true; + } + ): Promise; + function __promisify__(path: PathLike, options?: StatOptions): Promise; + } + export interface StatSyncFn extends Function { + (path: PathLike, options?: undefined): Stats; + ( + path: PathLike, + options?: StatSyncOptions & { + bigint?: false | undefined; + throwIfNoEntry: false; + } + ): Stats | undefined; + ( + path: PathLike, + options: StatSyncOptions & { + bigint: true; + throwIfNoEntry: false; + } + ): BigIntStats | undefined; + ( + path: PathLike, + options?: StatSyncOptions & { + bigint?: false | undefined; + } + ): Stats; + ( + path: PathLike, + options: StatSyncOptions & { + bigint: true; + } + ): BigIntStats; + ( + path: PathLike, + options: StatSyncOptions & { + bigint: boolean; + throwIfNoEntry?: false | undefined; + } + ): Stats | BigIntStats; + (path: PathLike, options?: StatSyncOptions): Stats | BigIntStats | undefined; + } + /** + * Synchronous stat(2) - Get file status. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export const statSync: StatSyncFn; + /** + * Invokes the callback with the `fs.Stats` for the file descriptor. + * + * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail. + * @since v0.1.95 + */ + export function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + export function fstat( + fd: number, + options: + | (StatOptions & { + bigint?: false | undefined; + }) + | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void + ): void; + export function fstat( + fd: number, + options: StatOptions & { + bigint: true; + }, + callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void + ): void; + export function fstat(fd: number, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void; + export namespace fstat { + /** + * Asynchronous fstat(2) - Get file status. + * @param fd A file descriptor. + */ + function __promisify__( + fd: number, + options?: StatOptions & { + bigint?: false | undefined; + } + ): Promise; + function __promisify__( + fd: number, + options: StatOptions & { + bigint: true; + } + ): Promise; + function __promisify__(fd: number, options?: StatOptions): Promise; + } + /** + * Synchronous fstat(2) - Get file status. + * @param fd A file descriptor. + */ + export function fstatSync( + fd: number, + options?: StatOptions & { + bigint?: false | undefined; + } + ): Stats; + export function fstatSync( + fd: number, + options: StatOptions & { + bigint: true; + } + ): BigIntStats; + export function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats; + + /** + * Retrieves the `fs.Stats` for the symbolic link referred to by the path. + * The callback gets two arguments `(err, stats)` where `stats` is a `fs.Stats` object. `lstat()` is identical to `stat()`, except that if `path` is a symbolic + * link, then the link itself is stat-ed, not the file that it refers to. + * + * See the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) documentation for more details. + * @since v0.1.30 + */ + export function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + export function lstat( + path: PathLike, + options: + | (StatOptions & { + bigint?: false | undefined; + }) + | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void + ): void; + export function lstat( + path: PathLike, + options: StatOptions & { + bigint: true; + }, + callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void + ): void; + export function lstat(path: PathLike, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void; + export namespace lstat { + /** + * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__( + path: PathLike, + options?: StatOptions & { + bigint?: false | undefined; + } + ): Promise; + function __promisify__( + path: PathLike, + options: StatOptions & { + bigint: true; + } + ): Promise; + function __promisify__(path: PathLike, options?: StatOptions): Promise; + } + /** + * Synchronous lstat(2) - Get file status. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export const lstatSync: StatSyncFn; + /** + * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. No arguments other than + * a possible + * exception are given to the completion callback. + * @since v0.1.31 + */ + export function link(existingPath: PathLike, newPath: PathLike, callback: NoParamCallback): void; + export namespace link { + /** + * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file. + * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(existingPath: PathLike, newPath: PathLike): Promise; + } + /** + * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. Returns `undefined`. + * @since v0.1.31 + */ + export function linkSync(existingPath: PathLike, newPath: PathLike): void; + /** + * Creates the link called `path` pointing to `target`. No arguments other than a + * possible exception are given to the completion callback. + * + * See the POSIX [`symlink(2)`](http://man7.org/linux/man-pages/man2/symlink.2.html) documentation for more details. + * + * The `type` argument is only available on Windows and ignored on other platforms. + * It can be set to `'dir'`, `'file'`, or `'junction'`. If the `type` argument is + * not set, Node.js will autodetect `target` type and use `'file'` or `'dir'`. If + * the `target` does not exist, `'file'` will be used. Windows junction points + * require the destination path to be absolute. When using `'junction'`, the`target` argument will automatically be normalized to absolute path. + * + * Relative targets are relative to the link’s parent directory. + * + * ```js + * import { symlink } from 'fs'; + * + * symlink('./mew', './example/mewtwo', callback); + * ``` + * + * The above example creates a symbolic link `mewtwo` in the `example` which points + * to `mew` in the same directory: + * + * ```bash + * $ tree example/ + * example/ + * ├── mew + * └── mewtwo -> ./mew + * ``` + * @since v0.1.31 + */ + export function symlink(target: PathLike, path: PathLike, type: symlink.Type | undefined | null, callback: NoParamCallback): void; + /** + * Asynchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + */ + export function symlink(target: PathLike, path: PathLike, callback: NoParamCallback): void; + export namespace symlink { + /** + * Asynchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). + * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. + */ + function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise; + type Type = 'dir' | 'file' | 'junction'; + } + /** + * Returns `undefined`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link symlink}. + * @since v0.1.31 + */ + export function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void; + /** + * Reads the contents of the symbolic link referred to by `path`. The callback gets + * two arguments `(err, linkString)`. + * + * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the link path passed to the callback. If the `encoding` is set to `'buffer'`, + * the link path returned will be passed as a `Buffer` object. + * @since v0.1.31 + */ + export function readlink(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, linkString: string) => void): void; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readlink(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, linkString: Buffer) => void): void; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readlink(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, linkString: string | Buffer) => void): void; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function readlink(path: PathLike, callback: (err: NodeJS.ErrnoException | null, linkString: string) => void): void; + export namespace readlink { + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: EncodingOption): Promise; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options: BufferEncodingOption): Promise; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: EncodingOption): Promise; + } + /** + * Returns the symbolic link's string value. + * + * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the link path returned. If the `encoding` is set to `'buffer'`, + * the link path returned will be passed as a `Buffer` object. + * @since v0.1.31 + */ + export function readlinkSync(path: PathLike, options?: EncodingOption): string; + /** + * Synchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readlinkSync(path: PathLike, options: BufferEncodingOption): Buffer; + /** + * Synchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readlinkSync(path: PathLike, options?: EncodingOption): string | Buffer; + /** + * Asynchronously computes the canonical pathname by resolving `.`, `..` and + * symbolic links. + * + * A canonical pathname is not necessarily unique. Hard links and bind mounts can + * expose a file system entity through many pathnames. + * + * This function behaves like [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html), with some exceptions: + * + * 1. No case conversion is performed on case-insensitive file systems. + * 2. The maximum number of symbolic links is platform-independent and generally + * (much) higher than what the native [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html) implementation supports. + * + * The `callback` gets two arguments `(err, resolvedPath)`. May use `process.cwd`to resolve relative paths. + * + * Only paths that can be converted to UTF8 strings are supported. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the path passed to the callback. If the `encoding` is set to `'buffer'`, + * the path returned will be passed as a `Buffer` object. + * + * If `path` resolves to a socket or a pipe, the function will return a system + * dependent name for that object. + * @since v0.1.31 + */ + export function realpath(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function realpath(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function realpath(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function realpath(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void; + export namespace realpath { + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: EncodingOption): Promise; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options: BufferEncodingOption): Promise; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: EncodingOption): Promise; + /** + * Asynchronous [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html). + * + * The `callback` gets two arguments `(err, resolvedPath)`. + * + * Only paths that can be converted to UTF8 strings are supported. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the path passed to the callback. If the `encoding` is set to `'buffer'`, + * the path returned will be passed as a `Buffer` object. + * + * On Linux, when Node.js is linked against musl libc, the procfs file system must + * be mounted on `/proc` in order for this function to work. Glibc does not have + * this restriction. + * @since v9.2.0 + */ + function native(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void; + function native(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void; + function native(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void; + function native(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void; + } + /** + * Returns the resolved pathname. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link realpath}. + * @since v0.1.31 + */ + export function realpathSync(path: PathLike, options?: EncodingOption): string; + /** + * Synchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function realpathSync(path: PathLike, options: BufferEncodingOption): Buffer; + /** + * Synchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function realpathSync(path: PathLike, options?: EncodingOption): string | Buffer; + export namespace realpathSync { + function native(path: PathLike, options?: EncodingOption): string; + function native(path: PathLike, options: BufferEncodingOption): Buffer; + function native(path: PathLike, options?: EncodingOption): string | Buffer; + } + /** + * Asynchronously removes a file or symbolic link. No arguments other than a + * possible exception are given to the completion callback. + * + * ```js + * import { unlink } from 'fs'; + * // Assuming that 'path/file.txt' is a regular file. + * unlink('path/file.txt', (err) => { + * if (err) throw err; + * console.log('path/file.txt was deleted'); + * }); + * ``` + * + * `fs.unlink()` will not work on a directory, empty or otherwise. To remove a + * directory, use {@link rmdir}. + * + * See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more details. + * @since v0.0.2 + */ + export function unlink(path: PathLike, callback: NoParamCallback): void; + export namespace unlink { + /** + * Asynchronous unlink(2) - delete a name and possibly the file it refers to. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike): Promise; + } + /** + * Synchronous [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html). Returns `undefined`. + * @since v0.1.21 + */ + export function unlinkSync(path: PathLike): void; + export interface RmDirOptions { + /** + * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or + * `EPERM` error is encountered, Node.js will retry the operation with a linear + * backoff wait of `retryDelay` ms longer on each try. This option represents the + * number of retries. This option is ignored if the `recursive` option is not + * `true`. + * @default 0 + */ + maxRetries?: number | undefined; + /** + * @deprecated since v14.14.0 In future versions of Node.js and will trigger a warning + * `fs.rmdir(path, { recursive: true })` will throw if `path` does not exist or is a file. + * Use `fs.rm(path, { recursive: true, force: true })` instead. + * + * If `true`, perform a recursive directory removal. In + * recursive mode soperations are retried on failure. + * @default false + */ + recursive?: boolean | undefined; + /** + * The amount of time in milliseconds to wait between retries. + * This option is ignored if the `recursive` option is not `true`. + * @default 100 + */ + retryDelay?: number | undefined; + } + /** + * Asynchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). No arguments other than a possible exception are given + * to the completion callback. + * + * Using `fs.rmdir()` on a file (not a directory) results in an `ENOENT` error on + * Windows and an `ENOTDIR` error on POSIX. + * + * To get a behavior similar to the `rm -rf` Unix command, use {@link rm} with options `{ recursive: true, force: true }`. + * @since v0.0.2 + */ + export function rmdir(path: PathLike, callback: NoParamCallback): void; + export function rmdir(path: PathLike, options: RmDirOptions, callback: NoParamCallback): void; + export namespace rmdir { + /** + * Asynchronous rmdir(2) - delete a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike, options?: RmDirOptions): Promise; + } + /** + * Synchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). Returns `undefined`. + * + * Using `fs.rmdirSync()` on a file (not a directory) results in an `ENOENT` error + * on Windows and an `ENOTDIR` error on POSIX. + * + * To get a behavior similar to the `rm -rf` Unix command, use {@link rmSync} with options `{ recursive: true, force: true }`. + * @since v0.1.21 + */ + export function rmdirSync(path: PathLike, options?: RmDirOptions): void; + export interface RmOptions { + /** + * When `true`, exceptions will be ignored if `path` does not exist. + * @default false + */ + force?: boolean | undefined; + /** + * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or + * `EPERM` error is encountered, Node.js will retry the operation with a linear + * backoff wait of `retryDelay` ms longer on each try. This option represents the + * number of retries. This option is ignored if the `recursive` option is not + * `true`. + * @default 0 + */ + maxRetries?: number | undefined; + /** + * If `true`, perform a recursive directory removal. In + * recursive mode, operations are retried on failure. + * @default false + */ + recursive?: boolean | undefined; + /** + * The amount of time in milliseconds to wait between retries. + * This option is ignored if the `recursive` option is not `true`. + * @default 100 + */ + retryDelay?: number | undefined; + } + /** + * Asynchronously removes files and directories (modeled on the standard POSIX `rm`utility). No arguments other than a possible exception are given to the + * completion callback. + * @since v14.14.0 + */ + export function rm(path: PathLike, callback: NoParamCallback): void; + export function rm(path: PathLike, options: RmOptions, callback: NoParamCallback): void; + export namespace rm { + /** + * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility). + */ + function __promisify__(path: PathLike, options?: RmOptions): Promise; + } + /** + * Synchronously removes files and directories (modeled on the standard POSIX `rm`utility). Returns `undefined`. + * @since v14.14.0 + */ + export function rmSync(path: PathLike, options?: RmOptions): void; + export interface MakeDirectoryOptions { + /** + * Indicates whether parent folders should be created. + * If a folder was created, the path to the first created folder will be returned. + * @default false + */ + recursive?: boolean | undefined; + /** + * A file mode. If a string is passed, it is parsed as an octal integer. If not specified + * @default 0o777 + */ + mode?: Mode | undefined; + } + /** + * Asynchronously creates a directory. + * + * The callback is given a possible exception and, if `recursive` is `true`, the + * first directory path created, `(err[, path])`.`path` can still be `undefined` when `recursive` is `true`, if no directory was + * created. + * + * The optional `options` argument can be an integer specifying `mode` (permission + * and sticky bits), or an object with a `mode` property and a `recursive`property indicating whether parent directories should be created. Calling`fs.mkdir()` when `path` is a directory that + * exists results in an error only + * when `recursive` is false. + * + * ```js + * import { mkdir } from 'fs'; + * + * // Creates /tmp/a/apple, regardless of whether `/tmp` and /tmp/a exist. + * mkdir('/tmp/a/apple', { recursive: true }, (err) => { + * if (err) throw err; + * }); + * ``` + * + * On Windows, using `fs.mkdir()` on the root directory even with recursion will + * result in an error: + * + * ```js + * import { mkdir } from 'fs'; + * + * mkdir('/', { recursive: true }, (err) => { + * // => [Error: EPERM: operation not permitted, mkdir 'C:\'] + * }); + * ``` + * + * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details. + * @since v0.1.8 + */ + export function mkdir( + path: PathLike, + options: MakeDirectoryOptions & { + recursive: true; + }, + callback: (err: NodeJS.ErrnoException | null, path?: string) => void + ): void; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + export function mkdir( + path: PathLike, + options: + | Mode + | (MakeDirectoryOptions & { + recursive?: false | undefined; + }) + | null + | undefined, + callback: NoParamCallback + ): void; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + export function mkdir(path: PathLike, options: Mode | MakeDirectoryOptions | null | undefined, callback: (err: NodeJS.ErrnoException | null, path?: string) => void): void; + /** + * Asynchronous mkdir(2) - create a directory with a mode of `0o777`. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function mkdir(path: PathLike, callback: NoParamCallback): void; + export namespace mkdir { + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function __promisify__( + path: PathLike, + options: MakeDirectoryOptions & { + recursive: true; + } + ): Promise; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function __promisify__( + path: PathLike, + options?: + | Mode + | (MakeDirectoryOptions & { + recursive?: false | undefined; + }) + | null + ): Promise; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function __promisify__(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise; + } + /** + * Synchronously creates a directory. Returns `undefined`, or if `recursive` is`true`, the first directory path created. + * This is the synchronous version of {@link mkdir}. + * + * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details. + * @since v0.1.21 + */ + export function mkdirSync( + path: PathLike, + options: MakeDirectoryOptions & { + recursive: true; + } + ): string | undefined; + /** + * Synchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + export function mkdirSync( + path: PathLike, + options?: + | Mode + | (MakeDirectoryOptions & { + recursive?: false | undefined; + }) + | null + ): void; + /** + * Synchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + export function mkdirSync(path: PathLike, options?: Mode | MakeDirectoryOptions | null): string | undefined; + /** + * Creates a unique temporary directory. + * + * Generates six random characters to be appended behind a required`prefix` to create a unique temporary directory. Due to platform + * inconsistencies, avoid trailing `X` characters in `prefix`. Some platforms, + * notably the BSDs, can return more than six random characters, and replace + * trailing `X` characters in `prefix` with random characters. + * + * The created directory path is passed as a string to the callback's second + * parameter. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use. + * + * ```js + * import { mkdtemp } from 'fs'; + * + * mkdtemp(path.join(os.tmpdir(), 'foo-'), (err, directory) => { + * if (err) throw err; + * console.log(directory); + * // Prints: /tmp/foo-itXde2 or C:\Users\...\AppData\Local\Temp\foo-itXde2 + * }); + * ``` + * + * The `fs.mkdtemp()` method will append the six randomly selected characters + * directly to the `prefix` string. For instance, given a directory `/tmp`, if the + * intention is to create a temporary directory _within_`/tmp`, the `prefix`must end with a trailing platform-specific path separator + * (`require('path').sep`). + * + * ```js + * import { tmpdir } from 'os'; + * import { mkdtemp } from 'fs'; + * + * // The parent directory for the new temporary directory + * const tmpDir = tmpdir(); + * + * // This method is *INCORRECT*: + * mkdtemp(tmpDir, (err, directory) => { + * if (err) throw err; + * console.log(directory); + * // Will print something similar to `/tmpabc123`. + * // A new temporary directory is created at the file system root + * // rather than *within* the /tmp directory. + * }); + * + * // This method is *CORRECT*: + * import { sep } from 'path'; + * mkdtemp(`${tmpDir}${sep}`, (err, directory) => { + * if (err) throw err; + * console.log(directory); + * // Will print something similar to `/tmp/abc123`. + * // A new temporary directory is created within + * // the /tmp directory. + * }); + * ``` + * @since v5.10.0 + */ + export function mkdtemp(prefix: string, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function mkdtemp( + prefix: string, + options: + | 'buffer' + | { + encoding: 'buffer'; + }, + callback: (err: NodeJS.ErrnoException | null, folder: Buffer) => void + ): void; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function mkdtemp(prefix: string, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, folder: string | Buffer) => void): void; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + */ + export function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void; + export namespace mkdtemp { + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(prefix: string, options?: EncodingOption): Promise; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(prefix: string, options: BufferEncodingOption): Promise; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(prefix: string, options?: EncodingOption): Promise; + } + /** + * Returns the created directory path. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link mkdtemp}. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use. + * @since v5.10.0 + */ + export function mkdtempSync(prefix: string, options?: EncodingOption): string; + /** + * Synchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function mkdtempSync(prefix: string, options: BufferEncodingOption): Buffer; + /** + * Synchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function mkdtempSync(prefix: string, options?: EncodingOption): string | Buffer; + /** + * Reads the contents of a directory. The callback gets two arguments `(err, files)`where `files` is an array of the names of the files in the directory excluding`'.'` and `'..'`. + * + * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the filenames passed to the callback. If the `encoding` is set to `'buffer'`, + * the filenames returned will be passed as `Buffer` objects. + * + * If `options.withFileTypes` is set to `true`, the `files` array will contain `fs.Dirent` objects. + * @since v0.1.8 + */ + export function readdir( + path: PathLike, + options: + | { + encoding: BufferEncoding | null; + withFileTypes?: false | undefined; + } + | BufferEncoding + | undefined + | null, + callback: (err: NodeJS.ErrnoException | null, files: string[]) => void + ): void; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readdir( + path: PathLike, + options: + | { + encoding: 'buffer'; + withFileTypes?: false | undefined; + } + | 'buffer', + callback: (err: NodeJS.ErrnoException | null, files: Buffer[]) => void + ): void; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readdir( + path: PathLike, + options: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + }) + | BufferEncoding + | undefined + | null, + callback: (err: NodeJS.ErrnoException | null, files: string[] | Buffer[]) => void + ): void; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function readdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null, files: string[]) => void): void; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. + */ + export function readdir( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + }, + callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void + ): void; + export namespace readdir { + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__( + path: PathLike, + options?: + | { + encoding: BufferEncoding | null; + withFileTypes?: false | undefined; + } + | BufferEncoding + | null + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__( + path: PathLike, + options: + | 'buffer' + | { + encoding: 'buffer'; + withFileTypes?: false | undefined; + } + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__( + path: PathLike, + options?: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + }) + | BufferEncoding + | null + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent + */ + function __promisify__( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + } + ): Promise; + } + /** + * Reads the contents of the directory. + * + * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the filenames returned. If the `encoding` is set to `'buffer'`, + * the filenames returned will be passed as `Buffer` objects. + * + * If `options.withFileTypes` is set to `true`, the result will contain `fs.Dirent` objects. + * @since v0.1.21 + */ + export function readdirSync( + path: PathLike, + options?: + | { + encoding: BufferEncoding | null; + withFileTypes?: false | undefined; + } + | BufferEncoding + | null + ): string[]; + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readdirSync( + path: PathLike, + options: + | { + encoding: 'buffer'; + withFileTypes?: false | undefined; + } + | 'buffer' + ): Buffer[]; + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readdirSync( + path: PathLike, + options?: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + }) + | BufferEncoding + | null + ): string[] | Buffer[]; + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. + */ + export function readdirSync( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + } + ): Dirent[]; + /** + * Closes the file descriptor. No arguments other than a possible exception are + * given to the completion callback. + * + * Calling `fs.close()` on any file descriptor (`fd`) that is currently in use + * through any other `fs` operation may lead to undefined behavior. + * + * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail. + * @since v0.0.2 + */ + export function close(fd: number, callback?: NoParamCallback): void; + export namespace close { + /** + * Asynchronous close(2) - close a file descriptor. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + /** + * Closes the file descriptor. Returns `undefined`. + * + * Calling `fs.closeSync()` on any file descriptor (`fd`) that is currently in use + * through any other `fs` operation may lead to undefined behavior. + * + * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail. + * @since v0.1.21 + */ + export function closeSync(fd: number): void; + /** + * Asynchronous file open. See the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more details. + * + * `mode` sets the file mode (permission and sticky bits), but only if the file was + * created. On Windows, only the write permission can be manipulated; see {@link chmod}. + * + * The callback gets two arguments `(err, fd)`. + * + * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented + * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains + * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams). + * + * Functions based on `fs.open()` exhibit this behavior as well:`fs.writeFile()`, `fs.readFile()`, etc. + * @since v0.0.2 + * @param [flags='r'] See `support of file system `flags``. + * @param [mode=0o666] + */ + export function open(path: PathLike, flags: OpenMode, mode: Mode | undefined | null, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void; + /** + * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function open(path: PathLike, flags: OpenMode, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void; + export namespace open { + /** + * Asynchronous open(2) - open and possibly create a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`. + */ + function __promisify__(path: PathLike, flags: OpenMode, mode?: Mode | null): Promise; + } + /** + * Returns an integer representing the file descriptor. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link open}. + * @since v0.1.21 + * @param [flags='r'] + * @param [mode=0o666] + */ + export function openSync(path: PathLike, flags: OpenMode, mode?: Mode | null): number; + /** + * Change the file system timestamps of the object referenced by `path`. + * + * The `atime` and `mtime` arguments follow these rules: + * + * * Values can be either numbers representing Unix epoch time in seconds,`Date`s, or a numeric string like `'123456789.0'`. + * * If the value can not be converted to a number, or is `NaN`, `Infinity` or`-Infinity`, an `Error` will be thrown. + * @since v0.4.2 + */ + export function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; + export namespace utimes { + /** + * Asynchronously change file timestamps of the file referenced by the supplied path. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; + } + /** + * Returns `undefined`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link utimes}. + * @since v0.4.2 + */ + export function utimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void; + /** + * Change the file system timestamps of the object referenced by the supplied file + * descriptor. See {@link utimes}. + * @since v0.4.2 + */ + export function futimes(fd: number, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; + export namespace futimes { + /** + * Asynchronously change file timestamps of the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function __promisify__(fd: number, atime: TimeLike, mtime: TimeLike): Promise; + } + /** + * Synchronous version of {@link futimes}. Returns `undefined`. + * @since v0.4.2 + */ + export function futimesSync(fd: number, atime: TimeLike, mtime: TimeLike): void; + /** + * Request that all data for the open file descriptor is flushed to the storage + * device. The specific implementation is operating system and device specific. + * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. No arguments other + * than a possible exception are given to the completion callback. + * @since v0.1.96 + */ + export function fsync(fd: number, callback: NoParamCallback): void; + export namespace fsync { + /** + * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + /** + * Request that all data for the open file descriptor is flushed to the storage + * device. The specific implementation is operating system and device specific. + * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. Returns `undefined`. + * @since v0.1.96 + */ + export function fsyncSync(fd: number): void; + /** + * Write `buffer` to the file specified by `fd`. If `buffer` is a normal object, it + * must have an own `toString` function property. + * + * `offset` determines the part of the buffer to be written, and `length` is + * an integer specifying the number of bytes to write. + * + * `position` refers to the offset from the beginning of the file where this data + * should be written. If `typeof position !== 'number'`, the data will be written + * at the current position. See [`pwrite(2)`](http://man7.org/linux/man-pages/man2/pwrite.2.html). + * + * The callback will be given three arguments `(err, bytesWritten, buffer)` where`bytesWritten` specifies how many _bytes_ were written from `buffer`. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a promise for an `Object` with `bytesWritten` and `buffer` properties. + * + * It is unsafe to use `fs.write()` multiple times on the same file without waiting + * for the callback. For this scenario, {@link createWriteStream} is + * recommended. + * + * On Linux, positional writes don't work when the file is opened in append mode. + * The kernel ignores the position argument and always appends the data to + * the end of the file. + * @since v0.0.2 + */ + export function write( + fd: number, + buffer: TBuffer, + offset: number | undefined | null, + length: number | undefined | null, + position: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void + ): void; + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + */ + export function write( + fd: number, + buffer: TBuffer, + offset: number | undefined | null, + length: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void + ): void; + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + */ + export function write( + fd: number, + buffer: TBuffer, + offset: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void + ): void; + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + */ + export function write(fd: number, buffer: TBuffer, callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void): void; + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + export function write( + fd: number, + string: string, + position: number | undefined | null, + encoding: BufferEncoding | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void + ): void; + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + export function write(fd: number, string: string, position: number | undefined | null, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void; + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. + */ + export function write(fd: number, string: string, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void; + export namespace write { + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function __promisify__( + fd: number, + buffer?: TBuffer, + offset?: number, + length?: number, + position?: number | null + ): Promise<{ + bytesWritten: number; + buffer: TBuffer; + }>; + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + function __promisify__( + fd: number, + string: string, + position?: number | null, + encoding?: BufferEncoding | null + ): Promise<{ + bytesWritten: number; + buffer: string; + }>; + } + /** + * If `buffer` is a plain object, it must have an own (not inherited) `toString`function property. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link write}. + * @since v0.1.21 + * @return The number of bytes written. + */ + export function writeSync(fd: number, buffer: NodeJS.ArrayBufferView, offset?: number | null, length?: number | null, position?: number | null): number; + /** + * Synchronously writes `string` to the file referenced by the supplied file descriptor, returning the number of bytes written. + * @param fd A file descriptor. + * @param string A string to write. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + export function writeSync(fd: number, string: string, position?: number | null, encoding?: BufferEncoding | null): number; + export type ReadPosition = number | bigint; + /** + * Read data from the file specified by `fd`. + * + * The callback is given the three arguments, `(err, bytesRead, buffer)`. + * + * If the file is not modified concurrently, the end-of-file is reached when the + * number of bytes read is zero. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a promise for an `Object` with `bytesRead` and `buffer` properties. + * @since v0.0.2 + * @param buffer The buffer that the data will be written to. + * @param offset The position in `buffer` to write the data to. + * @param length The number of bytes to read. + * @param position Specifies where to begin reading from in the file. If `position` is `null` or `-1 `, data will be read from the current file position, and the file position will be updated. If + * `position` is an integer, the file position will be unchanged. + */ + export function read( + fd: number, + buffer: TBuffer, + offset: number, + length: number, + position: ReadPosition | null, + callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void + ): void; + export namespace read { + /** + * @param fd A file descriptor. + * @param buffer The buffer that the data will be written to. + * @param offset The offset in the buffer at which to start writing. + * @param length The number of bytes to read. + * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. + */ + function __promisify__( + fd: number, + buffer: TBuffer, + offset: number, + length: number, + position: number | null + ): Promise<{ + bytesRead: number; + buffer: TBuffer; + }>; + } + export interface ReadSyncOptions { + /** + * @default 0 + */ + offset?: number | undefined; + /** + * @default `length of buffer` + */ + length?: number | undefined; + /** + * @default null + */ + position?: ReadPosition | null | undefined; + } + /** + * Returns the number of `bytesRead`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link read}. + * @since v0.1.21 + */ + export function readSync(fd: number, buffer: NodeJS.ArrayBufferView, offset: number, length: number, position: ReadPosition | null): number; + /** + * Similar to the above `fs.readSync` function, this version takes an optional `options` object. + * If no `options` object is specified, it will default with the above values. + */ + export function readSync(fd: number, buffer: NodeJS.ArrayBufferView, opts?: ReadSyncOptions): number; + /** + * Asynchronously reads the entire contents of a file. + * + * ```js + * import { readFile } from 'fs'; + * + * readFile('/etc/passwd', (err, data) => { + * if (err) throw err; + * console.log(data); + * }); + * ``` + * + * The callback is passed two arguments `(err, data)`, where `data` is the + * contents of the file. + * + * If no encoding is specified, then the raw buffer is returned. + * + * If `options` is a string, then it specifies the encoding: + * + * ```js + * import { readFile } from 'fs'; + * + * readFile('/etc/passwd', 'utf8', callback); + * ``` + * + * When the path is a directory, the behavior of `fs.readFile()` and {@link readFileSync} is platform-specific. On macOS, Linux, and Windows, an + * error will be returned. On FreeBSD, a representation of the directory's contents + * will be returned. + * + * ```js + * import { readFile } from 'fs'; + * + * // macOS, Linux, and Windows + * readFile('', (err, data) => { + * // => [Error: EISDIR: illegal operation on a directory, read ] + * }); + * + * // FreeBSD + * readFile('', (err, data) => { + * // => null, + * }); + * ``` + * + * It is possible to abort an ongoing request using an `AbortSignal`. If a + * request is aborted the callback is called with an `AbortError`: + * + * ```js + * import { readFile } from 'fs'; + * + * const controller = new AbortController(); + * const signal = controller.signal; + * readFile(fileInfo[0].name, { signal }, (err, buf) => { + * // ... + * }); + * // When you want to abort the request + * controller.abort(); + * ``` + * + * The `fs.readFile()` function buffers the entire file. To minimize memory costs, + * when possible prefer streaming via `fs.createReadStream()`. + * + * Aborting an ongoing request does not abort individual operating + * system requests but rather the internal buffering `fs.readFile` performs. + * @since v0.1.29 + * @param path filename or file descriptor + */ + export function readFile( + path: PathOrFileDescriptor, + options: + | ({ + encoding?: null | undefined; + flag?: string | undefined; + } & Abortable) + | undefined + | null, + callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void + ): void; + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + export function readFile( + path: PathOrFileDescriptor, + options: + | ({ + encoding: BufferEncoding; + flag?: string | undefined; + } & Abortable) + | BufferEncoding, + callback: (err: NodeJS.ErrnoException | null, data: string) => void + ): void; + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + export function readFile( + path: PathOrFileDescriptor, + options: + | (ObjectEncodingOptions & { + flag?: string | undefined; + } & Abortable) + | BufferEncoding + | undefined + | null, + callback: (err: NodeJS.ErrnoException | null, data: string | Buffer) => void + ): void; + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + */ + export function readFile(path: PathOrFileDescriptor, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void; + export namespace readFile { + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function __promisify__( + path: PathOrFileDescriptor, + options?: { + encoding?: null | undefined; + flag?: string | undefined; + } | null + ): Promise; + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function __promisify__( + path: PathOrFileDescriptor, + options: + | { + encoding: BufferEncoding; + flag?: string | undefined; + } + | BufferEncoding + ): Promise; + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function __promisify__( + path: PathOrFileDescriptor, + options?: + | (ObjectEncodingOptions & { + flag?: string | undefined; + }) + | BufferEncoding + | null + ): Promise; + } + /** + * Returns the contents of the `path`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link readFile}. + * + * If the `encoding` option is specified then this function returns a + * string. Otherwise it returns a buffer. + * + * Similar to {@link readFile}, when the path is a directory, the behavior of`fs.readFileSync()` is platform-specific. + * + * ```js + * import { readFileSync } from 'fs'; + * + * // macOS, Linux, and Windows + * readFileSync(''); + * // => [Error: EISDIR: illegal operation on a directory, read ] + * + * // FreeBSD + * readFileSync(''); // => + * ``` + * @since v0.1.8 + * @param path filename or file descriptor + */ + export function readFileSync( + path: PathOrFileDescriptor, + options?: { + encoding?: null | undefined; + flag?: string | undefined; + } | null + ): Buffer; + /** + * Synchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + export function readFileSync( + path: PathOrFileDescriptor, + options: + | { + encoding: BufferEncoding; + flag?: string | undefined; + } + | BufferEncoding + ): string; + /** + * Synchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + export function readFileSync( + path: PathOrFileDescriptor, + options?: + | (ObjectEncodingOptions & { + flag?: string | undefined; + }) + | BufferEncoding + | null + ): string | Buffer; + export type WriteFileOptions = + | (ObjectEncodingOptions & + Abortable & { + mode?: Mode | undefined; + flag?: string | undefined; + }) + | BufferEncoding + | null; + /** + * When `file` is a filename, asynchronously writes data to the file, replacing the + * file if it already exists. `data` can be a string or a buffer. + * + * When `file` is a file descriptor, the behavior is similar to calling`fs.write()` directly (which is recommended). See the notes below on using + * a file descriptor. + * + * The `encoding` option is ignored if `data` is a buffer. + * + * The `mode` option only affects the newly created file. See {@link open} for more details. + * + * If `data` is a plain object, it must have an own (not inherited) `toString`function property. + * + * ```js + * import { writeFile } from 'fs'; + * import { Buffer } from 'buffer'; + * + * const data = new Uint8Array(Buffer.from('Hello Node.js')); + * writeFile('message.txt', data, (err) => { + * if (err) throw err; + * console.log('The file has been saved!'); + * }); + * ``` + * + * If `options` is a string, then it specifies the encoding: + * + * ```js + * import { writeFile } from 'fs'; + * + * writeFile('message.txt', 'Hello Node.js', 'utf8', callback); + * ``` + * + * It is unsafe to use `fs.writeFile()` multiple times on the same file without + * waiting for the callback. For this scenario, {@link createWriteStream} is + * recommended. + * + * Similarly to `fs.readFile` \- `fs.writeFile` is a convenience method that + * performs multiple `write` calls internally to write the buffer passed to it. + * For performance sensitive code consider using {@link createWriteStream}. + * + * It is possible to use an `AbortSignal` to cancel an `fs.writeFile()`. + * Cancelation is "best effort", and some amount of data is likely still + * to be written. + * + * ```js + * import { writeFile } from 'fs'; + * import { Buffer } from 'buffer'; + * + * const controller = new AbortController(); + * const { signal } = controller; + * const data = new Uint8Array(Buffer.from('Hello Node.js')); + * writeFile('message.txt', data, { signal }, (err) => { + * // When a request is aborted - the callback is called with an AbortError + * }); + * // When the request should be aborted + * controller.abort(); + * ``` + * + * Aborting an ongoing request does not abort individual operating + * system requests but rather the internal buffering `fs.writeFile` performs. + * @since v0.1.29 + * @param file filename or file descriptor + */ + export function writeFile(file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options: WriteFileOptions, callback: NoParamCallback): void; + /** + * Asynchronously writes data to a file, replacing the file if it already exists. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + */ + export function writeFile(path: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, callback: NoParamCallback): void; + export namespace writeFile { + /** + * Asynchronously writes data to a file, replacing the file if it already exists. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'w'` is used. + */ + function __promisify__(path: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): Promise; + } + /** + * Returns `undefined`. + * + * If `data` is a plain object, it must have an own (not inherited) `toString`function property. + * + * The `mode` option only affects the newly created file. See {@link open} for more details. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link writeFile}. + * @since v0.1.29 + * @param file filename or file descriptor + */ + export function writeFileSync(file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): void; + /** + * Asynchronously append data to a file, creating the file if it does not yet + * exist. `data` can be a string or a `Buffer`. + * + * The `mode` option only affects the newly created file. See {@link open} for more details. + * + * ```js + * import { appendFile } from 'fs'; + * + * appendFile('message.txt', 'data to append', (err) => { + * if (err) throw err; + * console.log('The "data to append" was appended to file!'); + * }); + * ``` + * + * If `options` is a string, then it specifies the encoding: + * + * ```js + * import { appendFile } from 'fs'; + * + * appendFile('message.txt', 'data to append', 'utf8', callback); + * ``` + * + * The `path` may be specified as a numeric file descriptor that has been opened + * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will + * not be closed automatically. + * + * ```js + * import { open, close, appendFile } from 'fs'; + * + * function closeFd(fd) { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * + * open('message.txt', 'a', (err, fd) => { + * if (err) throw err; + * + * try { + * appendFile(fd, 'data to append', 'utf8', (err) => { + * closeFd(fd); + * if (err) throw err; + * }); + * } catch (err) { + * closeFd(fd); + * throw err; + * } + * }); + * ``` + * @since v0.6.7 + * @param path filename or file descriptor + */ + export function appendFile(path: PathOrFileDescriptor, data: string | Uint8Array, options: WriteFileOptions, callback: NoParamCallback): void; + /** + * Asynchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + */ + export function appendFile(file: PathOrFileDescriptor, data: string | Uint8Array, callback: NoParamCallback): void; + export namespace appendFile { + /** + * Asynchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'a'` is used. + */ + function __promisify__(file: PathOrFileDescriptor, data: string | Uint8Array, options?: WriteFileOptions): Promise; + } + /** + * Synchronously append data to a file, creating the file if it does not yet + * exist. `data` can be a string or a `Buffer`. + * + * The `mode` option only affects the newly created file. See {@link open} for more details. + * + * ```js + * import { appendFileSync } from 'fs'; + * + * try { + * appendFileSync('message.txt', 'data to append'); + * console.log('The "data to append" was appended to file!'); + * } catch (err) { + * // Handle the error + * } + * ``` + * + * If `options` is a string, then it specifies the encoding: + * + * ```js + * import { appendFileSync } from 'fs'; + * + * appendFileSync('message.txt', 'data to append', 'utf8'); + * ``` + * + * The `path` may be specified as a numeric file descriptor that has been opened + * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will + * not be closed automatically. + * + * ```js + * import { openSync, closeSync, appendFileSync } from 'fs'; + * + * let fd; + * + * try { + * fd = openSync('message.txt', 'a'); + * appendFileSync(fd, 'data to append', 'utf8'); + * } catch (err) { + * // Handle the error + * } finally { + * if (fd !== undefined) + * closeSync(fd); + * } + * ``` + * @since v0.6.7 + * @param path filename or file descriptor + */ + export function appendFileSync(path: PathOrFileDescriptor, data: string | Uint8Array, options?: WriteFileOptions): void; + /** + * Watch for changes on `filename`. The callback `listener` will be called each + * time the file is accessed. + * + * The `options` argument may be omitted. If provided, it should be an object. The`options` object may contain a boolean named `persistent` that indicates + * whether the process should continue to run as long as files are being watched. + * The `options` object may specify an `interval` property indicating how often the + * target should be polled in milliseconds. + * + * The `listener` gets two arguments the current stat object and the previous + * stat object: + * + * ```js + * import { watchFile } from 'fs'; + * + * watchFile('message.text', (curr, prev) => { + * console.log(`the current mtime is: ${curr.mtime}`); + * console.log(`the previous mtime was: ${prev.mtime}`); + * }); + * ``` + * + * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`, + * the numeric values in these objects are specified as `BigInt`s. + * + * To be notified when the file was modified, not just accessed, it is necessary + * to compare `curr.mtimeMs` and `prev.mtimeMs`. + * + * When an `fs.watchFile` operation results in an `ENOENT` error, it + * will invoke the listener once, with all the fields zeroed (or, for dates, the + * Unix Epoch). If the file is created later on, the listener will be called + * again, with the latest stat objects. This is a change in functionality since + * v0.10. + * + * Using {@link watch} is more efficient than `fs.watchFile` and`fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and`fs.unwatchFile` when possible. + * + * When a file being watched by `fs.watchFile()` disappears and reappears, + * then the contents of `previous` in the second callback event (the file's + * reappearance) will be the same as the contents of `previous` in the first + * callback event (its disappearance). + * + * This happens when: + * + * * the file is deleted, followed by a restore + * * the file is renamed and then renamed a second time back to its original name + * @since v0.1.31 + */ + export function watchFile( + filename: PathLike, + options: + | { + persistent?: boolean | undefined; + interval?: number | undefined; + } + | undefined, + listener: (curr: Stats, prev: Stats) => void + ): void; + /** + * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + */ + export function watchFile(filename: PathLike, listener: (curr: Stats, prev: Stats) => void): void; + /** + * Stop watching for changes on `filename`. If `listener` is specified, only that + * particular listener is removed. Otherwise, _all_ listeners are removed, + * effectively stopping watching of `filename`. + * + * Calling `fs.unwatchFile()` with a filename that is not being watched is a + * no-op, not an error. + * + * Using {@link watch} is more efficient than `fs.watchFile()` and`fs.unwatchFile()`. `fs.watch()` should be used instead of `fs.watchFile()`and `fs.unwatchFile()` when possible. + * @since v0.1.31 + * @param listener Optional, a listener previously attached using `fs.watchFile()` + */ + export function unwatchFile(filename: PathLike, listener?: (curr: Stats, prev: Stats) => void): void; + export interface WatchOptions extends Abortable { + encoding?: BufferEncoding | 'buffer' | undefined; + persistent?: boolean | undefined; + recursive?: boolean | undefined; + } + export type WatchEventType = 'rename' | 'change'; + export type WatchListener = (event: WatchEventType, filename: T) => void; + /** + * Watch for changes on `filename`, where `filename` is either a file or a + * directory. + * + * The second argument is optional. If `options` is provided as a string, it + * specifies the `encoding`. Otherwise `options` should be passed as an object. + * + * The listener callback gets two arguments `(eventType, filename)`. `eventType`is either `'rename'` or `'change'`, and `filename` is the name of the file + * which triggered the event. + * + * On most platforms, `'rename'` is emitted whenever a filename appears or + * disappears in the directory. + * + * The listener callback is attached to the `'change'` event fired by `fs.FSWatcher`, but it is not the same thing as the `'change'` value of`eventType`. + * + * If a `signal` is passed, aborting the corresponding AbortController will close + * the returned `fs.FSWatcher`. + * @since v0.5.10 + * @param listener + */ + export function watch( + filename: PathLike, + options: + | (WatchOptions & { + encoding: 'buffer'; + }) + | 'buffer', + listener?: WatchListener + ): FSWatcher; + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `persistent` is not supplied, the default of `true` is used. + * If `recursive` is not supplied, the default of `false` is used. + */ + export function watch(filename: PathLike, options?: WatchOptions | BufferEncoding | null, listener?: WatchListener): FSWatcher; + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `persistent` is not supplied, the default of `true` is used. + * If `recursive` is not supplied, the default of `false` is used. + */ + export function watch(filename: PathLike, options: WatchOptions | string, listener?: WatchListener): FSWatcher; + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + */ + export function watch(filename: PathLike, listener?: WatchListener): FSWatcher; + /** + * Test whether or not the given path exists by checking with the file system. + * Then call the `callback` argument with either true or false: + * + * ```js + * import { exists } from 'fs'; + * + * exists('/etc/passwd', (e) => { + * console.log(e ? 'it exists' : 'no passwd!'); + * }); + * ``` + * + * **The parameters for this callback are not consistent with other Node.js** + * **callbacks.** Normally, the first parameter to a Node.js callback is an `err`parameter, optionally followed by other parameters. The `fs.exists()` callback + * has only one boolean parameter. This is one reason `fs.access()` is recommended + * instead of `fs.exists()`. + * + * Using `fs.exists()` to check for the existence of a file before calling`fs.open()`, `fs.readFile()` or `fs.writeFile()` is not recommended. Doing + * so introduces a race condition, since other processes may change the file's + * state between the two calls. Instead, user code should open/read/write the + * file directly and handle the error raised if the file does not exist. + * + * **write (NOT RECOMMENDED)** + * + * ```js + * import { exists, open, close } from 'fs'; + * + * exists('myfile', (e) => { + * if (e) { + * console.error('myfile already exists'); + * } else { + * open('myfile', 'wx', (err, fd) => { + * if (err) throw err; + * + * try { + * writeMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * } + * }); + * ``` + * + * **write (RECOMMENDED)** + * + * ```js + * import { open, close } from 'fs'; + * open('myfile', 'wx', (err, fd) => { + * if (err) { + * if (err.code === 'EEXIST') { + * console.error('myfile already exists'); + * return; + * } + * + * throw err; + * } + * + * try { + * writeMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * ``` + * + * **read (NOT RECOMMENDED)** + * + * ```js + * import { open, close, exists } from 'fs'; + * + * exists('myfile', (e) => { + * if (e) { + * open('myfile', 'r', (err, fd) => { + * if (err) throw err; + * + * try { + * readMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * } else { + * console.error('myfile does not exist'); + * } + * }); + * ``` + * + * **read (RECOMMENDED)** + * + * ```js + * import { open, close } from 'fs'; + * + * open('myfile', 'r', (err, fd) => { + * if (err) { + * if (err.code === 'ENOENT') { + * console.error('myfile does not exist'); + * return; + * } + * + * throw err; + * } + * + * try { + * readMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * ``` + * + * The "not recommended" examples above check for existence and then use the + * file; the "recommended" examples are better because they use the file directly + * and handle the error, if any. + * + * In general, check for the existence of a file only if the file won’t be + * used directly, for example when its existence is a signal from another + * process. + * @since v0.0.2 + * @deprecated Since v1.0.0 - Use {@link stat} or {@link access} instead. + */ + export function exists(path: PathLike, callback: (exists: boolean) => void): void; + /** @deprecated */ + export namespace exists { + /** + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function __promisify__(path: PathLike): Promise; + } + /** + * Returns `true` if the path exists, `false` otherwise. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link exists}. + * + * `fs.exists()` is deprecated, but `fs.existsSync()` is not. The `callback`parameter to `fs.exists()` accepts parameters that are inconsistent with other + * Node.js callbacks. `fs.existsSync()` does not use a callback. + * + * ```js + * import { existsSync } from 'fs'; + * + * if (existsSync('/etc/passwd')) + * console.log('The path exists.'); + * ``` + * @since v0.1.21 + */ + export function existsSync(path: PathLike): boolean; + export namespace constants { + // File Access Constants + /** Constant for fs.access(). File is visible to the calling process. */ + const F_OK: number; + /** Constant for fs.access(). File can be read by the calling process. */ + const R_OK: number; + /** Constant for fs.access(). File can be written by the calling process. */ + const W_OK: number; + /** Constant for fs.access(). File can be executed by the calling process. */ + const X_OK: number; + // File Copy Constants + /** Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists. */ + const COPYFILE_EXCL: number; + /** + * Constant for fs.copyFile. copy operation will attempt to create a copy-on-write reflink. + * If the underlying platform does not support copy-on-write, then a fallback copy mechanism is used. + */ + const COPYFILE_FICLONE: number; + /** + * Constant for fs.copyFile. Copy operation will attempt to create a copy-on-write reflink. + * If the underlying platform does not support copy-on-write, then the operation will fail with an error. + */ + const COPYFILE_FICLONE_FORCE: number; + // File Open Constants + /** Constant for fs.open(). Flag indicating to open a file for read-only access. */ + const O_RDONLY: number; + /** Constant for fs.open(). Flag indicating to open a file for write-only access. */ + const O_WRONLY: number; + /** Constant for fs.open(). Flag indicating to open a file for read-write access. */ + const O_RDWR: number; + /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */ + const O_CREAT: number; + /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */ + const O_EXCL: number; + /** + * Constant for fs.open(). Flag indicating that if path identifies a terminal device, + * opening the path shall not cause that terminal to become the controlling terminal for the process + * (if the process does not already have one). + */ + const O_NOCTTY: number; + /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */ + const O_TRUNC: number; + /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */ + const O_APPEND: number; + /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */ + const O_DIRECTORY: number; + /** + * constant for fs.open(). + * Flag indicating reading accesses to the file system will no longer result in + * an update to the atime information associated with the file. + * This flag is available on Linux operating systems only. + */ + const O_NOATIME: number; + /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */ + const O_NOFOLLOW: number; + /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */ + const O_SYNC: number; + /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O with write operations waiting for data integrity. */ + const O_DSYNC: number; + /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */ + const O_SYMLINK: number; + /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */ + const O_DIRECT: number; + /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */ + const O_NONBLOCK: number; + // File Type Constants + /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */ + const S_IFMT: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */ + const S_IFREG: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */ + const S_IFDIR: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */ + const S_IFCHR: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */ + const S_IFBLK: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */ + const S_IFIFO: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */ + const S_IFLNK: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */ + const S_IFSOCK: number; + // File Mode Constants + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */ + const S_IRWXU: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */ + const S_IRUSR: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */ + const S_IWUSR: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */ + const S_IXUSR: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */ + const S_IRWXG: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */ + const S_IRGRP: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */ + const S_IWGRP: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */ + const S_IXGRP: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */ + const S_IRWXO: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */ + const S_IROTH: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */ + const S_IWOTH: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */ + const S_IXOTH: number; + /** + * When set, a memory file mapping is used to access the file. This flag + * is available on Windows operating systems only. On other operating systems, + * this flag is ignored. + */ + const UV_FS_O_FILEMAP: number; + } + /** + * Tests a user's permissions for the file or directory specified by `path`. + * The `mode` argument is an optional integer that specifies the accessibility + * checks to be performed. Check `File access constants` for possible values + * of `mode`. It is possible to create a mask consisting of the bitwise OR of + * two or more values (e.g. `fs.constants.W_OK | fs.constants.R_OK`). + * + * The final argument, `callback`, is a callback function that is invoked with + * a possible error argument. If any of the accessibility checks fail, the error + * argument will be an `Error` object. The following examples check if`package.json` exists, and if it is readable or writable. + * + * ```js + * import { access, constants } from 'fs'; + * + * const file = 'package.json'; + * + * // Check if the file exists in the current directory. + * access(file, constants.F_OK, (err) => { + * console.log(`${file} ${err ? 'does not exist' : 'exists'}`); + * }); + * + * // Check if the file is readable. + * access(file, constants.R_OK, (err) => { + * console.log(`${file} ${err ? 'is not readable' : 'is readable'}`); + * }); + * + * // Check if the file is writable. + * access(file, constants.W_OK, (err) => { + * console.log(`${file} ${err ? 'is not writable' : 'is writable'}`); + * }); + * + * // Check if the file exists in the current directory, and if it is writable. + * access(file, constants.F_OK | constants.W_OK, (err) => { + * if (err) { + * console.error( + * `${file} ${err.code === 'ENOENT' ? 'does not exist' : 'is read-only'}`); + * } else { + * console.log(`${file} exists, and it is writable`); + * } + * }); + * ``` + * + * Do not use `fs.access()` to check for the accessibility of a file before calling`fs.open()`, `fs.readFile()` or `fs.writeFile()`. Doing + * so introduces a race condition, since other processes may change the file's + * state between the two calls. Instead, user code should open/read/write the + * file directly and handle the error raised if the file is not accessible. + * + * **write (NOT RECOMMENDED)** + * + * ```js + * import { access, open, close } from 'fs'; + * + * access('myfile', (err) => { + * if (!err) { + * console.error('myfile already exists'); + * return; + * } + * + * open('myfile', 'wx', (err, fd) => { + * if (err) throw err; + * + * try { + * writeMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * }); + * ``` + * + * **write (RECOMMENDED)** + * + * ```js + * import { open, close } from 'fs'; + * + * open('myfile', 'wx', (err, fd) => { + * if (err) { + * if (err.code === 'EEXIST') { + * console.error('myfile already exists'); + * return; + * } + * + * throw err; + * } + * + * try { + * writeMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * ``` + * + * **read (NOT RECOMMENDED)** + * + * ```js + * import { access, open, close } from 'fs'; + * access('myfile', (err) => { + * if (err) { + * if (err.code === 'ENOENT') { + * console.error('myfile does not exist'); + * return; + * } + * + * throw err; + * } + * + * open('myfile', 'r', (err, fd) => { + * if (err) throw err; + * + * try { + * readMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * }); + * ``` + * + * **read (RECOMMENDED)** + * + * ```js + * import { open, close } from 'fs'; + * + * open('myfile', 'r', (err, fd) => { + * if (err) { + * if (err.code === 'ENOENT') { + * console.error('myfile does not exist'); + * return; + * } + * + * throw err; + * } + * + * try { + * readMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * ``` + * + * The "not recommended" examples above check for accessibility and then use the + * file; the "recommended" examples are better because they use the file directly + * and handle the error, if any. + * + * In general, check for the accessibility of a file only if the file will not be + * used directly, for example when its accessibility is a signal from another + * process. + * + * On Windows, access-control policies (ACLs) on a directory may limit access to + * a file or directory. The `fs.access()` function, however, does not check the + * ACL and therefore may report that a path is accessible even if the ACL restricts + * the user from reading or writing to it. + * @since v0.11.15 + * @param [mode=fs.constants.F_OK] + */ + export function access(path: PathLike, mode: number | undefined, callback: NoParamCallback): void; + /** + * Asynchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + */ + export function access(path: PathLike, callback: NoParamCallback): void; + export namespace access { + /** + * Asynchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function __promisify__(path: PathLike, mode?: number): Promise; + } + /** + * Synchronously tests a user's permissions for the file or directory specified + * by `path`. The `mode` argument is an optional integer that specifies the + * accessibility checks to be performed. Check `File access constants` for + * possible values of `mode`. It is possible to create a mask consisting of + * the bitwise OR of two or more values + * (e.g. `fs.constants.W_OK | fs.constants.R_OK`). + * + * If any of the accessibility checks fail, an `Error` will be thrown. Otherwise, + * the method will return `undefined`. + * + * ```js + * import { accessSync, constants } from 'fs'; + * + * try { + * accessSync('etc/passwd', constants.R_OK | constants.W_OK); + * console.log('can read/write'); + * } catch (err) { + * console.error('no access!'); + * } + * ``` + * @since v0.11.15 + * @param [mode=fs.constants.F_OK] + */ + export function accessSync(path: PathLike, mode?: number): void; + interface StreamOptions { + flags?: string | undefined; + encoding?: BufferEncoding | undefined; + fd?: number | promises.FileHandle | undefined; + mode?: number | undefined; + autoClose?: boolean | undefined; + /** + * @default false + */ + emitClose?: boolean | undefined; + start?: number | undefined; + highWaterMark?: number | undefined; + } + interface ReadStreamOptions extends StreamOptions { + end?: number | undefined; + } + /** + * Unlike the 16 kb default `highWaterMark` for a `stream.Readable`, the stream + * returned by this method has a default `highWaterMark` of 64 kb. + * + * `options` can include `start` and `end` values to read a range of bytes from + * the file instead of the entire file. Both `start` and `end` are inclusive and + * start counting at 0, allowed values are in the + * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `fd` is specified and `start` is + * omitted or `undefined`, `fs.createReadStream()` reads sequentially from the + * current file position. The `encoding` can be any one of those accepted by `Buffer`. + * + * If `fd` is specified, `ReadStream` will ignore the `path` argument and will use + * the specified file descriptor. This means that no `'open'` event will be + * emitted. `fd` should be blocking; non-blocking `fd`s should be passed to `net.Socket`. + * + * If `fd` points to a character device that only supports blocking reads + * (such as keyboard or sound card), read operations do not finish until data is + * available. This can prevent the process from exiting and the stream from + * closing naturally. + * + * By default, the stream will emit a `'close'` event after it has been + * destroyed. Set the `emitClose` option to `false` to change this behavior. + * + * By providing the `fs` option, it is possible to override the corresponding `fs`implementations for `open`, `read`, and `close`. When providing the `fs` option, + * an override for `read` is required. If no `fd` is provided, an override for`open` is also required. If `autoClose` is `true`, an override for `close` is + * also required. + * + * ```js + * import { createReadStream } from 'fs'; + * + * // Create a stream from some character device. + * const stream = createReadStream('/dev/input/event0'); + * setTimeout(() => { + * stream.close(); // This may not close the stream. + * // Artificially marking end-of-stream, as if the underlying resource had + * // indicated end-of-file by itself, allows the stream to close. + * // This does not cancel pending read operations, and if there is such an + * // operation, the process may still not be able to exit successfully + * // until it finishes. + * stream.push(null); + * stream.read(0); + * }, 100); + * ``` + * + * If `autoClose` is false, then the file descriptor won't be closed, even if + * there's an error. It is the application's responsibility to close it and make + * sure there's no file descriptor leak. If `autoClose` is set to true (default + * behavior), on `'error'` or `'end'` the file descriptor will be closed + * automatically. + * + * `mode` sets the file mode (permission and sticky bits), but only if the + * file was created. + * + * An example to read the last 10 bytes of a file which is 100 bytes long: + * + * ```js + * import { createReadStream } from 'fs'; + * + * createReadStream('sample.txt', { start: 90, end: 99 }); + * ``` + * + * If `options` is a string, then it specifies the encoding. + * @since v0.1.31 + */ + export function createReadStream(path: PathLike, options?: BufferEncoding | ReadStreamOptions): ReadStream; + /** + * `options` may also include a `start` option to allow writing data at some + * position past the beginning of the file, allowed values are in the + * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than replacing + * it may require the `flags` option to be set to `r+` rather than the default `w`. + * The `encoding` can be any one of those accepted by `Buffer`. + * + * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'`the file descriptor will be closed automatically. If `autoClose` is false, + * then the file descriptor won't be closed, even if there's an error. + * It is the application's responsibility to close it and make sure there's no + * file descriptor leak. + * + * By default, the stream will emit a `'close'` event after it has been + * destroyed. Set the `emitClose` option to `false` to change this behavior. + * + * By providing the `fs` option it is possible to override the corresponding `fs`implementations for `open`, `write`, `writev` and `close`. Overriding `write()`without `writev()` can reduce + * performance as some optimizations (`_writev()`) + * will be disabled. When providing the `fs` option, overrides for at least one of`write` and `writev` are required. If no `fd` option is supplied, an override + * for `open` is also required. If `autoClose` is `true`, an override for `close`is also required. + * + * Like `fs.ReadStream`, if `fd` is specified, `fs.WriteStream` will ignore the`path` argument and will use the specified file descriptor. This means that no`'open'` event will be + * emitted. `fd` should be blocking; non-blocking `fd`s + * should be passed to `net.Socket`. + * + * If `options` is a string, then it specifies the encoding. + * @since v0.1.31 + */ + export function createWriteStream(path: PathLike, options?: BufferEncoding | StreamOptions): WriteStream; + /** + * Forces all currently queued I/O operations associated with the file to the + * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. No arguments other + * than a possible + * exception are given to the completion callback. + * @since v0.1.96 + */ + export function fdatasync(fd: number, callback: NoParamCallback): void; + export namespace fdatasync { + /** + * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + /** + * Forces all currently queued I/O operations associated with the file to the + * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. Returns `undefined`. + * @since v0.1.96 + */ + export function fdatasyncSync(fd: number): void; + /** + * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it + * already exists. No arguments other than a possible exception are given to the + * callback function. Node.js makes no guarantees about the atomicity of the copy + * operation. If an error occurs after the destination file has been opened for + * writing, Node.js will attempt to remove the destination. + * + * `mode` is an optional integer that specifies the behavior + * of the copy operation. It is possible to create a mask consisting of the bitwise + * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`). + * + * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already + * exists. + * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a + * copy-on-write reflink. If the platform does not support copy-on-write, then a + * fallback copy mechanism is used. + * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to + * create a copy-on-write reflink. If the platform does not support + * copy-on-write, then the operation will fail. + * + * ```js + * import { copyFile, constants } from 'fs'; + * + * function callback(err) { + * if (err) throw err; + * console.log('source.txt was copied to destination.txt'); + * } + * + * // destination.txt will be created or overwritten by default. + * copyFile('source.txt', 'destination.txt', callback); + * + * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. + * copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL, callback); + * ``` + * @since v8.5.0 + * @param src source filename to copy + * @param dest destination filename of the copy operation + * @param [mode=0] modifiers for copy operation. + */ + export function copyFile(src: PathLike, dest: PathLike, callback: NoParamCallback): void; + export function copyFile(src: PathLike, dest: PathLike, mode: number, callback: NoParamCallback): void; + export namespace copyFile { + function __promisify__(src: PathLike, dst: PathLike, mode?: number): Promise; + } + /** + * Synchronously copies `src` to `dest`. By default, `dest` is overwritten if it + * already exists. Returns `undefined`. Node.js makes no guarantees about the + * atomicity of the copy operation. If an error occurs after the destination file + * has been opened for writing, Node.js will attempt to remove the destination. + * + * `mode` is an optional integer that specifies the behavior + * of the copy operation. It is possible to create a mask consisting of the bitwise + * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`). + * + * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already + * exists. + * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a + * copy-on-write reflink. If the platform does not support copy-on-write, then a + * fallback copy mechanism is used. + * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to + * create a copy-on-write reflink. If the platform does not support + * copy-on-write, then the operation will fail. + * + * ```js + * import { copyFileSync, constants } from 'fs'; + * + * // destination.txt will be created or overwritten by default. + * copyFileSync('source.txt', 'destination.txt'); + * console.log('source.txt was copied to destination.txt'); + * + * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. + * copyFileSync('source.txt', 'destination.txt', constants.COPYFILE_EXCL); + * ``` + * @since v8.5.0 + * @param src source filename to copy + * @param dest destination filename of the copy operation + * @param [mode=0] modifiers for copy operation. + */ + export function copyFileSync(src: PathLike, dest: PathLike, mode?: number): void; + /** + * Write an array of `ArrayBufferView`s to the file specified by `fd` using`writev()`. + * + * `position` is the offset from the beginning of the file where this data + * should be written. If `typeof position !== 'number'`, the data will be written + * at the current position. + * + * The callback will be given three arguments: `err`, `bytesWritten`, and`buffers`. `bytesWritten` is how many bytes were written from `buffers`. + * + * If this method is `util.promisify()` ed, it returns a promise for an`Object` with `bytesWritten` and `buffers` properties. + * + * It is unsafe to use `fs.writev()` multiple times on the same file without + * waiting for the callback. For this scenario, use {@link createWriteStream}. + * + * On Linux, positional writes don't work when the file is opened in append mode. + * The kernel ignores the position argument and always appends the data to + * the end of the file. + * @since v12.9.0 + */ + export function writev(fd: number, buffers: ReadonlyArray, cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void): void; + export function writev( + fd: number, + buffers: ReadonlyArray, + position: number, + cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void + ): void; + export interface WriteVResult { + bytesWritten: number; + buffers: NodeJS.ArrayBufferView[]; + } + export namespace writev { + function __promisify__(fd: number, buffers: ReadonlyArray, position?: number): Promise; + } + /** + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link writev}. + * @since v12.9.0 + * @return The number of bytes written. + */ + export function writevSync(fd: number, buffers: ReadonlyArray, position?: number): number; + /** + * Read from a file specified by `fd` and write to an array of `ArrayBufferView`s + * using `readv()`. + * + * `position` is the offset from the beginning of the file from where data + * should be read. If `typeof position !== 'number'`, the data will be read + * from the current position. + * + * The callback will be given three arguments: `err`, `bytesRead`, and`buffers`. `bytesRead` is how many bytes were read from the file. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a promise for an `Object` with `bytesRead` and `buffers` properties. + * @since v13.13.0, v12.17.0 + */ + export function readv(fd: number, buffers: ReadonlyArray, cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void): void; + export function readv( + fd: number, + buffers: ReadonlyArray, + position: number, + cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void + ): void; + export interface ReadVResult { + bytesRead: number; + buffers: NodeJS.ArrayBufferView[]; + } + export namespace readv { + function __promisify__(fd: number, buffers: ReadonlyArray, position?: number): Promise; + } + /** + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link readv}. + * @since v13.13.0, v12.17.0 + * @return The number of bytes read. + */ + export function readvSync(fd: number, buffers: ReadonlyArray, position?: number): number; + export interface OpenDirOptions { + encoding?: BufferEncoding | undefined; + /** + * Number of directory entries that are buffered + * internally when reading from the directory. Higher values lead to better + * performance but higher memory usage. + * @default 32 + */ + bufferSize?: number | undefined; + } + /** + * Synchronously open a directory. See [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html). + * + * Creates an `fs.Dir`, which contains all further functions for reading from + * and cleaning up the directory. + * + * The `encoding` option sets the encoding for the `path` while opening the + * directory and subsequent read operations. + * @since v12.12.0 + */ + export function opendirSync(path: PathLike, options?: OpenDirOptions): Dir; + /** + * Asynchronously open a directory. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for + * more details. + * + * Creates an `fs.Dir`, which contains all further functions for reading from + * and cleaning up the directory. + * + * The `encoding` option sets the encoding for the `path` while opening the + * directory and subsequent read operations. + * @since v12.12.0 + */ + export function opendir(path: PathLike, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void; + export function opendir(path: PathLike, options: OpenDirOptions, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void; + export namespace opendir { + function __promisify__(path: PathLike, options?: OpenDirOptions): Promise; + } + export interface BigIntStats extends StatsBase { + atimeNs: bigint; + mtimeNs: bigint; + ctimeNs: bigint; + birthtimeNs: bigint; + } + export interface BigIntOptions { + bigint: true; + } + export interface StatOptions { + bigint?: boolean | undefined; + } + export interface StatSyncOptions extends StatOptions { + throwIfNoEntry?: boolean | undefined; + } + export interface CopyOptions { + /** + * Dereference symlinks + * @default false + */ + dereference?: boolean; + /** + * When `force` is `false`, and the destination + * exists, throw an error. + * @default false + */ + errorOnExist?: boolean; + /** + * Function to filter copied files/directories. Return + * `true` to copy the item, `false` to ignore it. + */ + filter?(source: string, destination: string): boolean; + /** + * Overwrite existing file or directory. _The copy + * operation will ignore errors if you set this to false and the destination + * exists. Use the `errorOnExist` option to change this behavior. + * @default true + */ + force?: boolean; + /** + * When `true` timestamps from `src` will + * be preserved. + * @default false + */ + preserveTimestamps?: boolean; + /** + * Copy directories recursively. + * @default false + */ + recursive?: boolean; + } + /** + * Asynchronously copies the entire directory structure from `src` to `dest`, + * including subdirectories and files. + * + * When copying a directory to another directory, globs are not supported and + * behavior is similar to `cp dir1/ dir2/`. + * @since v16.7.0 + * @experimental + * @param src source path to copy. + * @param dest destination path to copy to. + */ + export function cp(source: string, destination: string, callback: (err: NodeJS.ErrnoException | null) => void): void; + export function cp(source: string, destination: string, opts: CopyOptions, callback: (err: NodeJS.ErrnoException | null) => void): void; + /** + * Synchronously copies the entire directory structure from `src` to `dest`, + * including subdirectories and files. + * + * When copying a directory to another directory, globs are not supported and + * behavior is similar to `cp dir1/ dir2/`. + * @since v16.7.0 + * @experimental + * @param src source path to copy. + * @param dest destination path to copy to. + */ + export function cpSync(source: string, destination: string, opts?: CopyOptions): void; +} +declare module 'node:fs' { + export * from 'fs'; +} diff --git a/frontend/node_modules/@types/node/fs/promises.d.ts b/frontend/node_modules/@types/node/fs/promises.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f2e981d8e382ee8dbdcf89b2df21ae0fc5eeea46 --- /dev/null +++ b/frontend/node_modules/@types/node/fs/promises.d.ts @@ -0,0 +1,1091 @@ +/** + * The `fs/promises` API provides asynchronous file system methods that return + * promises. + * + * The promise APIs use the underlying Node.js threadpool to perform file + * system operations off the event loop thread. These operations are not + * synchronized or threadsafe. Care must be taken when performing multiple + * concurrent modifications on the same file or data corruption may occur. + * @since v10.0.0 + */ +declare module 'fs/promises' { + import { Abortable } from 'node:events'; + import { Stream } from 'node:stream'; + import { + Stats, + BigIntStats, + StatOptions, + WriteVResult, + ReadVResult, + PathLike, + RmDirOptions, + RmOptions, + MakeDirectoryOptions, + Dirent, + OpenDirOptions, + Dir, + ObjectEncodingOptions, + BufferEncodingOption, + OpenMode, + Mode, + WatchOptions, + WatchEventType, + CopyOptions, + ReadStream, + WriteStream, + } from 'node:fs'; + interface FileChangeInfo { + eventType: WatchEventType; + filename: T; + } + interface FlagAndOpenMode { + mode?: Mode | undefined; + flag?: OpenMode | undefined; + } + interface FileReadResult { + bytesRead: number; + buffer: T; + } + interface FileReadOptions { + /** + * @default `Buffer.alloc(0xffff)` + */ + buffer?: T; + /** + * @default 0 + */ + offset?: number | null; + /** + * @default `buffer.byteLength` + */ + length?: number | null; + position?: number | null; + } + interface CreateReadStreamOptions { + encoding?: BufferEncoding | null | undefined; + autoClose?: boolean | undefined; + emitClose?: boolean | undefined; + start?: number | undefined; + end?: number | undefined; + highWaterMark?: number | undefined; + } + interface CreateWriteStreamOptions { + encoding?: BufferEncoding | null | undefined; + autoClose?: boolean | undefined; + emitClose?: boolean | undefined; + start?: number | undefined; + } + // TODO: Add `EventEmitter` close + interface FileHandle { + /** + * The numeric file descriptor managed by the {FileHandle} object. + * @since v10.0.0 + */ + readonly fd: number; + /** + * Alias of `filehandle.writeFile()`. + * + * When operating on file handles, the mode cannot be changed from what it was set + * to with `fsPromises.open()`. Therefore, this is equivalent to `filehandle.writeFile()`. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + appendFile(data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode) | BufferEncoding | null): Promise; + /** + * Changes the ownership of the file. A wrapper for [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html). + * @since v10.0.0 + * @param uid The file's new owner's user id. + * @param gid The file's new group's group id. + * @return Fulfills with `undefined` upon success. + */ + chown(uid: number, gid: number): Promise; + /** + * Modifies the permissions on the file. See [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html). + * @since v10.0.0 + * @param mode the file mode bit mask. + * @return Fulfills with `undefined` upon success. + */ + chmod(mode: Mode): Promise; + /** + * Unlike the 16 kb default `highWaterMark` for a `stream.Readable`, the stream + * returned by this method has a default `highWaterMark` of 64 kb. + * + * `options` can include `start` and `end` values to read a range of bytes from + * the file instead of the entire file. Both `start` and `end` are inclusive and + * start counting at 0, allowed values are in the + * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `start` is + * omitted or `undefined`, `filehandle.createReadStream()` reads sequentially from + * the current file position. The `encoding` can be any one of those accepted by `Buffer`. + * + * If the `FileHandle` points to a character device that only supports blocking + * reads (such as keyboard or sound card), read operations do not finish until data + * is available. This can prevent the process from exiting and the stream from + * closing naturally. + * + * By default, the stream will emit a `'close'` event after it has been + * destroyed. Set the `emitClose` option to `false` to change this behavior. + * + * ```js + * import { open } from 'fs/promises'; + * + * const fd = await open('/dev/input/event0'); + * // Create a stream from some character device. + * const stream = fd.createReadStream(); + * setTimeout(() => { + * stream.close(); // This may not close the stream. + * // Artificially marking end-of-stream, as if the underlying resource had + * // indicated end-of-file by itself, allows the stream to close. + * // This does not cancel pending read operations, and if there is such an + * // operation, the process may still not be able to exit successfully + * // until it finishes. + * stream.push(null); + * stream.read(0); + * }, 100); + * ``` + * + * If `autoClose` is false, then the file descriptor won't be closed, even if + * there's an error. It is the application's responsibility to close it and make + * sure there's no file descriptor leak. If `autoClose` is set to true (default + * behavior), on `'error'` or `'end'` the file descriptor will be closed + * automatically. + * + * An example to read the last 10 bytes of a file which is 100 bytes long: + * + * ```js + * import { open } from 'fs/promises'; + * + * const fd = await open('sample.txt'); + * fd.createReadStream({ start: 90, end: 99 }); + * ``` + * @since v16.11.0 + */ + createReadStream(options?: CreateReadStreamOptions): ReadStream; + /** + * `options` may also include a `start` option to allow writing data at some + * position past the beginning of the file, allowed values are in the + * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than replacing + * it may require the `flags` `open` option to be set to `r+` rather than the + * default `r`. The `encoding` can be any one of those accepted by `Buffer`. + * + * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'`the file descriptor will be closed automatically. If `autoClose` is false, + * then the file descriptor won't be closed, even if there's an error. + * It is the application's responsibility to close it and make sure there's no + * file descriptor leak. + * + * By default, the stream will emit a `'close'` event after it has been + * destroyed. Set the `emitClose` option to `false` to change this behavior. + * @since v16.11.0 + */ + createWriteStream(options?: CreateWriteStreamOptions): WriteStream; + /** + * Forces all currently queued I/O operations associated with the file to the + * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. + * + * Unlike `filehandle.sync` this method does not flush modified metadata. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + datasync(): Promise; + /** + * Request that all data for the open file descriptor is flushed to the storage + * device. The specific implementation is operating system and device specific. + * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. + * @since v10.0.0 + * @return Fufills with `undefined` upon success. + */ + sync(): Promise; + /** + * Reads data from the file and stores that in the given buffer. + * + * If the file is not modified concurrently, the end-of-file is reached when the + * number of bytes read is zero. + * @since v10.0.0 + * @param buffer A buffer that will be filled with the file data read. + * @param offset The location in the buffer at which to start filling. + * @param length The number of bytes to read. + * @param position The location where to begin reading data from the file. If `null`, data will be read from the current file position, and the position will be updated. If `position` is an + * integer, the current file position will remain unchanged. + * @return Fulfills upon success with an object with two properties: + */ + read(buffer: T, offset?: number | null, length?: number | null, position?: number | null): Promise>; + read(options?: FileReadOptions): Promise>; + /** + * Asynchronously reads the entire contents of a file. + * + * If `options` is a string, then it specifies the `encoding`. + * + * The `FileHandle` has to support reading. + * + * If one or more `filehandle.read()` calls are made on a file handle and then a`filehandle.readFile()` call is made, the data will be read from the current + * position till the end of the file. It doesn't always read from the beginning + * of the file. + * @since v10.0.0 + * @return Fulfills upon a successful read with the contents of the file. If no encoding is specified (using `options.encoding`), the data is returned as a {Buffer} object. Otherwise, the + * data will be a string. + */ + readFile( + options?: { + encoding?: null | undefined; + flag?: OpenMode | undefined; + } | null + ): Promise; + /** + * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. + * The `FileHandle` must have been opened for reading. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + readFile( + options: + | { + encoding: BufferEncoding; + flag?: OpenMode | undefined; + } + | BufferEncoding + ): Promise; + /** + * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. + * The `FileHandle` must have been opened for reading. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + readFile( + options?: + | (ObjectEncodingOptions & { + flag?: OpenMode | undefined; + }) + | BufferEncoding + | null + ): Promise; + /** + * @since v10.0.0 + * @return Fulfills with an {fs.Stats} for the file. + */ + stat( + opts?: StatOptions & { + bigint?: false | undefined; + } + ): Promise; + stat( + opts: StatOptions & { + bigint: true; + } + ): Promise; + stat(opts?: StatOptions): Promise; + /** + * Truncates the file. + * + * If the file was larger than `len` bytes, only the first `len` bytes will be + * retained in the file. + * + * The following example retains only the first four bytes of the file: + * + * ```js + * import { open } from 'fs/promises'; + * + * let filehandle = null; + * try { + * filehandle = await open('temp.txt', 'r+'); + * await filehandle.truncate(4); + * } finally { + * await filehandle?.close(); + * } + * ``` + * + * If the file previously was shorter than `len` bytes, it is extended, and the + * extended part is filled with null bytes (`'\0'`): + * + * If `len` is negative then `0` will be used. + * @since v10.0.0 + * @param [len=0] + * @return Fulfills with `undefined` upon success. + */ + truncate(len?: number): Promise; + /** + * Change the file system timestamps of the object referenced by the `FileHandle` then resolves the promise with no arguments upon success. + * @since v10.0.0 + */ + utimes(atime: string | number | Date, mtime: string | number | Date): Promise; + /** + * Asynchronously writes data to a file, replacing the file if it already exists.`data` can be a string, a buffer, an + * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface) or + * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object, or an + * object with an own `toString` function + * property. The promise is resolved with no arguments upon success. + * + * If `options` is a string, then it specifies the `encoding`. + * + * The `FileHandle` has to support writing. + * + * It is unsafe to use `filehandle.writeFile()` multiple times on the same file + * without waiting for the promise to be resolved (or rejected). + * + * If one or more `filehandle.write()` calls are made on a file handle and then a`filehandle.writeFile()` call is made, the data will be written from the + * current position till the end of the file. It doesn't always write from the + * beginning of the file. + * @since v10.0.0 + */ + writeFile(data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode & Abortable) | BufferEncoding | null): Promise; + /** + * Write `buffer` to the file. + * + * If `buffer` is a plain object, it must have an own (not inherited) `toString`function property. + * + * The promise is resolved with an object containing two properties: + * + * It is unsafe to use `filehandle.write()` multiple times on the same file + * without waiting for the promise to be resolved (or rejected). For this + * scenario, use `fs.createWriteStream()`. + * + * On Linux, positional writes do not work when the file is opened in append mode. + * The kernel ignores the position argument and always appends the data to + * the end of the file. + * @since v10.0.0 + * @param [offset=0] The start position from within `buffer` where the data to write begins. + * @param [length=buffer.byteLength] The number of bytes from `buffer` to write. + * @param position The offset from the beginning of the file where the data from `buffer` should be written. If `position` is not a `number`, the data will be written at the current position. + * See the POSIX pwrite(2) documentation for more detail. + */ + write( + buffer: TBuffer, + offset?: number | null, + length?: number | null, + position?: number | null + ): Promise<{ + bytesWritten: number; + buffer: TBuffer; + }>; + write( + data: string, + position?: number | null, + encoding?: BufferEncoding | null + ): Promise<{ + bytesWritten: number; + buffer: string; + }>; + /** + * Write an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s to the file. + * + * The promise is resolved with an object containing a two properties: + * + * It is unsafe to call `writev()` multiple times on the same file without waiting + * for the promise to be resolved (or rejected). + * + * On Linux, positional writes don't work when the file is opened in append mode. + * The kernel ignores the position argument and always appends the data to + * the end of the file. + * @since v12.9.0 + * @param position The offset from the beginning of the file where the data from `buffers` should be written. If `position` is not a `number`, the data will be written at the current + * position. + */ + writev(buffers: ReadonlyArray, position?: number): Promise; + /** + * Read from a file and write to an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s + * @since v13.13.0, v12.17.0 + * @param position The offset from the beginning of the file where the data should be read from. If `position` is not a `number`, the data will be read from the current position. + * @return Fulfills upon success an object containing two properties: + */ + readv(buffers: ReadonlyArray, position?: number): Promise; + /** + * Closes the file handle after waiting for any pending operation on the handle to + * complete. + * + * ```js + * import { open } from 'fs/promises'; + * + * let filehandle; + * try { + * filehandle = await open('thefile.txt', 'r'); + * } finally { + * await filehandle?.close(); + * } + * ``` + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + close(): Promise; + } + /** + * Tests a user's permissions for the file or directory specified by `path`. + * The `mode` argument is an optional integer that specifies the accessibility + * checks to be performed. Check `File access constants` for possible values + * of `mode`. It is possible to create a mask consisting of the bitwise OR of + * two or more values (e.g. `fs.constants.W_OK | fs.constants.R_OK`). + * + * If the accessibility check is successful, the promise is resolved with no + * value. If any of the accessibility checks fail, the promise is rejected + * with an [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object. The following example checks if the file`/etc/passwd` can be read and + * written by the current process. + * + * ```js + * import { access } from 'fs/promises'; + * import { constants } from 'fs'; + * + * try { + * await access('/etc/passwd', constants.R_OK | constants.W_OK); + * console.log('can access'); + * } catch { + * console.error('cannot access'); + * } + * ``` + * + * Using `fsPromises.access()` to check for the accessibility of a file before + * calling `fsPromises.open()` is not recommended. Doing so introduces a race + * condition, since other processes may change the file's state between the two + * calls. Instead, user code should open/read/write the file directly and handle + * the error raised if the file is not accessible. + * @since v10.0.0 + * @param [mode=fs.constants.F_OK] + * @return Fulfills with `undefined` upon success. + */ + function access(path: PathLike, mode?: number): Promise; + /** + * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it + * already exists. + * + * No guarantees are made about the atomicity of the copy operation. If an + * error occurs after the destination file has been opened for writing, an attempt + * will be made to remove the destination. + * + * ```js + * import { constants } from 'fs'; + * import { copyFile } from 'fs/promises'; + * + * try { + * await copyFile('source.txt', 'destination.txt'); + * console.log('source.txt was copied to destination.txt'); + * } catch { + * console.log('The file could not be copied'); + * } + * + * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. + * try { + * await copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL); + * console.log('source.txt was copied to destination.txt'); + * } catch { + * console.log('The file could not be copied'); + * } + * ``` + * @since v10.0.0 + * @param src source filename to copy + * @param dest destination filename of the copy operation + * @param [mode=0] Optional modifiers that specify the behavior of the copy operation. It is possible to create a mask consisting of the bitwise OR of two or more values (e.g. + * `fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`) + * @return Fulfills with `undefined` upon success. + */ + function copyFile(src: PathLike, dest: PathLike, mode?: number): Promise; + /** + * Opens a `FileHandle`. + * + * Refer to the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more detail. + * + * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented + * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains + * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams). + * @since v10.0.0 + * @param [flags='r'] See `support of file system `flags``. + * @param [mode=0o666] Sets the file mode (permission and sticky bits) if the file is created. + * @return Fulfills with a {FileHandle} object. + */ + function open(path: PathLike, flags: string | number, mode?: Mode): Promise; + /** + * Renames `oldPath` to `newPath`. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function rename(oldPath: PathLike, newPath: PathLike): Promise; + /** + * Truncates (shortens or extends the length) of the content at `path` to `len`bytes. + * @since v10.0.0 + * @param [len=0] + * @return Fulfills with `undefined` upon success. + */ + function truncate(path: PathLike, len?: number): Promise; + /** + * Removes the directory identified by `path`. + * + * Using `fsPromises.rmdir()` on a file (not a directory) results in the + * promise being rejected with an `ENOENT` error on Windows and an `ENOTDIR`error on POSIX. + * + * To get a behavior similar to the `rm -rf` Unix command, use `fsPromises.rm()` with options `{ recursive: true, force: true }`. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function rmdir(path: PathLike, options?: RmDirOptions): Promise; + /** + * Removes files and directories (modeled on the standard POSIX `rm` utility). + * @since v14.14.0 + * @return Fulfills with `undefined` upon success. + */ + function rm(path: PathLike, options?: RmOptions): Promise; + /** + * Asynchronously creates a directory. + * + * The optional `options` argument can be an integer specifying `mode` (permission + * and sticky bits), or an object with a `mode` property and a `recursive`property indicating whether parent directories should be created. Calling`fsPromises.mkdir()` when `path` is a directory + * that exists results in a + * rejection only when `recursive` is false. + * @since v10.0.0 + * @return Upon success, fulfills with `undefined` if `recursive` is `false`, or the first directory path created if `recursive` is `true`. + */ + function mkdir( + path: PathLike, + options: MakeDirectoryOptions & { + recursive: true; + } + ): Promise; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdir( + path: PathLike, + options?: + | Mode + | (MakeDirectoryOptions & { + recursive?: false | undefined; + }) + | null + ): Promise; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdir(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise; + /** + * Reads the contents of a directory. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the filenames. If the `encoding` is set to `'buffer'`, the filenames returned + * will be passed as `Buffer` objects. + * + * If `options.withFileTypes` is set to `true`, the resolved array will contain `fs.Dirent` objects. + * + * ```js + * import { readdir } from 'fs/promises'; + * + * try { + * const files = await readdir(path); + * for (const file of files) + * console.log(file); + * } catch (err) { + * console.error(err); + * } + * ``` + * @since v10.0.0 + * @return Fulfills with an array of the names of the files in the directory excluding `'.'` and `'..'`. + */ + function readdir( + path: PathLike, + options?: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + }) + | BufferEncoding + | null + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir( + path: PathLike, + options: + | { + encoding: 'buffer'; + withFileTypes?: false | undefined; + } + | 'buffer' + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir( + path: PathLike, + options?: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + }) + | BufferEncoding + | null + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. + */ + function readdir( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + } + ): Promise; + /** + * Reads the contents of the symbolic link referred to by `path`. See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more detail. The promise is + * resolved with the`linkString` upon success. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the link path returned. If the `encoding` is set to `'buffer'`, the link path + * returned will be passed as a `Buffer` object. + * @since v10.0.0 + * @return Fulfills with the `linkString` upon success. + */ + function readlink(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink(path: PathLike, options: BufferEncodingOption): Promise; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink(path: PathLike, options?: ObjectEncodingOptions | string | null): Promise; + /** + * Creates a symbolic link. + * + * The `type` argument is only used on Windows platforms and can be one of `'dir'`,`'file'`, or `'junction'`. Windows junction points require the destination path + * to be absolute. When using `'junction'`, the `target` argument will + * automatically be normalized to absolute path. + * @since v10.0.0 + * @param [type='file'] + * @return Fulfills with `undefined` upon success. + */ + function symlink(target: PathLike, path: PathLike, type?: string | null): Promise; + /** + * Equivalent to `fsPromises.stat()` unless `path` refers to a symbolic link, + * in which case the link itself is stat-ed, not the file that it refers to. + * Refer to the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) document for more detail. + * @since v10.0.0 + * @return Fulfills with the {fs.Stats} object for the given symbolic link `path`. + */ + function lstat( + path: PathLike, + opts?: StatOptions & { + bigint?: false | undefined; + } + ): Promise; + function lstat( + path: PathLike, + opts: StatOptions & { + bigint: true; + } + ): Promise; + function lstat(path: PathLike, opts?: StatOptions): Promise; + /** + * @since v10.0.0 + * @return Fulfills with the {fs.Stats} object for the given `path`. + */ + function stat( + path: PathLike, + opts?: StatOptions & { + bigint?: false | undefined; + } + ): Promise; + function stat( + path: PathLike, + opts: StatOptions & { + bigint: true; + } + ): Promise; + function stat(path: PathLike, opts?: StatOptions): Promise; + /** + * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function link(existingPath: PathLike, newPath: PathLike): Promise; + /** + * If `path` refers to a symbolic link, then the link is removed without affecting + * the file or directory to which that link refers. If the `path` refers to a file + * path that is not a symbolic link, the file is deleted. See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more detail. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function unlink(path: PathLike): Promise; + /** + * Changes the permissions of a file. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function chmod(path: PathLike, mode: Mode): Promise; + /** + * Changes the permissions on a symbolic link. + * + * This method is only implemented on macOS. + * @deprecated Since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function lchmod(path: PathLike, mode: Mode): Promise; + /** + * Changes the ownership on a symbolic link. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function lchown(path: PathLike, uid: number, gid: number): Promise; + /** + * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`, with the difference that if the path refers to a + * symbolic link, then the link is not dereferenced: instead, the timestamps of + * the symbolic link itself are changed. + * @since v14.5.0, v12.19.0 + * @return Fulfills with `undefined` upon success. + */ + function lutimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise; + /** + * Changes the ownership of a file. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function chown(path: PathLike, uid: number, gid: number): Promise; + /** + * Change the file system timestamps of the object referenced by `path`. + * + * The `atime` and `mtime` arguments follow these rules: + * + * * Values can be either numbers representing Unix epoch time, `Date`s, or a + * numeric string like `'123456789.0'`. + * * If the value can not be converted to a number, or is `NaN`, `Infinity` or`-Infinity`, an `Error` will be thrown. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise; + /** + * Determines the actual location of `path` using the same semantics as the`fs.realpath.native()` function. + * + * Only paths that can be converted to UTF8 strings are supported. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the path. If the `encoding` is set to `'buffer'`, the path returned will be + * passed as a `Buffer` object. + * + * On Linux, when Node.js is linked against musl libc, the procfs file system must + * be mounted on `/proc` in order for this function to work. Glibc does not have + * this restriction. + * @since v10.0.0 + * @return Fulfills with the resolved path upon success. + */ + function realpath(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath(path: PathLike, options: BufferEncodingOption): Promise; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; + /** + * Creates a unique temporary directory. A unique directory name is generated by + * appending six random characters to the end of the provided `prefix`. Due to + * platform inconsistencies, avoid trailing `X` characters in `prefix`. Some + * platforms, notably the BSDs, can return more than six random characters, and + * replace trailing `X` characters in `prefix` with random characters. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use. + * + * ```js + * import { mkdtemp } from 'fs/promises'; + * + * try { + * await mkdtemp(path.join(os.tmpdir(), 'foo-')); + * } catch (err) { + * console.error(err); + * } + * ``` + * + * The `fsPromises.mkdtemp()` method will append the six randomly selected + * characters directly to the `prefix` string. For instance, given a directory`/tmp`, if the intention is to create a temporary directory _within_`/tmp`, the`prefix` must end with a trailing + * platform-specific path separator + * (`require('path').sep`). + * @since v10.0.0 + * @return Fulfills with a string containing the filesystem path of the newly created temporary directory. + */ + function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp(prefix: string, options: BufferEncodingOption): Promise; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; + /** + * Asynchronously writes data to a file, replacing the file if it already exists.`data` can be a string, a `Buffer`, or, an object with an own (not inherited)`toString` function property. + * + * The `encoding` option is ignored if `data` is a buffer. + * + * If `options` is a string, then it specifies the encoding. + * + * The `mode` option only affects the newly created file. See `fs.open()` for more details. + * + * Any specified `FileHandle` has to support writing. + * + * It is unsafe to use `fsPromises.writeFile()` multiple times on the same file + * without waiting for the promise to be settled. + * + * Similarly to `fsPromises.readFile` \- `fsPromises.writeFile` is a convenience + * method that performs multiple `write` calls internally to write the buffer + * passed to it. For performance sensitive code consider using `fs.createWriteStream()`. + * + * It is possible to use an `AbortSignal` to cancel an `fsPromises.writeFile()`. + * Cancelation is "best effort", and some amount of data is likely still + * to be written. + * + * ```js + * import { writeFile } from 'fs/promises'; + * import { Buffer } from 'buffer'; + * + * try { + * const controller = new AbortController(); + * const { signal } = controller; + * const data = new Uint8Array(Buffer.from('Hello Node.js')); + * const promise = writeFile('message.txt', data, { signal }); + * + * // Abort the request before the promise settles. + * controller.abort(); + * + * await promise; + * } catch (err) { + * // When a request is aborted - err is an AbortError + * console.error(err); + * } + * ``` + * + * Aborting an ongoing request does not abort individual operating + * system requests but rather the internal buffering `fs.writeFile` performs. + * @since v10.0.0 + * @param file filename or `FileHandle` + * @return Fulfills with `undefined` upon success. + */ + function writeFile( + file: PathLike | FileHandle, + data: string | NodeJS.ArrayBufferView | Iterable | AsyncIterable | Stream, + options?: + | (ObjectEncodingOptions & { + mode?: Mode | undefined; + flag?: OpenMode | undefined; + } & Abortable) + | BufferEncoding + | null + ): Promise; + /** + * Asynchronously append data to a file, creating the file if it does not yet + * exist. `data` can be a string or a `Buffer`. + * + * If `options` is a string, then it specifies the `encoding`. + * + * The `mode` option only affects the newly created file. See `fs.open()` for more details. + * + * The `path` may be specified as a `FileHandle` that has been opened + * for appending (using `fsPromises.open()`). + * @since v10.0.0 + * @param path filename or {FileHandle} + * @return Fulfills with `undefined` upon success. + */ + function appendFile(path: PathLike | FileHandle, data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode) | BufferEncoding | null): Promise; + /** + * Asynchronously reads the entire contents of a file. + * + * If no encoding is specified (using `options.encoding`), the data is returned + * as a `Buffer` object. Otherwise, the data will be a string. + * + * If `options` is a string, then it specifies the encoding. + * + * When the `path` is a directory, the behavior of `fsPromises.readFile()` is + * platform-specific. On macOS, Linux, and Windows, the promise will be rejected + * with an error. On FreeBSD, a representation of the directory's contents will be + * returned. + * + * It is possible to abort an ongoing `readFile` using an `AbortSignal`. If a + * request is aborted the promise returned is rejected with an `AbortError`: + * + * ```js + * import { readFile } from 'fs/promises'; + * + * try { + * const controller = new AbortController(); + * const { signal } = controller; + * const promise = readFile(fileName, { signal }); + * + * // Abort the request before the promise settles. + * controller.abort(); + * + * await promise; + * } catch (err) { + * // When a request is aborted - err is an AbortError + * console.error(err); + * } + * ``` + * + * Aborting an ongoing request does not abort individual operating + * system requests but rather the internal buffering `fs.readFile` performs. + * + * Any specified `FileHandle` has to support reading. + * @since v10.0.0 + * @param path filename or `FileHandle` + * @return Fulfills with the contents of the file. + */ + function readFile( + path: PathLike | FileHandle, + options?: + | ({ + encoding?: null | undefined; + flag?: OpenMode | undefined; + } & Abortable) + | null + ): Promise; + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFile( + path: PathLike | FileHandle, + options: + | ({ + encoding: BufferEncoding; + flag?: OpenMode | undefined; + } & Abortable) + | BufferEncoding + ): Promise; + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFile( + path: PathLike | FileHandle, + options?: + | (ObjectEncodingOptions & + Abortable & { + flag?: OpenMode | undefined; + }) + | BufferEncoding + | null + ): Promise; + /** + * Asynchronously open a directory for iterative scanning. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for more detail. + * + * Creates an `fs.Dir`, which contains all further functions for reading from + * and cleaning up the directory. + * + * The `encoding` option sets the encoding for the `path` while opening the + * directory and subsequent read operations. + * + * Example using async iteration: + * + * ```js + * import { opendir } from 'fs/promises'; + * + * try { + * const dir = await opendir('./'); + * for await (const dirent of dir) + * console.log(dirent.name); + * } catch (err) { + * console.error(err); + * } + * ``` + * + * When using the async iterator, the `fs.Dir` object will be automatically + * closed after the iterator exits. + * @since v12.12.0 + * @return Fulfills with an {fs.Dir}. + */ + function opendir(path: PathLike, options?: OpenDirOptions): Promise; + /** + * Returns an async iterator that watches for changes on `filename`, where `filename`is either a file or a directory. + * + * ```js + * const { watch } = require('fs/promises'); + * + * const ac = new AbortController(); + * const { signal } = ac; + * setTimeout(() => ac.abort(), 10000); + * + * (async () => { + * try { + * const watcher = watch(__filename, { signal }); + * for await (const event of watcher) + * console.log(event); + * } catch (err) { + * if (err.name === 'AbortError') + * return; + * throw err; + * } + * })(); + * ``` + * + * On most platforms, `'rename'` is emitted whenever a filename appears or + * disappears in the directory. + * + * All the `caveats` for `fs.watch()` also apply to `fsPromises.watch()`. + * @since v15.9.0 + * @return of objects with the properties: + */ + function watch( + filename: PathLike, + options: + | (WatchOptions & { + encoding: 'buffer'; + }) + | 'buffer' + ): AsyncIterable>; + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `persistent` is not supplied, the default of `true` is used. + * If `recursive` is not supplied, the default of `false` is used. + */ + function watch(filename: PathLike, options?: WatchOptions | BufferEncoding): AsyncIterable>; + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `persistent` is not supplied, the default of `true` is used. + * If `recursive` is not supplied, the default of `false` is used. + */ + function watch(filename: PathLike, options: WatchOptions | string): AsyncIterable> | AsyncIterable>; + /** + * Asynchronously copies the entire directory structure from `src` to `dest`, + * including subdirectories and files. + * + * When copying a directory to another directory, globs are not supported and + * behavior is similar to `cp dir1/ dir2/`. + * @since v16.7.0 + * @experimental + * @param src source path to copy. + * @param dest destination path to copy to. + * @return Fulfills with `undefined` upon success. + */ + function cp(source: string, destination: string, opts?: CopyOptions): Promise; +} +declare module 'node:fs/promises' { + export * from 'fs/promises'; +} diff --git a/frontend/node_modules/@types/node/globals.d.ts b/frontend/node_modules/@types/node/globals.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ae974db7e3295a5dd802b5395b7a879afb44b11e --- /dev/null +++ b/frontend/node_modules/@types/node/globals.d.ts @@ -0,0 +1,284 @@ +// Declare "static" methods in Error +interface ErrorConstructor { + /** Create .stack property on a target object */ + captureStackTrace(targetObject: object, constructorOpt?: Function): void; + + /** + * Optional override for formatting stack traces + * + * @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces + */ + prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined; + + stackTraceLimit: number; +} + +/*-----------------------------------------------* + * * + * GLOBAL * + * * + ------------------------------------------------*/ + +// For backwards compability +interface NodeRequire extends NodeJS.Require { } +interface RequireResolve extends NodeJS.RequireResolve { } +interface NodeModule extends NodeJS.Module { } + +declare var process: NodeJS.Process; +declare var console: Console; + +declare var __filename: string; +declare var __dirname: string; + +declare var require: NodeRequire; +declare var module: NodeModule; + +// Same as module.exports +declare var exports: any; + +/** + * Only available if `--expose-gc` is passed to the process. + */ +declare var gc: undefined | (() => void); + +//#region borrowed +// from https://github.com/microsoft/TypeScript/blob/38da7c600c83e7b31193a62495239a0fe478cb67/lib/lib.webworker.d.ts#L633 until moved to separate lib +/** A controller object that allows you to abort one or more DOM requests as and when desired. */ +interface AbortController { + /** + * Returns the AbortSignal object associated with this object. + */ + + readonly signal: AbortSignal; + /** + * Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted. + */ + abort(): void; +} + +/** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */ +interface AbortSignal { + /** + * Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise. + */ + readonly aborted: boolean; +} + +declare var AbortController: { + prototype: AbortController; + new(): AbortController; +}; + +declare var AbortSignal: { + prototype: AbortSignal; + new(): AbortSignal; + // TODO: Add abort() static +}; +//#endregion borrowed + +//#region ArrayLike.at() +interface RelativeIndexable { + /** + * Takes an integer value and returns the item at that index, + * allowing for positive and negative integers. + * Negative integers count back from the last item in the array. + */ + at(index: number): T | undefined; +} +interface String extends RelativeIndexable {} +interface Array extends RelativeIndexable {} +interface Int8Array extends RelativeIndexable {} +interface Uint8Array extends RelativeIndexable {} +interface Uint8ClampedArray extends RelativeIndexable {} +interface Int16Array extends RelativeIndexable {} +interface Uint16Array extends RelativeIndexable {} +interface Int32Array extends RelativeIndexable {} +interface Uint32Array extends RelativeIndexable {} +interface Float32Array extends RelativeIndexable {} +interface Float64Array extends RelativeIndexable {} +interface BigInt64Array extends RelativeIndexable {} +interface BigUint64Array extends RelativeIndexable {} +//#endregion ArrayLike.at() end + +/*----------------------------------------------* +* * +* GLOBAL INTERFACES * +* * +*-----------------------------------------------*/ +declare namespace NodeJS { + interface CallSite { + /** + * Value of "this" + */ + getThis(): unknown; + + /** + * Type of "this" as a string. + * This is the name of the function stored in the constructor field of + * "this", if available. Otherwise the object's [[Class]] internal + * property. + */ + getTypeName(): string | null; + + /** + * Current function + */ + getFunction(): Function | undefined; + + /** + * Name of the current function, typically its name property. + * If a name property is not available an attempt will be made to try + * to infer a name from the function's context. + */ + getFunctionName(): string | null; + + /** + * Name of the property [of "this" or one of its prototypes] that holds + * the current function + */ + getMethodName(): string | null; + + /** + * Name of the script [if this function was defined in a script] + */ + getFileName(): string | null; + + /** + * Current line number [if this function was defined in a script] + */ + getLineNumber(): number | null; + + /** + * Current column number [if this function was defined in a script] + */ + getColumnNumber(): number | null; + + /** + * A call site object representing the location where eval was called + * [if this function was created using a call to eval] + */ + getEvalOrigin(): string | undefined; + + /** + * Is this a toplevel invocation, that is, is "this" the global object? + */ + isToplevel(): boolean; + + /** + * Does this call take place in code defined by a call to eval? + */ + isEval(): boolean; + + /** + * Is this call in native V8 code? + */ + isNative(): boolean; + + /** + * Is this a constructor call? + */ + isConstructor(): boolean; + } + + interface ErrnoException extends Error { + errno?: number | undefined; + code?: string | undefined; + path?: string | undefined; + syscall?: string | undefined; + } + + interface ReadableStream extends EventEmitter { + readable: boolean; + read(size?: number): string | Buffer; + setEncoding(encoding: BufferEncoding): this; + pause(): this; + resume(): this; + isPaused(): boolean; + pipe(destination: T, options?: { end?: boolean | undefined; }): T; + unpipe(destination?: WritableStream): this; + unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void; + wrap(oldStream: ReadableStream): this; + [Symbol.asyncIterator](): AsyncIterableIterator; + } + + interface WritableStream extends EventEmitter { + writable: boolean; + write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean; + write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean; + end(cb?: () => void): void; + end(data: string | Uint8Array, cb?: () => void): void; + end(str: string, encoding?: BufferEncoding, cb?: () => void): void; + } + + interface ReadWriteStream extends ReadableStream, WritableStream { } + + interface RefCounted { + ref(): this; + unref(): this; + } + + type TypedArray = + | Uint8Array + | Uint8ClampedArray + | Uint16Array + | Uint32Array + | Int8Array + | Int16Array + | Int32Array + | BigUint64Array + | BigInt64Array + | Float32Array + | Float64Array; + type ArrayBufferView = TypedArray | DataView; + + interface Require { + (id: string): any; + resolve: RequireResolve; + cache: Dict; + /** + * @deprecated + */ + extensions: RequireExtensions; + main: Module | undefined; + } + + interface RequireResolve { + (id: string, options?: { paths?: string[] | undefined; }): string; + paths(request: string): string[] | null; + } + + interface RequireExtensions extends Dict<(m: Module, filename: string) => any> { + '.js': (m: Module, filename: string) => any; + '.json': (m: Module, filename: string) => any; + '.node': (m: Module, filename: string) => any; + } + interface Module { + /** + * `true` if the module is running during the Node.js preload + */ + isPreloading: boolean; + exports: any; + require: Require; + id: string; + filename: string; + loaded: boolean; + /** @deprecated since 14.6.0 Please use `require.main` and `module.children` instead. */ + parent: Module | null | undefined; + children: Module[]; + /** + * @since 11.14.0 + * + * The directory name of the module. This is usually the same as the path.dirname() of the module.id. + */ + path: string; + paths: string[]; + } + + interface Dict { + [key: string]: T | undefined; + } + + interface ReadOnlyDict { + readonly [key: string]: T | undefined; + } +} diff --git a/frontend/node_modules/@types/node/globals.global.d.ts b/frontend/node_modules/@types/node/globals.global.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ef1198c05024940c44e3c1a6429c26091fe2a94f --- /dev/null +++ b/frontend/node_modules/@types/node/globals.global.d.ts @@ -0,0 +1 @@ +declare var global: typeof globalThis; diff --git a/frontend/node_modules/@types/node/http.d.ts b/frontend/node_modules/@types/node/http.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..05b7966b21f22fb4d2b03d6b41d4d3a750333802 --- /dev/null +++ b/frontend/node_modules/@types/node/http.d.ts @@ -0,0 +1,1369 @@ +/** + * To use the HTTP server and client one must `require('http')`. + * + * The HTTP interfaces in Node.js are designed to support many features + * of the protocol which have been traditionally difficult to use. + * In particular, large, possibly chunk-encoded, messages. The interface is + * careful to never buffer entire requests or responses, so the + * user is able to stream data. + * + * HTTP message headers are represented by an object like this: + * + * ```js + * { 'content-length': '123', + * 'content-type': 'text/plain', + * 'connection': 'keep-alive', + * 'host': 'mysite.com', + * 'accept': '*' } + * ``` + * + * Keys are lowercased. Values are not modified. + * + * In order to support the full spectrum of possible HTTP applications, the Node.js + * HTTP API is very low-level. It deals with stream handling and message + * parsing only. It parses a message into headers and body but it does not + * parse the actual headers or the body. + * + * See `message.headers` for details on how duplicate headers are handled. + * + * The raw headers as they were received are retained in the `rawHeaders`property, which is an array of `[key, value, key2, value2, ...]`. For + * example, the previous message header object might have a `rawHeaders`list like the following: + * + * ```js + * [ 'ConTent-Length', '123456', + * 'content-LENGTH', '123', + * 'content-type', 'text/plain', + * 'CONNECTION', 'keep-alive', + * 'Host', 'mysite.com', + * 'accepT', '*' ] + * ``` + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/http.js) + */ +declare module 'http' { + import * as stream from 'node:stream'; + import { URL } from 'node:url'; + import { Socket, Server as NetServer, LookupFunction } from 'node:net'; + // incoming headers will never contain number + interface IncomingHttpHeaders extends NodeJS.Dict { + accept?: string | undefined; + 'accept-language'?: string | undefined; + 'accept-patch'?: string | undefined; + 'accept-ranges'?: string | undefined; + 'access-control-allow-credentials'?: string | undefined; + 'access-control-allow-headers'?: string | undefined; + 'access-control-allow-methods'?: string | undefined; + 'access-control-allow-origin'?: string | undefined; + 'access-control-expose-headers'?: string | undefined; + 'access-control-max-age'?: string | undefined; + 'access-control-request-headers'?: string | undefined; + 'access-control-request-method'?: string | undefined; + age?: string | undefined; + allow?: string | undefined; + 'alt-svc'?: string | undefined; + authorization?: string | undefined; + 'cache-control'?: string | undefined; + connection?: string | undefined; + 'content-disposition'?: string | undefined; + 'content-encoding'?: string | undefined; + 'content-language'?: string | undefined; + 'content-length'?: string | undefined; + 'content-location'?: string | undefined; + 'content-range'?: string | undefined; + 'content-type'?: string | undefined; + cookie?: string | undefined; + date?: string | undefined; + etag?: string | undefined; + expect?: string | undefined; + expires?: string | undefined; + forwarded?: string | undefined; + from?: string | undefined; + host?: string | undefined; + 'if-match'?: string | undefined; + 'if-modified-since'?: string | undefined; + 'if-none-match'?: string | undefined; + 'if-unmodified-since'?: string | undefined; + 'last-modified'?: string | undefined; + location?: string | undefined; + origin?: string | undefined; + pragma?: string | undefined; + 'proxy-authenticate'?: string | undefined; + 'proxy-authorization'?: string | undefined; + 'public-key-pins'?: string | undefined; + range?: string | undefined; + referer?: string | undefined; + 'retry-after'?: string | undefined; + 'sec-websocket-accept'?: string | undefined; + 'sec-websocket-extensions'?: string | undefined; + 'sec-websocket-key'?: string | undefined; + 'sec-websocket-protocol'?: string | undefined; + 'sec-websocket-version'?: string | undefined; + 'set-cookie'?: string[] | undefined; + 'strict-transport-security'?: string | undefined; + tk?: string | undefined; + trailer?: string | undefined; + 'transfer-encoding'?: string | undefined; + upgrade?: string | undefined; + 'user-agent'?: string | undefined; + vary?: string | undefined; + via?: string | undefined; + warning?: string | undefined; + 'www-authenticate'?: string | undefined; + } + // outgoing headers allows numbers (as they are converted internally to strings) + type OutgoingHttpHeader = number | string | string[]; + interface OutgoingHttpHeaders extends NodeJS.Dict {} + interface ClientRequestArgs { + abort?: AbortSignal | undefined; + protocol?: string | null | undefined; + host?: string | null | undefined; + hostname?: string | null | undefined; + family?: number | undefined; + port?: number | string | null | undefined; + defaultPort?: number | string | undefined; + localAddress?: string | undefined; + socketPath?: string | undefined; + /** + * @default 8192 + */ + maxHeaderSize?: number | undefined; + method?: string | undefined; + path?: string | null | undefined; + headers?: OutgoingHttpHeaders | undefined; + auth?: string | null | undefined; + agent?: Agent | boolean | undefined; + _defaultAgent?: Agent | undefined; + timeout?: number | undefined; + setHost?: boolean | undefined; + // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L278 + createConnection?: ((options: ClientRequestArgs, oncreate: (err: Error, socket: Socket) => void) => Socket) | undefined; + lookup?: LookupFunction | undefined; + } + interface ServerOptions { + IncomingMessage?: typeof IncomingMessage | undefined; + ServerResponse?: typeof ServerResponse | undefined; + /** + * Optionally overrides the value of + * `--max-http-header-size` for requests received by this server, i.e. + * the maximum length of request headers in bytes. + * @default 8192 + */ + maxHeaderSize?: number | undefined; + /** + * Use an insecure HTTP parser that accepts invalid HTTP headers when true. + * Using the insecure parser should be avoided. + * See --insecure-http-parser for more information. + * @default false + */ + insecureHTTPParser?: boolean | undefined; + } + type RequestListener = (req: IncomingMessage, res: ServerResponse) => void; + /** + * @since v0.1.17 + */ + class Server extends NetServer { + constructor(requestListener?: RequestListener); + constructor(options: ServerOptions, requestListener?: RequestListener); + /** + * Sets the timeout value for sockets, and emits a `'timeout'` event on + * the Server object, passing the socket as an argument, if a timeout + * occurs. + * + * If there is a `'timeout'` event listener on the Server object, then it + * will be called with the timed-out socket as an argument. + * + * By default, the Server does not timeout sockets. However, if a callback + * is assigned to the Server's `'timeout'` event, timeouts must be handled + * explicitly. + * @since v0.9.12 + * @param [msecs=0 (no timeout)] + */ + setTimeout(msecs?: number, callback?: () => void): this; + setTimeout(callback: () => void): this; + /** + * Limits maximum incoming headers count. If set to 0, no limit will be applied. + * @since v0.7.0 + */ + maxHeadersCount: number | null; + /** + * The maximum number of requests socket can handle + * before closing keep alive connection. + * + * A value of `0` will disable the limit. + * + * When the limit is reached it will set the `Connection` header value to `close`, + * but will not actually close the connection, subsequent requests sent + * after the limit is reached will get `503 Service Unavailable` as a response. + * @since v16.10.0 + */ + maxRequestsPerSocket: number | null; + /** + * The number of milliseconds of inactivity before a socket is presumed + * to have timed out. + * + * A value of `0` will disable the timeout behavior on incoming connections. + * + * The socket timeout logic is set up on connection, so changing this + * value only affects new connections to the server, not any existing connections. + * @since v0.9.12 + */ + timeout: number; + /** + * Limit the amount of time the parser will wait to receive the complete HTTP + * headers. + * + * In case of inactivity, the rules defined in `server.timeout` apply. However, + * that inactivity based timeout would still allow the connection to be kept open + * if the headers are being sent very slowly (by default, up to a byte per 2 + * minutes). In order to prevent this, whenever header data arrives an additional + * check is made that more than `server.headersTimeout` milliseconds has not + * passed since the connection was established. If the check fails, a `'timeout'`event is emitted on the server object, and (by default) the socket is destroyed. + * See `server.timeout` for more information on how timeout behavior can be + * customized. + * @since v11.3.0, v10.14.0 + */ + headersTimeout: number; + /** + * The number of milliseconds of inactivity a server needs to wait for additional + * incoming data, after it has finished writing the last response, before a socket + * will be destroyed. If the server receives new data before the keep-alive + * timeout has fired, it will reset the regular inactivity timeout, i.e.,`server.timeout`. + * + * A value of `0` will disable the keep-alive timeout behavior on incoming + * connections. + * A value of `0` makes the http server behave similarly to Node.js versions prior + * to 8.0.0, which did not have a keep-alive timeout. + * + * The socket timeout logic is set up on connection, so changing this value only + * affects new connections to the server, not any existing connections. + * @since v8.0.0 + */ + keepAliveTimeout: number; + /** + * Sets the timeout value in milliseconds for receiving the entire request from + * the client. + * + * If the timeout expires, the server responds with status 408 without + * forwarding the request to the request listener and then closes the connection. + * + * It must be set to a non-zero value (e.g. 120 seconds) to protect against + * potential Denial-of-Service attacks in case the server is deployed without a + * reverse proxy in front. + * @since v14.11.0 + */ + requestTimeout: number; + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'connection', listener: (socket: Socket) => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'listening', listener: () => void): this; + addListener(event: 'checkContinue', listener: RequestListener): this; + addListener(event: 'checkExpectation', listener: RequestListener): this; + addListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this; + addListener(event: 'connect', listener: (req: IncomingMessage, socket: stream.Duplex, head: Buffer) => void): this; + addListener(event: 'request', listener: RequestListener): this; + addListener(event: 'upgrade', listener: (req: IncomingMessage, socket: stream.Duplex, head: Buffer) => void): this; + emit(event: string, ...args: any[]): boolean; + emit(event: 'close'): boolean; + emit(event: 'connection', socket: Socket): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'listening'): boolean; + emit(event: 'checkContinue', req: IncomingMessage, res: ServerResponse): boolean; + emit(event: 'checkExpectation', req: IncomingMessage, res: ServerResponse): boolean; + emit(event: 'clientError', err: Error, socket: stream.Duplex): boolean; + emit(event: 'connect', req: IncomingMessage, socket: stream.Duplex, head: Buffer): boolean; + emit(event: 'request', req: IncomingMessage, res: ServerResponse): boolean; + emit(event: 'upgrade', req: IncomingMessage, socket: stream.Duplex, head: Buffer): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'connection', listener: (socket: Socket) => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'listening', listener: () => void): this; + on(event: 'checkContinue', listener: RequestListener): this; + on(event: 'checkExpectation', listener: RequestListener): this; + on(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this; + on(event: 'connect', listener: (req: IncomingMessage, socket: stream.Duplex, head: Buffer) => void): this; + on(event: 'request', listener: RequestListener): this; + on(event: 'upgrade', listener: (req: IncomingMessage, socket: stream.Duplex, head: Buffer) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'connection', listener: (socket: Socket) => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'listening', listener: () => void): this; + once(event: 'checkContinue', listener: RequestListener): this; + once(event: 'checkExpectation', listener: RequestListener): this; + once(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this; + once(event: 'connect', listener: (req: IncomingMessage, socket: stream.Duplex, head: Buffer) => void): this; + once(event: 'request', listener: RequestListener): this; + once(event: 'upgrade', listener: (req: IncomingMessage, socket: stream.Duplex, head: Buffer) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'connection', listener: (socket: Socket) => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'listening', listener: () => void): this; + prependListener(event: 'checkContinue', listener: RequestListener): this; + prependListener(event: 'checkExpectation', listener: RequestListener): this; + prependListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this; + prependListener(event: 'connect', listener: (req: IncomingMessage, socket: stream.Duplex, head: Buffer) => void): this; + prependListener(event: 'request', listener: RequestListener): this; + prependListener(event: 'upgrade', listener: (req: IncomingMessage, socket: stream.Duplex, head: Buffer) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'connection', listener: (socket: Socket) => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'listening', listener: () => void): this; + prependOnceListener(event: 'checkContinue', listener: RequestListener): this; + prependOnceListener(event: 'checkExpectation', listener: RequestListener): this; + prependOnceListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this; + prependOnceListener(event: 'connect', listener: (req: IncomingMessage, socket: stream.Duplex, head: Buffer) => void): this; + prependOnceListener(event: 'request', listener: RequestListener): this; + prependOnceListener(event: 'upgrade', listener: (req: IncomingMessage, socket: stream.Duplex, head: Buffer) => void): this; + } + /** + * This class serves as the parent class of {@link ClientRequest} and {@link ServerResponse}. It is an abstract of outgoing message from + * the perspective of the participants of HTTP transaction. + * @since v0.1.17 + */ + class OutgoingMessage extends stream.Writable { + readonly req: IncomingMessage; + chunkedEncoding: boolean; + shouldKeepAlive: boolean; + useChunkedEncodingByDefault: boolean; + sendDate: boolean; + /** + * @deprecated Use `writableEnded` instead. + */ + finished: boolean; + /** + * Read-only. `true` if the headers were sent, otherwise `false`. + * @since v0.9.3 + */ + readonly headersSent: boolean; + /** + * Aliases of `outgoingMessage.socket` + * @since v0.3.0 + * @deprecated Since v15.12.0 - Use `socket` instead. + */ + readonly connection: Socket | null; + /** + * Reference to the underlying socket. Usually, users will not want to access + * this property. + * + * After calling `outgoingMessage.end()`, this property will be nulled. + * @since v0.3.0 + */ + readonly socket: Socket | null; + constructor(); + /** + * Once a socket is associated with the message and is connected,`socket.setTimeout()` will be called with `msecs` as the first parameter. + * @since v0.9.12 + * @param callback Optional function to be called when a timeout occurs. Same as binding to the `timeout` event. + */ + setTimeout(msecs: number, callback?: () => void): this; + /** + * Sets a single header value for the header object. + * @since v0.4.0 + * @param name Header name + * @param value Header value + */ + setHeader(name: string, value: number | string | ReadonlyArray): this; + /** + * Gets the value of HTTP header with the given name. If such a name doesn't + * exist in message, it will be `undefined`. + * @since v0.4.0 + * @param name Name of header + */ + getHeader(name: string): number | string | string[] | undefined; + /** + * Returns a shallow copy of the current outgoing headers. Since a shallow + * copy is used, array values may be mutated without additional calls to + * various header-related HTTP module methods. The keys of the returned + * object are the header names and the values are the respective header + * values. All header names are lowercase. + * + * The object returned by the `outgoingMessage.getHeaders()` method does + * not prototypically inherit from the JavaScript Object. This means that + * typical Object methods such as `obj.toString()`, `obj.hasOwnProperty()`, + * and others are not defined and will not work. + * + * ```js + * outgoingMessage.setHeader('Foo', 'bar'); + * outgoingMessage.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); + * + * const headers = outgoingMessage.getHeaders(); + * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] } + * ``` + * @since v8.0.0 + */ + getHeaders(): OutgoingHttpHeaders; + /** + * Returns an array of names of headers of the outgoing outgoingMessage. All + * names are lowercase. + * @since v8.0.0 + */ + getHeaderNames(): string[]; + /** + * Returns `true` if the header identified by `name` is currently set in the + * outgoing headers. The header name is case-insensitive. + * + * ```js + * const hasContentType = outgoingMessage.hasHeader('content-type'); + * ``` + * @since v8.0.0 + */ + hasHeader(name: string): boolean; + /** + * Removes a header that is queued for implicit sending. + * + * ```js + * outgoingMessage.removeHeader('Content-Encoding'); + * ``` + * @since v0.4.0 + */ + removeHeader(name: string): void; + /** + * Adds HTTP trailers (headers but at the end of the message) to the message. + * + * Trailers are **only** be emitted if the message is chunked encoded. If not, + * the trailer will be silently discarded. + * + * HTTP requires the `Trailer` header to be sent to emit trailers, + * with a list of header fields in its value, e.g. + * + * ```js + * message.writeHead(200, { 'Content-Type': 'text/plain', + * 'Trailer': 'Content-MD5' }); + * message.write(fileData); + * message.addTrailers({ 'Content-MD5': '7895bf4b8828b55ceaf47747b4bca667' }); + * message.end(); + * ``` + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * @since v0.3.0 + */ + addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void; + /** + * Compulsorily flushes the message headers + * + * For efficiency reason, Node.js normally buffers the message headers + * until `outgoingMessage.end()` is called or the first chunk of message data + * is written. It then tries to pack the headers and data into a single TCP + * packet. + * + * It is usually desired (it saves a TCP round-trip), but not when the first + * data is not sent until possibly much later. `outgoingMessage.flushHeaders()`bypasses the optimization and kickstarts the request. + * @since v1.6.0 + */ + flushHeaders(): void; + } + /** + * This object is created internally by an HTTP server, not by the user. It is + * passed as the second parameter to the `'request'` event. + * @since v0.1.17 + */ + class ServerResponse extends OutgoingMessage { + /** + * When using implicit headers (not calling `response.writeHead()` explicitly), + * this property controls the status code that will be sent to the client when + * the headers get flushed. + * + * ```js + * response.statusCode = 404; + * ``` + * + * After response header was sent to the client, this property indicates the + * status code which was sent out. + * @since v0.4.0 + */ + statusCode: number; + /** + * When using implicit headers (not calling `response.writeHead()` explicitly), + * this property controls the status message that will be sent to the client when + * the headers get flushed. If this is left as `undefined` then the standard + * message for the status code will be used. + * + * ```js + * response.statusMessage = 'Not found'; + * ``` + * + * After response header was sent to the client, this property indicates the + * status message which was sent out. + * @since v0.11.8 + */ + statusMessage: string; + constructor(req: IncomingMessage); + assignSocket(socket: Socket): void; + detachSocket(socket: Socket): void; + /** + * Sends a HTTP/1.1 100 Continue message to the client, indicating that + * the request body should be sent. See the `'checkContinue'` event on`Server`. + * @since v0.3.0 + */ + writeContinue(callback?: () => void): void; + /** + * Sends a response header to the request. The status code is a 3-digit HTTP + * status code, like `404`. The last argument, `headers`, are the response headers. + * Optionally one can give a human-readable `statusMessage` as the second + * argument. + * + * `headers` may be an `Array` where the keys and values are in the same list. + * It is _not_ a list of tuples. So, the even-numbered offsets are key values, + * and the odd-numbered offsets are the associated values. The array is in the same + * format as `request.rawHeaders`. + * + * Returns a reference to the `ServerResponse`, so that calls can be chained. + * + * ```js + * const body = 'hello world'; + * response + * .writeHead(200, { + * 'Content-Length': Buffer.byteLength(body), + * 'Content-Type': 'text/plain' + * }) + * .end(body); + * ``` + * + * This method must only be called once on a message and it must + * be called before `response.end()` is called. + * + * If `response.write()` or `response.end()` are called before calling + * this, the implicit/mutable headers will be calculated and call this function. + * + * When headers have been set with `response.setHeader()`, they will be merged + * with any headers passed to `response.writeHead()`, with the headers passed + * to `response.writeHead()` given precedence. + * + * If this method is called and `response.setHeader()` has not been called, + * it will directly write the supplied header values onto the network channel + * without caching internally, and the `response.getHeader()` on the header + * will not yield the expected result. If progressive population of headers is + * desired with potential future retrieval and modification, use `response.setHeader()` instead. + * + * ```js + * // Returns content-type = text/plain + * const server = http.createServer((req, res) => { + * res.setHeader('Content-Type', 'text/html'); + * res.setHeader('X-Foo', 'bar'); + * res.writeHead(200, { 'Content-Type': 'text/plain' }); + * res.end('ok'); + * }); + * ``` + * + * `Content-Length` is given in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes. Node.js + * does not check whether `Content-Length` and the length of the body which has + * been transmitted are equal or not. + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * @since v0.1.30 + */ + writeHead(statusCode: number, statusMessage?: string, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this; + writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this; + /** + * Sends a HTTP/1.1 102 Processing message to the client, indicating that + * the request body should be sent. + * @since v10.0.0 + */ + writeProcessing(): void; + } + interface InformationEvent { + statusCode: number; + statusMessage: string; + httpVersion: string; + httpVersionMajor: number; + httpVersionMinor: number; + headers: IncomingHttpHeaders; + rawHeaders: string[]; + } + /** + * This object is created internally and returned from {@link request}. It + * represents an _in-progress_ request whose header has already been queued. The + * header is still mutable using the `setHeader(name, value)`,`getHeader(name)`, `removeHeader(name)` API. The actual header will + * be sent along with the first data chunk or when calling `request.end()`. + * + * To get the response, add a listener for `'response'` to the request object.`'response'` will be emitted from the request object when the response + * headers have been received. The `'response'` event is executed with one + * argument which is an instance of {@link IncomingMessage}. + * + * During the `'response'` event, one can add listeners to the + * response object; particularly to listen for the `'data'` event. + * + * If no `'response'` handler is added, then the response will be + * entirely discarded. However, if a `'response'` event handler is added, + * then the data from the response object **must** be consumed, either by + * calling `response.read()` whenever there is a `'readable'` event, or + * by adding a `'data'` handler, or by calling the `.resume()` method. + * Until the data is consumed, the `'end'` event will not fire. Also, until + * the data is read it will consume memory that can eventually lead to a + * 'process out of memory' error. + * + * For backward compatibility, `res` will only emit `'error'` if there is an`'error'` listener registered. + * + * Node.js does not check whether Content-Length and the length of the + * body which has been transmitted are equal or not. + * @since v0.1.17 + */ + class ClientRequest extends OutgoingMessage { + /** + * The `request.aborted` property will be `true` if the request has + * been aborted. + * @since v0.11.14 + */ + aborted: boolean; + /** + * The request host. + * @since v14.5.0, v12.19.0 + */ + host: string; + /** + * The request protocol. + * @since v14.5.0, v12.19.0 + */ + protocol: string; + constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void); + /** + * The request method. + * @since v0.1.97 + */ + method: string; + /** + * The request path. + * @since v0.4.0 + */ + path: string; + /** + * Marks the request as aborting. Calling this will cause remaining data + * in the response to be dropped and the socket to be destroyed. + * @since v0.3.8 + * @deprecated Since v14.1.0,v13.14.0 - Use `destroy` instead. + */ + abort(): void; + onSocket(socket: Socket): void; + /** + * Once a socket is assigned to this request and is connected `socket.setTimeout()` will be called. + * @since v0.5.9 + * @param timeout Milliseconds before a request times out. + * @param callback Optional function to be called when a timeout occurs. Same as binding to the `'timeout'` event. + */ + setTimeout(timeout: number, callback?: () => void): this; + /** + * Once a socket is assigned to this request and is connected `socket.setNoDelay()` will be called. + * @since v0.5.9 + */ + setNoDelay(noDelay?: boolean): void; + /** + * Once a socket is assigned to this request and is connected `socket.setKeepAlive()` will be called. + * @since v0.5.9 + */ + setSocketKeepAlive(enable?: boolean, initialDelay?: number): void; + /** + * Returns an array containing the unique names of the current outgoing raw + * headers. Header names are returned with their exact casing being set. + * + * ```js + * request.setHeader('Foo', 'bar'); + * request.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); + * + * const headerNames = request.getRawHeaderNames(); + * // headerNames === ['Foo', 'Set-Cookie'] + * ``` + * @since v15.13.0 + */ + getRawHeaderNames(): string[]; + addListener(event: 'abort', listener: () => void): this; + addListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + addListener(event: 'continue', listener: () => void): this; + addListener(event: 'information', listener: (info: InformationEvent) => void): this; + addListener(event: 'response', listener: (response: IncomingMessage) => void): this; + addListener(event: 'socket', listener: (socket: Socket) => void): this; + addListener(event: 'timeout', listener: () => void): this; + addListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'drain', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'finish', listener: () => void): this; + addListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + on(event: 'abort', listener: () => void): this; + on(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + on(event: 'continue', listener: () => void): this; + on(event: 'information', listener: (info: InformationEvent) => void): this; + on(event: 'response', listener: (response: IncomingMessage) => void): this; + on(event: 'socket', listener: (socket: Socket) => void): this; + on(event: 'timeout', listener: () => void): this; + on(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'drain', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'finish', listener: () => void): this; + on(event: 'pipe', listener: (src: stream.Readable) => void): this; + on(event: 'unpipe', listener: (src: stream.Readable) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: 'abort', listener: () => void): this; + once(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + once(event: 'continue', listener: () => void): this; + once(event: 'information', listener: (info: InformationEvent) => void): this; + once(event: 'response', listener: (response: IncomingMessage) => void): this; + once(event: 'socket', listener: (socket: Socket) => void): this; + once(event: 'timeout', listener: () => void): this; + once(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'drain', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'finish', listener: () => void): this; + once(event: 'pipe', listener: (src: stream.Readable) => void): this; + once(event: 'unpipe', listener: (src: stream.Readable) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'abort', listener: () => void): this; + prependListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + prependListener(event: 'continue', listener: () => void): this; + prependListener(event: 'information', listener: (info: InformationEvent) => void): this; + prependListener(event: 'response', listener: (response: IncomingMessage) => void): this; + prependListener(event: 'socket', listener: (socket: Socket) => void): this; + prependListener(event: 'timeout', listener: () => void): this; + prependListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'drain', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'finish', listener: () => void): this; + prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'abort', listener: () => void): this; + prependOnceListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + prependOnceListener(event: 'continue', listener: () => void): this; + prependOnceListener(event: 'information', listener: (info: InformationEvent) => void): this; + prependOnceListener(event: 'response', listener: (response: IncomingMessage) => void): this; + prependOnceListener(event: 'socket', listener: (socket: Socket) => void): this; + prependOnceListener(event: 'timeout', listener: () => void): this; + prependOnceListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'drain', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'finish', listener: () => void): this; + prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + /** + * An `IncomingMessage` object is created by {@link Server} or {@link ClientRequest} and passed as the first argument to the `'request'` and `'response'` event respectively. It may be used to + * access response + * status, headers and data. + * + * Different from its `socket` value which is a subclass of `stream.Duplex`, the`IncomingMessage` itself extends `stream.Readable` and is created separately to + * parse and emit the incoming HTTP headers and payload, as the underlying socket + * may be reused multiple times in case of keep-alive. + * @since v0.1.17 + */ + class IncomingMessage extends stream.Readable { + constructor(socket: Socket); + /** + * The `message.aborted` property will be `true` if the request has + * been aborted. + * @since v10.1.0 + */ + aborted: boolean; + /** + * In case of server request, the HTTP version sent by the client. In the case of + * client response, the HTTP version of the connected-to server. + * Probably either `'1.1'` or `'1.0'`. + * + * Also `message.httpVersionMajor` is the first integer and`message.httpVersionMinor` is the second. + * @since v0.1.1 + */ + httpVersion: string; + httpVersionMajor: number; + httpVersionMinor: number; + /** + * The `message.complete` property will be `true` if a complete HTTP message has + * been received and successfully parsed. + * + * This property is particularly useful as a means of determining if a client or + * server fully transmitted a message before a connection was terminated: + * + * ```js + * const req = http.request({ + * host: '127.0.0.1', + * port: 8080, + * method: 'POST' + * }, (res) => { + * res.resume(); + * res.on('end', () => { + * if (!res.complete) + * console.error( + * 'The connection was terminated while the message was still being sent'); + * }); + * }); + * ``` + * @since v0.3.0 + */ + complete: boolean; + /** + * Alias for `message.socket`. + * @since v0.1.90 + * @deprecated Since v16.0.0 - Use `socket`. + */ + connection: Socket; + /** + * The `net.Socket` object associated with the connection. + * + * With HTTPS support, use `request.socket.getPeerCertificate()` to obtain the + * client's authentication details. + * + * This property is guaranteed to be an instance of the `net.Socket` class, + * a subclass of `stream.Duplex`, unless the user specified a socket + * type other than `net.Socket`. + * @since v0.3.0 + */ + socket: Socket; + /** + * The request/response headers object. + * + * Key-value pairs of header names and values. Header names are lower-cased. + * + * ```js + * // Prints something like: + * // + * // { 'user-agent': 'curl/7.22.0', + * // host: '127.0.0.1:8000', + * // accept: '*' } + * console.log(request.headers); + * ``` + * + * Duplicates in raw headers are handled in the following ways, depending on the + * header name: + * + * * Duplicates of `age`, `authorization`, `content-length`, `content-type`,`etag`, `expires`, `from`, `host`, `if-modified-since`, `if-unmodified-since`,`last-modified`, `location`, + * `max-forwards`, `proxy-authorization`, `referer`,`retry-after`, `server`, or `user-agent` are discarded. + * * `set-cookie` is always an array. Duplicates are added to the array. + * * For duplicate `cookie` headers, the values are joined together with '; '. + * * For all other headers, the values are joined together with ', '. + * @since v0.1.5 + */ + headers: IncomingHttpHeaders; + /** + * The raw request/response headers list exactly as they were received. + * + * The keys and values are in the same list. It is _not_ a + * list of tuples. So, the even-numbered offsets are key values, and the + * odd-numbered offsets are the associated values. + * + * Header names are not lowercased, and duplicates are not merged. + * + * ```js + * // Prints something like: + * // + * // [ 'user-agent', + * // 'this is invalid because there can be only one', + * // 'User-Agent', + * // 'curl/7.22.0', + * // 'Host', + * // '127.0.0.1:8000', + * // 'ACCEPT', + * // '*' ] + * console.log(request.rawHeaders); + * ``` + * @since v0.11.6 + */ + rawHeaders: string[]; + /** + * The request/response trailers object. Only populated at the `'end'` event. + * @since v0.3.0 + */ + trailers: NodeJS.Dict; + /** + * The raw request/response trailer keys and values exactly as they were + * received. Only populated at the `'end'` event. + * @since v0.11.6 + */ + rawTrailers: string[]; + /** + * Calls `message.socket.setTimeout(msecs, callback)`. + * @since v0.5.9 + */ + setTimeout(msecs: number, callback?: () => void): this; + /** + * **Only valid for request obtained from {@link Server}.** + * + * The request method as a string. Read only. Examples: `'GET'`, `'DELETE'`. + * @since v0.1.1 + */ + method?: string | undefined; + /** + * **Only valid for request obtained from {@link Server}.** + * + * Request URL string. This contains only the URL that is present in the actual + * HTTP request. Take the following request: + * + * ```http + * GET /status?name=ryan HTTP/1.1 + * Accept: text/plain + * ``` + * + * To parse the URL into its parts: + * + * ```js + * new URL(request.url, `http://${request.headers.host}`); + * ``` + * + * When `request.url` is `'/status?name=ryan'` and`request.headers.host` is `'localhost:3000'`: + * + * ```console + * $ node + * > new URL(request.url, `http://${request.headers.host}`) + * URL { + * href: 'http://localhost:3000/status?name=ryan', + * origin: 'http://localhost:3000', + * protocol: 'http:', + * username: '', + * password: '', + * host: 'localhost:3000', + * hostname: 'localhost', + * port: '3000', + * pathname: '/status', + * search: '?name=ryan', + * searchParams: URLSearchParams { 'name' => 'ryan' }, + * hash: '' + * } + * ``` + * @since v0.1.90 + */ + url?: string | undefined; + /** + * **Only valid for response obtained from {@link ClientRequest}.** + * + * The 3-digit HTTP response status code. E.G. `404`. + * @since v0.1.1 + */ + statusCode?: number | undefined; + /** + * **Only valid for response obtained from {@link ClientRequest}.** + * + * The HTTP response status message (reason phrase). E.G. `OK` or `Internal Server Error`. + * @since v0.11.10 + */ + statusMessage?: string | undefined; + /** + * Calls `destroy()` on the socket that received the `IncomingMessage`. If `error`is provided, an `'error'` event is emitted on the socket and `error` is passed + * as an argument to any listeners on the event. + * @since v0.3.0 + */ + destroy(error?: Error): void; + } + interface AgentOptions { + /** + * Keep sockets around in a pool to be used by other requests in the future. Default = false + */ + keepAlive?: boolean | undefined; + /** + * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. + * Only relevant if keepAlive is set to true. + */ + keepAliveMsecs?: number | undefined; + /** + * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity + */ + maxSockets?: number | undefined; + /** + * Maximum number of sockets allowed for all hosts in total. Each request will use a new socket until the maximum is reached. Default: Infinity. + */ + maxTotalSockets?: number | undefined; + /** + * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256. + */ + maxFreeSockets?: number | undefined; + /** + * Socket timeout in milliseconds. This will set the timeout after the socket is connected. + */ + timeout?: number | undefined; + /** + * Scheduling strategy to apply when picking the next free socket to use. + * @default `lifo` + */ + scheduling?: 'fifo' | 'lifo' | undefined; + } + /** + * An `Agent` is responsible for managing connection persistence + * and reuse for HTTP clients. It maintains a queue of pending requests + * for a given host and port, reusing a single socket connection for each + * until the queue is empty, at which time the socket is either destroyed + * or put into a pool where it is kept to be used again for requests to the + * same host and port. Whether it is destroyed or pooled depends on the`keepAlive` `option`. + * + * Pooled connections have TCP Keep-Alive enabled for them, but servers may + * still close idle connections, in which case they will be removed from the + * pool and a new connection will be made when a new HTTP request is made for + * that host and port. Servers may also refuse to allow multiple requests + * over the same connection, in which case the connection will have to be + * remade for every request and cannot be pooled. The `Agent` will still make + * the requests to that server, but each one will occur over a new connection. + * + * When a connection is closed by the client or the server, it is removed + * from the pool. Any unused sockets in the pool will be unrefed so as not + * to keep the Node.js process running when there are no outstanding requests. + * (see `socket.unref()`). + * + * It is good practice, to `destroy()` an `Agent` instance when it is no + * longer in use, because unused sockets consume OS resources. + * + * Sockets are removed from an agent when the socket emits either + * a `'close'` event or an `'agentRemove'` event. When intending to keep one + * HTTP request open for a long time without keeping it in the agent, something + * like the following may be done: + * + * ```js + * http.get(options, (res) => { + * // Do stuff + * }).on('socket', (socket) => { + * socket.emit('agentRemove'); + * }); + * ``` + * + * An agent may also be used for an individual request. By providing`{agent: false}` as an option to the `http.get()` or `http.request()`functions, a one-time use `Agent` with default options + * will be used + * for the client connection. + * + * `agent:false`: + * + * ```js + * http.get({ + * hostname: 'localhost', + * port: 80, + * path: '/', + * agent: false // Create a new agent just for this one request + * }, (res) => { + * // Do stuff with response + * }); + * ``` + * @since v0.3.4 + */ + class Agent { + /** + * By default set to 256\. For agents with `keepAlive` enabled, this + * sets the maximum number of sockets that will be left open in the free + * state. + * @since v0.11.7 + */ + maxFreeSockets: number; + /** + * By default set to `Infinity`. Determines how many concurrent sockets the agent + * can have open per origin. Origin is the returned value of `agent.getName()`. + * @since v0.3.6 + */ + maxSockets: number; + /** + * By default set to `Infinity`. Determines how many concurrent sockets the agent + * can have open. Unlike `maxSockets`, this parameter applies across all origins. + * @since v14.5.0, v12.19.0 + */ + maxTotalSockets: number; + /** + * An object which contains arrays of sockets currently awaiting use by + * the agent when `keepAlive` is enabled. Do not modify. + * + * Sockets in the `freeSockets` list will be automatically destroyed and + * removed from the array on `'timeout'`. + * @since v0.11.4 + */ + readonly freeSockets: NodeJS.ReadOnlyDict; + /** + * An object which contains arrays of sockets currently in use by the + * agent. Do not modify. + * @since v0.3.6 + */ + readonly sockets: NodeJS.ReadOnlyDict; + /** + * An object which contains queues of requests that have not yet been assigned to + * sockets. Do not modify. + * @since v0.5.9 + */ + readonly requests: NodeJS.ReadOnlyDict; + constructor(opts?: AgentOptions); + /** + * Destroy any sockets that are currently in use by the agent. + * + * It is usually not necessary to do this. However, if using an + * agent with `keepAlive` enabled, then it is best to explicitly shut down + * the agent when it is no longer needed. Otherwise, + * sockets might stay open for quite a long time before the server + * terminates them. + * @since v0.11.4 + */ + destroy(): void; + } + const METHODS: string[]; + const STATUS_CODES: { + [errorCode: number]: string | undefined; + [errorCode: string]: string | undefined; + }; + /** + * Returns a new instance of {@link Server}. + * + * The `requestListener` is a function which is automatically + * added to the `'request'` event. + * @since v0.1.13 + */ + function createServer(requestListener?: RequestListener): Server; + function createServer(options: ServerOptions, requestListener?: RequestListener): Server; + // although RequestOptions are passed as ClientRequestArgs to ClientRequest directly, + // create interface RequestOptions would make the naming more clear to developers + interface RequestOptions extends ClientRequestArgs {} + /** + * Node.js maintains several connections per server to make HTTP requests. + * This function allows one to transparently issue requests. + * + * `url` can be a string or a `URL` object. If `url` is a + * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. + * + * If both `url` and `options` are specified, the objects are merged, with the`options` properties taking precedence. + * + * The optional `callback` parameter will be added as a one-time listener for + * the `'response'` event. + * + * `http.request()` returns an instance of the {@link ClientRequest} class. The `ClientRequest` instance is a writable stream. If one needs to + * upload a file with a POST request, then write to the `ClientRequest` object. + * + * ```js + * const http = require('http'); + * + * const postData = JSON.stringify({ + * 'msg': 'Hello World!' + * }); + * + * const options = { + * hostname: 'www.google.com', + * port: 80, + * path: '/upload', + * method: 'POST', + * headers: { + * 'Content-Type': 'application/json', + * 'Content-Length': Buffer.byteLength(postData) + * } + * }; + * + * const req = http.request(options, (res) => { + * console.log(`STATUS: ${res.statusCode}`); + * console.log(`HEADERS: ${JSON.stringify(res.headers)}`); + * res.setEncoding('utf8'); + * res.on('data', (chunk) => { + * console.log(`BODY: ${chunk}`); + * }); + * res.on('end', () => { + * console.log('No more data in response.'); + * }); + * }); + * + * req.on('error', (e) => { + * console.error(`problem with request: ${e.message}`); + * }); + * + * // Write data to request body + * req.write(postData); + * req.end(); + * ``` + * + * In the example `req.end()` was called. With `http.request()` one + * must always call `req.end()` to signify the end of the request - + * even if there is no data being written to the request body. + * + * If any error is encountered during the request (be that with DNS resolution, + * TCP level errors, or actual HTTP parse errors) an `'error'` event is emitted + * on the returned request object. As with all `'error'` events, if no listeners + * are registered the error will be thrown. + * + * There are a few special headers that should be noted. + * + * * Sending a 'Connection: keep-alive' will notify Node.js that the connection to + * the server should be persisted until the next request. + * * Sending a 'Content-Length' header will disable the default chunked encoding. + * * Sending an 'Expect' header will immediately send the request headers. + * Usually, when sending 'Expect: 100-continue', both a timeout and a listener + * for the `'continue'` event should be set. See RFC 2616 Section 8.2.3 for more + * information. + * * Sending an Authorization header will override using the `auth` option + * to compute basic authentication. + * + * Example using a `URL` as `options`: + * + * ```js + * const options = new URL('http://abc:xyz@example.com'); + * + * const req = http.request(options, (res) => { + * // ... + * }); + * ``` + * + * In a successful request, the following events will be emitted in the following + * order: + * + * * `'socket'` + * * `'response'` + * * `'data'` any number of times, on the `res` object + * (`'data'` will not be emitted at all if the response body is empty, for + * instance, in most redirects) + * * `'end'` on the `res` object + * * `'close'` + * + * In the case of a connection error, the following events will be emitted: + * + * * `'socket'` + * * `'error'` + * * `'close'` + * + * In the case of a premature connection close before the response is received, + * the following events will be emitted in the following order: + * + * * `'socket'` + * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'` + * * `'close'` + * + * In the case of a premature connection close after the response is received, + * the following events will be emitted in the following order: + * + * * `'socket'` + * * `'response'` + * * `'data'` any number of times, on the `res` object + * * (connection closed here) + * * `'aborted'` on the `res` object + * * `'error'` on the `res` object with an error with message`'Error: aborted'` and code `'ECONNRESET'`. + * * `'close'` + * * `'close'` on the `res` object + * + * If `req.destroy()` is called before a socket is assigned, the following + * events will be emitted in the following order: + * + * * (`req.destroy()` called here) + * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'` + * * `'close'` + * + * If `req.destroy()` is called before the connection succeeds, the following + * events will be emitted in the following order: + * + * * `'socket'` + * * (`req.destroy()` called here) + * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'` + * * `'close'` + * + * If `req.destroy()` is called after the response is received, the following + * events will be emitted in the following order: + * + * * `'socket'` + * * `'response'` + * * `'data'` any number of times, on the `res` object + * * (`req.destroy()` called here) + * * `'aborted'` on the `res` object + * * `'error'` on the `res` object with an error with message`'Error: aborted'` and code `'ECONNRESET'`. + * * `'close'` + * * `'close'` on the `res` object + * + * If `req.abort()` is called before a socket is assigned, the following + * events will be emitted in the following order: + * + * * (`req.abort()` called here) + * * `'abort'` + * * `'close'` + * + * If `req.abort()` is called before the connection succeeds, the following + * events will be emitted in the following order: + * + * * `'socket'` + * * (`req.abort()` called here) + * * `'abort'` + * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'` + * * `'close'` + * + * If `req.abort()` is called after the response is received, the following + * events will be emitted in the following order: + * + * * `'socket'` + * * `'response'` + * * `'data'` any number of times, on the `res` object + * * (`req.abort()` called here) + * * `'abort'` + * * `'aborted'` on the `res` object + * * `'error'` on the `res` object with an error with message`'Error: aborted'` and code `'ECONNRESET'`. + * * `'close'` + * * `'close'` on the `res` object + * + * Setting the `timeout` option or using the `setTimeout()` function will + * not abort the request or do anything besides add a `'timeout'` event. + * + * Passing an `AbortSignal` and then calling `abort` on the corresponding`AbortController` will behave the same way as calling `.destroy()` on the + * request itself. + * @since v0.3.6 + */ + function request(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; + function request(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest; + /** + * Since most requests are GET requests without bodies, Node.js provides this + * convenience method. The only difference between this method and {@link request} is that it sets the method to GET and calls `req.end()`automatically. The callback must take care to consume the + * response + * data for reasons stated in {@link ClientRequest} section. + * + * The `callback` is invoked with a single argument that is an instance of {@link IncomingMessage}. + * + * JSON fetching example: + * + * ```js + * http.get('http://localhost:8000/', (res) => { + * const { statusCode } = res; + * const contentType = res.headers['content-type']; + * + * let error; + * // Any 2xx status code signals a successful response but + * // here we're only checking for 200. + * if (statusCode !== 200) { + * error = new Error('Request Failed.\n' + + * `Status Code: ${statusCode}`); + * } else if (!/^application\/json/.test(contentType)) { + * error = new Error('Invalid content-type.\n' + + * `Expected application/json but received ${contentType}`); + * } + * if (error) { + * console.error(error.message); + * // Consume response data to free up memory + * res.resume(); + * return; + * } + * + * res.setEncoding('utf8'); + * let rawData = ''; + * res.on('data', (chunk) => { rawData += chunk; }); + * res.on('end', () => { + * try { + * const parsedData = JSON.parse(rawData); + * console.log(parsedData); + * } catch (e) { + * console.error(e.message); + * } + * }); + * }).on('error', (e) => { + * console.error(`Got error: ${e.message}`); + * }); + * + * // Create a local server to receive data from + * const server = http.createServer((req, res) => { + * res.writeHead(200, { 'Content-Type': 'application/json' }); + * res.end(JSON.stringify({ + * data: 'Hello World!' + * })); + * }); + * + * server.listen(8000); + * ``` + * @since v0.3.6 + * @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`. Properties that are inherited from the prototype are ignored. + */ + function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; + function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest; + let globalAgent: Agent; + /** + * Read-only property specifying the maximum allowed size of HTTP headers in bytes. + * Defaults to 16KB. Configurable using the `--max-http-header-size` CLI option. + */ + const maxHeaderSize: number; +} +declare module 'node:http' { + export * from 'http'; +} diff --git a/frontend/node_modules/@types/node/http2.d.ts b/frontend/node_modules/@types/node/http2.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3aa9497e0efa23186315c2efd428dd55955a6ff7 --- /dev/null +++ b/frontend/node_modules/@types/node/http2.d.ts @@ -0,0 +1,2100 @@ +/** + * The `http2` module provides an implementation of the [HTTP/2](https://tools.ietf.org/html/rfc7540) protocol. It + * can be accessed using: + * + * ```js + * const http2 = require('http2'); + * ``` + * @since v8.4.0 + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/http2.js) + */ +declare module 'http2' { + import EventEmitter = require('node:events'); + import * as fs from 'node:fs'; + import * as net from 'node:net'; + import * as stream from 'node:stream'; + import * as tls from 'node:tls'; + import * as url from 'node:url'; + import { IncomingHttpHeaders as Http1IncomingHttpHeaders, OutgoingHttpHeaders, IncomingMessage, ServerResponse } from 'node:http'; + export { OutgoingHttpHeaders } from 'node:http'; + export interface IncomingHttpStatusHeader { + ':status'?: number | undefined; + } + export interface IncomingHttpHeaders extends Http1IncomingHttpHeaders { + ':path'?: string | undefined; + ':method'?: string | undefined; + ':authority'?: string | undefined; + ':scheme'?: string | undefined; + } + // Http2Stream + export interface StreamPriorityOptions { + exclusive?: boolean | undefined; + parent?: number | undefined; + weight?: number | undefined; + silent?: boolean | undefined; + } + export interface StreamState { + localWindowSize?: number | undefined; + state?: number | undefined; + localClose?: number | undefined; + remoteClose?: number | undefined; + sumDependencyWeight?: number | undefined; + weight?: number | undefined; + } + export interface ServerStreamResponseOptions { + endStream?: boolean | undefined; + waitForTrailers?: boolean | undefined; + } + export interface StatOptions { + offset: number; + length: number; + } + export interface ServerStreamFileResponseOptions { + statCheck?(stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions): void | boolean; + waitForTrailers?: boolean | undefined; + offset?: number | undefined; + length?: number | undefined; + } + export interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions { + onError?(err: NodeJS.ErrnoException): void; + } + export interface Http2Stream extends stream.Duplex { + /** + * Set to `true` if the `Http2Stream` instance was aborted abnormally. When set, + * the `'aborted'` event will have been emitted. + * @since v8.4.0 + */ + readonly aborted: boolean; + /** + * This property shows the number of characters currently buffered to be written. + * See `net.Socket.bufferSize` for details. + * @since v11.2.0, v10.16.0 + */ + readonly bufferSize: number; + /** + * Set to `true` if the `Http2Stream` instance has been closed. + * @since v9.4.0 + */ + readonly closed: boolean; + /** + * Set to `true` if the `Http2Stream` instance has been destroyed and is no longer + * usable. + * @since v8.4.0 + */ + readonly destroyed: boolean; + /** + * Set the `true` if the `END_STREAM` flag was set in the request or response + * HEADERS frame received, indicating that no additional data should be received + * and the readable side of the `Http2Stream` will be closed. + * @since v10.11.0 + */ + readonly endAfterHeaders: boolean; + /** + * The numeric stream identifier of this `Http2Stream` instance. Set to `undefined`if the stream identifier has not yet been assigned. + * @since v8.4.0 + */ + readonly id?: number | undefined; + /** + * Set to `true` if the `Http2Stream` instance has not yet been assigned a + * numeric stream identifier. + * @since v9.4.0 + */ + readonly pending: boolean; + /** + * Set to the `RST_STREAM` `error code` reported when the `Http2Stream` is + * destroyed after either receiving an `RST_STREAM` frame from the connected peer, + * calling `http2stream.close()`, or `http2stream.destroy()`. Will be`undefined` if the `Http2Stream` has not been closed. + * @since v8.4.0 + */ + readonly rstCode: number; + /** + * An object containing the outbound headers sent for this `Http2Stream`. + * @since v9.5.0 + */ + readonly sentHeaders: OutgoingHttpHeaders; + /** + * An array of objects containing the outbound informational (additional) headers + * sent for this `Http2Stream`. + * @since v9.5.0 + */ + readonly sentInfoHeaders?: OutgoingHttpHeaders[] | undefined; + /** + * An object containing the outbound trailers sent for this `HttpStream`. + * @since v9.5.0 + */ + readonly sentTrailers?: OutgoingHttpHeaders | undefined; + /** + * A reference to the `Http2Session` instance that owns this `Http2Stream`. The + * value will be `undefined` after the `Http2Stream` instance is destroyed. + * @since v8.4.0 + */ + readonly session: Http2Session; + /** + * Provides miscellaneous information about the current state of the`Http2Stream`. + * + * A current state of this `Http2Stream`. + * @since v8.4.0 + */ + readonly state: StreamState; + /** + * Closes the `Http2Stream` instance by sending an `RST_STREAM` frame to the + * connected HTTP/2 peer. + * @since v8.4.0 + * @param [code=http2.constants.NGHTTP2_NO_ERROR] Unsigned 32-bit integer identifying the error code. + * @param callback An optional function registered to listen for the `'close'` event. + */ + close(code?: number, callback?: () => void): void; + /** + * Updates the priority for this `Http2Stream` instance. + * @since v8.4.0 + */ + priority(options: StreamPriorityOptions): void; + /** + * ```js + * const http2 = require('http2'); + * const client = http2.connect('http://example.org:8000'); + * const { NGHTTP2_CANCEL } = http2.constants; + * const req = client.request({ ':path': '/' }); + * + * // Cancel the stream if there's no activity after 5 seconds + * req.setTimeout(5000, () => req.close(NGHTTP2_CANCEL)); + * ``` + * @since v8.4.0 + */ + setTimeout(msecs: number, callback?: () => void): void; + /** + * Sends a trailing `HEADERS` frame to the connected HTTP/2 peer. This method + * will cause the `Http2Stream` to be immediately closed and must only be + * called after the `'wantTrailers'` event has been emitted. When sending a + * request or sending a response, the `options.waitForTrailers` option must be set + * in order to keep the `Http2Stream` open after the final `DATA` frame so that + * trailers can be sent. + * + * ```js + * const http2 = require('http2'); + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respond(undefined, { waitForTrailers: true }); + * stream.on('wantTrailers', () => { + * stream.sendTrailers({ xyz: 'abc' }); + * }); + * stream.end('Hello World'); + * }); + * ``` + * + * The HTTP/1 specification forbids trailers from containing HTTP/2 pseudo-header + * fields (e.g. `':method'`, `':path'`, etc). + * @since v10.0.0 + */ + sendTrailers(headers: OutgoingHttpHeaders): void; + addListener(event: 'aborted', listener: () => void): this; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'data', listener: (chunk: Buffer | string) => void): this; + addListener(event: 'drain', listener: () => void): this; + addListener(event: 'end', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'finish', listener: () => void): this; + addListener(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this; + addListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + addListener(event: 'streamClosed', listener: (code: number) => void): this; + addListener(event: 'timeout', listener: () => void): this; + addListener(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: 'wantTrailers', listener: () => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: 'aborted'): boolean; + emit(event: 'close'): boolean; + emit(event: 'data', chunk: Buffer | string): boolean; + emit(event: 'drain'): boolean; + emit(event: 'end'): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'finish'): boolean; + emit(event: 'frameError', frameType: number, errorCode: number): boolean; + emit(event: 'pipe', src: stream.Readable): boolean; + emit(event: 'unpipe', src: stream.Readable): boolean; + emit(event: 'streamClosed', code: number): boolean; + emit(event: 'timeout'): boolean; + emit(event: 'trailers', trailers: IncomingHttpHeaders, flags: number): boolean; + emit(event: 'wantTrailers'): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: 'aborted', listener: () => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'data', listener: (chunk: Buffer | string) => void): this; + on(event: 'drain', listener: () => void): this; + on(event: 'end', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'finish', listener: () => void): this; + on(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this; + on(event: 'pipe', listener: (src: stream.Readable) => void): this; + on(event: 'unpipe', listener: (src: stream.Readable) => void): this; + on(event: 'streamClosed', listener: (code: number) => void): this; + on(event: 'timeout', listener: () => void): this; + on(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + on(event: 'wantTrailers', listener: () => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: 'aborted', listener: () => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'data', listener: (chunk: Buffer | string) => void): this; + once(event: 'drain', listener: () => void): this; + once(event: 'end', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'finish', listener: () => void): this; + once(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this; + once(event: 'pipe', listener: (src: stream.Readable) => void): this; + once(event: 'unpipe', listener: (src: stream.Readable) => void): this; + once(event: 'streamClosed', listener: (code: number) => void): this; + once(event: 'timeout', listener: () => void): this; + once(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + once(event: 'wantTrailers', listener: () => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'aborted', listener: () => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'data', listener: (chunk: Buffer | string) => void): this; + prependListener(event: 'drain', listener: () => void): this; + prependListener(event: 'end', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'finish', listener: () => void): this; + prependListener(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this; + prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + prependListener(event: 'streamClosed', listener: (code: number) => void): this; + prependListener(event: 'timeout', listener: () => void): this; + prependListener(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: 'wantTrailers', listener: () => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'aborted', listener: () => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'data', listener: (chunk: Buffer | string) => void): this; + prependOnceListener(event: 'drain', listener: () => void): this; + prependOnceListener(event: 'end', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'finish', listener: () => void): this; + prependOnceListener(event: 'frameError', listener: (frameType: number, errorCode: number) => void): this; + prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + prependOnceListener(event: 'streamClosed', listener: (code: number) => void): this; + prependOnceListener(event: 'timeout', listener: () => void): this; + prependOnceListener(event: 'trailers', listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: 'wantTrailers', listener: () => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + export interface ClientHttp2Stream extends Http2Stream { + addListener(event: 'continue', listener: () => {}): this; + addListener(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + addListener(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: 'continue'): boolean; + emit(event: 'headers', headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; + emit(event: 'push', headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: 'response', headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: 'continue', listener: () => {}): this; + on(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + on(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: 'continue', listener: () => {}): this; + once(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + once(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'continue', listener: () => {}): this; + prependListener(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependListener(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'continue', listener: () => {}): this; + prependOnceListener(event: 'headers', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependOnceListener(event: 'push', listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: 'response', listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + export interface ServerHttp2Stream extends Http2Stream { + /** + * True if headers were sent, false otherwise (read-only). + * @since v8.4.0 + */ + readonly headersSent: boolean; + /** + * Read-only property mapped to the `SETTINGS_ENABLE_PUSH` flag of the remote + * client's most recent `SETTINGS` frame. Will be `true` if the remote peer + * accepts push streams, `false` otherwise. Settings are the same for every`Http2Stream` in the same `Http2Session`. + * @since v8.4.0 + */ + readonly pushAllowed: boolean; + /** + * Sends an additional informational `HEADERS` frame to the connected HTTP/2 peer. + * @since v8.4.0 + */ + additionalHeaders(headers: OutgoingHttpHeaders): void; + /** + * Initiates a push stream. The callback is invoked with the new `Http2Stream`instance created for the push stream passed as the second argument, or an`Error` passed as the first argument. + * + * ```js + * const http2 = require('http2'); + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respond({ ':status': 200 }); + * stream.pushStream({ ':path': '/' }, (err, pushStream, headers) => { + * if (err) throw err; + * pushStream.respond({ ':status': 200 }); + * pushStream.end('some pushed data'); + * }); + * stream.end('some data'); + * }); + * ``` + * + * Setting the weight of a push stream is not allowed in the `HEADERS` frame. Pass + * a `weight` value to `http2stream.priority` with the `silent` option set to`true` to enable server-side bandwidth balancing between concurrent streams. + * + * Calling `http2stream.pushStream()` from within a pushed stream is not permitted + * and will throw an error. + * @since v8.4.0 + * @param callback Callback that is called once the push stream has been initiated. + */ + pushStream(headers: OutgoingHttpHeaders, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void; + pushStream(headers: OutgoingHttpHeaders, options?: StreamPriorityOptions, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void; + /** + * ```js + * const http2 = require('http2'); + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respond({ ':status': 200 }); + * stream.end('some data'); + * }); + * ``` + * + * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event + * will be emitted immediately after queuing the last chunk of payload data to be + * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing + * header fields to the peer. + * + * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically + * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`. + * + * ```js + * const http2 = require('http2'); + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respond({ ':status': 200 }, { waitForTrailers: true }); + * stream.on('wantTrailers', () => { + * stream.sendTrailers({ ABC: 'some value to send' }); + * }); + * stream.end('some data'); + * }); + * ``` + * @since v8.4.0 + */ + respond(headers?: OutgoingHttpHeaders, options?: ServerStreamResponseOptions): void; + /** + * Initiates a response whose data is read from the given file descriptor. No + * validation is performed on the given file descriptor. If an error occurs while + * attempting to read data using the file descriptor, the `Http2Stream` will be + * closed using an `RST_STREAM` frame using the standard `INTERNAL_ERROR` code. + * + * When used, the `Http2Stream` object's `Duplex` interface will be closed + * automatically. + * + * ```js + * const http2 = require('http2'); + * const fs = require('fs'); + * + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * const fd = fs.openSync('/some/file', 'r'); + * + * const stat = fs.fstatSync(fd); + * const headers = { + * 'content-length': stat.size, + * 'last-modified': stat.mtime.toUTCString(), + * 'content-type': 'text/plain; charset=utf-8' + * }; + * stream.respondWithFD(fd, headers); + * stream.on('close', () => fs.closeSync(fd)); + * }); + * ``` + * + * The optional `options.statCheck` function may be specified to give user code + * an opportunity to set additional content headers based on the `fs.Stat` details + * of the given fd. If the `statCheck` function is provided, the`http2stream.respondWithFD()` method will perform an `fs.fstat()` call to + * collect details on the provided file descriptor. + * + * The `offset` and `length` options may be used to limit the response to a + * specific range subset. This can be used, for instance, to support HTTP Range + * requests. + * + * The file descriptor or `FileHandle` is not closed when the stream is closed, + * so it will need to be closed manually once it is no longer needed. + * Using the same file descriptor concurrently for multiple streams + * is not supported and may result in data loss. Re-using a file descriptor + * after a stream has finished is supported. + * + * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event + * will be emitted immediately after queuing the last chunk of payload data to be + * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing + * header fields to the peer. + * + * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically + * close when the final `DATA` frame is transmitted. User code _must_ call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`. + * + * ```js + * const http2 = require('http2'); + * const fs = require('fs'); + * + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * const fd = fs.openSync('/some/file', 'r'); + * + * const stat = fs.fstatSync(fd); + * const headers = { + * 'content-length': stat.size, + * 'last-modified': stat.mtime.toUTCString(), + * 'content-type': 'text/plain; charset=utf-8' + * }; + * stream.respondWithFD(fd, headers, { waitForTrailers: true }); + * stream.on('wantTrailers', () => { + * stream.sendTrailers({ ABC: 'some value to send' }); + * }); + * + * stream.on('close', () => fs.closeSync(fd)); + * }); + * ``` + * @since v8.4.0 + * @param fd A readable file descriptor. + */ + respondWithFD(fd: number | fs.promises.FileHandle, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptions): void; + /** + * Sends a regular file as the response. The `path` must specify a regular file + * or an `'error'` event will be emitted on the `Http2Stream` object. + * + * When used, the `Http2Stream` object's `Duplex` interface will be closed + * automatically. + * + * The optional `options.statCheck` function may be specified to give user code + * an opportunity to set additional content headers based on the `fs.Stat` details + * of the given file: + * + * If an error occurs while attempting to read the file data, the `Http2Stream`will be closed using an `RST_STREAM` frame using the standard `INTERNAL_ERROR`code. If the `onError` callback is + * defined, then it will be called. Otherwise + * the stream will be destroyed. + * + * Example using a file path: + * + * ```js + * const http2 = require('http2'); + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * function statCheck(stat, headers) { + * headers['last-modified'] = stat.mtime.toUTCString(); + * } + * + * function onError(err) { + * // stream.respond() can throw if the stream has been destroyed by + * // the other side. + * try { + * if (err.code === 'ENOENT') { + * stream.respond({ ':status': 404 }); + * } else { + * stream.respond({ ':status': 500 }); + * } + * } catch (err) { + * // Perform actual error handling. + * console.log(err); + * } + * stream.end(); + * } + * + * stream.respondWithFile('/some/file', + * { 'content-type': 'text/plain; charset=utf-8' }, + * { statCheck, onError }); + * }); + * ``` + * + * The `options.statCheck` function may also be used to cancel the send operation + * by returning `false`. For instance, a conditional request may check the stat + * results to determine if the file has been modified to return an appropriate`304` response: + * + * ```js + * const http2 = require('http2'); + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * function statCheck(stat, headers) { + * // Check the stat here... + * stream.respond({ ':status': 304 }); + * return false; // Cancel the send operation + * } + * stream.respondWithFile('/some/file', + * { 'content-type': 'text/plain; charset=utf-8' }, + * { statCheck }); + * }); + * ``` + * + * The `content-length` header field will be automatically set. + * + * The `offset` and `length` options may be used to limit the response to a + * specific range subset. This can be used, for instance, to support HTTP Range + * requests. + * + * The `options.onError` function may also be used to handle all the errors + * that could happen before the delivery of the file is initiated. The + * default behavior is to destroy the stream. + * + * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event + * will be emitted immediately after queuing the last chunk of payload data to be + * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing + * header fields to the peer. + * + * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically + * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`. + * + * ```js + * const http2 = require('http2'); + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respondWithFile('/some/file', + * { 'content-type': 'text/plain; charset=utf-8' }, + * { waitForTrailers: true }); + * stream.on('wantTrailers', () => { + * stream.sendTrailers({ ABC: 'some value to send' }); + * }); + * }); + * ``` + * @since v8.4.0 + */ + respondWithFile(path: string, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptionsWithError): void; + } + // Http2Session + export interface Settings { + headerTableSize?: number | undefined; + enablePush?: boolean | undefined; + initialWindowSize?: number | undefined; + maxFrameSize?: number | undefined; + maxConcurrentStreams?: number | undefined; + maxHeaderListSize?: number | undefined; + enableConnectProtocol?: boolean | undefined; + } + export interface ClientSessionRequestOptions { + endStream?: boolean | undefined; + exclusive?: boolean | undefined; + parent?: number | undefined; + weight?: number | undefined; + waitForTrailers?: boolean | undefined; + } + export interface SessionState { + effectiveLocalWindowSize?: number | undefined; + effectiveRecvDataLength?: number | undefined; + nextStreamID?: number | undefined; + localWindowSize?: number | undefined; + lastProcStreamID?: number | undefined; + remoteWindowSize?: number | undefined; + outboundQueueSize?: number | undefined; + deflateDynamicTableSize?: number | undefined; + inflateDynamicTableSize?: number | undefined; + } + export interface Http2Session extends EventEmitter { + /** + * Value will be `undefined` if the `Http2Session` is not yet connected to a + * socket, `h2c` if the `Http2Session` is not connected to a `TLSSocket`, or + * will return the value of the connected `TLSSocket`'s own `alpnProtocol`property. + * @since v9.4.0 + */ + readonly alpnProtocol?: string | undefined; + /** + * Will be `true` if this `Http2Session` instance has been closed, otherwise`false`. + * @since v9.4.0 + */ + readonly closed: boolean; + /** + * Will be `true` if this `Http2Session` instance is still connecting, will be set + * to `false` before emitting `connect` event and/or calling the `http2.connect`callback. + * @since v10.0.0 + */ + readonly connecting: boolean; + /** + * Will be `true` if this `Http2Session` instance has been destroyed and must no + * longer be used, otherwise `false`. + * @since v8.4.0 + */ + readonly destroyed: boolean; + /** + * Value is `undefined` if the `Http2Session` session socket has not yet been + * connected, `true` if the `Http2Session` is connected with a `TLSSocket`, + * and `false` if the `Http2Session` is connected to any other kind of socket + * or stream. + * @since v9.4.0 + */ + readonly encrypted?: boolean | undefined; + /** + * A prototype-less object describing the current local settings of this`Http2Session`. The local settings are local to _this_`Http2Session` instance. + * @since v8.4.0 + */ + readonly localSettings: Settings; + /** + * If the `Http2Session` is connected to a `TLSSocket`, the `originSet` property + * will return an `Array` of origins for which the `Http2Session` may be + * considered authoritative. + * + * The `originSet` property is only available when using a secure TLS connection. + * @since v9.4.0 + */ + readonly originSet?: string[] | undefined; + /** + * Indicates whether the `Http2Session` is currently waiting for acknowledgment of + * a sent `SETTINGS` frame. Will be `true` after calling the`http2session.settings()` method. Will be `false` once all sent `SETTINGS`frames have been acknowledged. + * @since v8.4.0 + */ + readonly pendingSettingsAck: boolean; + /** + * A prototype-less object describing the current remote settings of this`Http2Session`. The remote settings are set by the _connected_ HTTP/2 peer. + * @since v8.4.0 + */ + readonly remoteSettings: Settings; + /** + * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but + * limits available methods to ones safe to use with HTTP/2. + * + * `destroy`, `emit`, `end`, `pause`, `read`, `resume`, and `write` will throw + * an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for more information. + * + * `setTimeout` method will be called on this `Http2Session`. + * + * All other interactions will be routed directly to the socket. + * @since v8.4.0 + */ + readonly socket: net.Socket | tls.TLSSocket; + /** + * Provides miscellaneous information about the current state of the`Http2Session`. + * + * An object describing the current status of this `Http2Session`. + * @since v8.4.0 + */ + readonly state: SessionState; + /** + * The `http2session.type` will be equal to`http2.constants.NGHTTP2_SESSION_SERVER` if this `Http2Session` instance is a + * server, and `http2.constants.NGHTTP2_SESSION_CLIENT` if the instance is a + * client. + * @since v8.4.0 + */ + readonly type: number; + /** + * Gracefully closes the `Http2Session`, allowing any existing streams to + * complete on their own and preventing new `Http2Stream` instances from being + * created. Once closed, `http2session.destroy()`_might_ be called if there + * are no open `Http2Stream` instances. + * + * If specified, the `callback` function is registered as a handler for the`'close'` event. + * @since v9.4.0 + */ + close(callback?: () => void): void; + /** + * Immediately terminates the `Http2Session` and the associated `net.Socket` or`tls.TLSSocket`. + * + * Once destroyed, the `Http2Session` will emit the `'close'` event. If `error`is not undefined, an `'error'` event will be emitted immediately before the`'close'` event. + * + * If there are any remaining open `Http2Streams` associated with the`Http2Session`, those will also be destroyed. + * @since v8.4.0 + * @param error An `Error` object if the `Http2Session` is being destroyed due to an error. + * @param code The HTTP/2 error code to send in the final `GOAWAY` frame. If unspecified, and `error` is not undefined, the default is `INTERNAL_ERROR`, otherwise defaults to `NO_ERROR`. + */ + destroy(error?: Error, code?: number): void; + /** + * Transmits a `GOAWAY` frame to the connected peer _without_ shutting down the`Http2Session`. + * @since v9.4.0 + * @param code An HTTP/2 error code + * @param lastStreamID The numeric ID of the last processed `Http2Stream` + * @param opaqueData A `TypedArray` or `DataView` instance containing additional data to be carried within the `GOAWAY` frame. + */ + goaway(code?: number, lastStreamID?: number, opaqueData?: NodeJS.ArrayBufferView): void; + /** + * Sends a `PING` frame to the connected HTTP/2 peer. A `callback` function must + * be provided. The method will return `true` if the `PING` was sent, `false`otherwise. + * + * The maximum number of outstanding (unacknowledged) pings is determined by the`maxOutstandingPings` configuration option. The default maximum is 10. + * + * If provided, the `payload` must be a `Buffer`, `TypedArray`, or `DataView`containing 8 bytes of data that will be transmitted with the `PING` and + * returned with the ping acknowledgment. + * + * The callback will be invoked with three arguments: an error argument that will + * be `null` if the `PING` was successfully acknowledged, a `duration` argument + * that reports the number of milliseconds elapsed since the ping was sent and the + * acknowledgment was received, and a `Buffer` containing the 8-byte `PING`payload. + * + * ```js + * session.ping(Buffer.from('abcdefgh'), (err, duration, payload) => { + * if (!err) { + * console.log(`Ping acknowledged in ${duration} milliseconds`); + * console.log(`With payload '${payload.toString()}'`); + * } + * }); + * ``` + * + * If the `payload` argument is not specified, the default payload will be the + * 64-bit timestamp (little endian) marking the start of the `PING` duration. + * @since v8.9.3 + * @param payload Optional ping payload. + */ + ping(callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean; + ping(payload: NodeJS.ArrayBufferView, callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean; + /** + * Calls `ref()` on this `Http2Session`instance's underlying `net.Socket`. + * @since v9.4.0 + */ + ref(): void; + /** + * Sets the local endpoint's window size. + * The `windowSize` is the total window size to set, not + * the delta. + * + * ```js + * const http2 = require('http2'); + * + * const server = http2.createServer(); + * const expectedWindowSize = 2 ** 20; + * server.on('connect', (session) => { + * + * // Set local window size to be 2 ** 20 + * session.setLocalWindowSize(expectedWindowSize); + * }); + * ``` + * @since v15.3.0 + */ + setLocalWindowSize(windowSize: number): void; + /** + * Used to set a callback function that is called when there is no activity on + * the `Http2Session` after `msecs` milliseconds. The given `callback` is + * registered as a listener on the `'timeout'` event. + * @since v8.4.0 + */ + setTimeout(msecs: number, callback?: () => void): void; + /** + * Updates the current local settings for this `Http2Session` and sends a new`SETTINGS` frame to the connected HTTP/2 peer. + * + * Once called, the `http2session.pendingSettingsAck` property will be `true`while the session is waiting for the remote peer to acknowledge the new + * settings. + * + * The new settings will not become effective until the `SETTINGS` acknowledgment + * is received and the `'localSettings'` event is emitted. It is possible to send + * multiple `SETTINGS` frames while acknowledgment is still pending. + * @since v8.4.0 + * @param callback Callback that is called once the session is connected or right away if the session is already connected. + */ + settings(settings: Settings): void; + /** + * Calls `unref()` on this `Http2Session`instance's underlying `net.Socket`. + * @since v9.4.0 + */ + unref(): void; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this; + addListener(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + addListener(event: 'localSettings', listener: (settings: Settings) => void): this; + addListener(event: 'ping', listener: () => void): this; + addListener(event: 'remoteSettings', listener: (settings: Settings) => void): this; + addListener(event: 'timeout', listener: () => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: 'close'): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'frameError', frameType: number, errorCode: number, streamID: number): boolean; + emit(event: 'goaway', errorCode: number, lastStreamID: number, opaqueData: Buffer): boolean; + emit(event: 'localSettings', settings: Settings): boolean; + emit(event: 'ping'): boolean; + emit(event: 'remoteSettings', settings: Settings): boolean; + emit(event: 'timeout'): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: 'close', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this; + on(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + on(event: 'localSettings', listener: (settings: Settings) => void): this; + on(event: 'ping', listener: () => void): this; + on(event: 'remoteSettings', listener: (settings: Settings) => void): this; + on(event: 'timeout', listener: () => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this; + once(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + once(event: 'localSettings', listener: (settings: Settings) => void): this; + once(event: 'ping', listener: () => void): this; + once(event: 'remoteSettings', listener: (settings: Settings) => void): this; + once(event: 'timeout', listener: () => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this; + prependListener(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + prependListener(event: 'localSettings', listener: (settings: Settings) => void): this; + prependListener(event: 'ping', listener: () => void): this; + prependListener(event: 'remoteSettings', listener: (settings: Settings) => void): this; + prependListener(event: 'timeout', listener: () => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'frameError', listener: (frameType: number, errorCode: number, streamID: number) => void): this; + prependOnceListener(event: 'goaway', listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + prependOnceListener(event: 'localSettings', listener: (settings: Settings) => void): this; + prependOnceListener(event: 'ping', listener: () => void): this; + prependOnceListener(event: 'remoteSettings', listener: (settings: Settings) => void): this; + prependOnceListener(event: 'timeout', listener: () => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + export interface ClientHttp2Session extends Http2Session { + /** + * For HTTP/2 Client `Http2Session` instances only, the `http2session.request()`creates and returns an `Http2Stream` instance that can be used to send an + * HTTP/2 request to the connected server. + * + * This method is only available if `http2session.type` is equal to`http2.constants.NGHTTP2_SESSION_CLIENT`. + * + * ```js + * const http2 = require('http2'); + * const clientSession = http2.connect('https://localhost:1234'); + * const { + * HTTP2_HEADER_PATH, + * HTTP2_HEADER_STATUS + * } = http2.constants; + * + * const req = clientSession.request({ [HTTP2_HEADER_PATH]: '/' }); + * req.on('response', (headers) => { + * console.log(headers[HTTP2_HEADER_STATUS]); + * req.on('data', (chunk) => { // .. }); + * req.on('end', () => { // .. }); + * }); + * ``` + * + * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event + * is emitted immediately after queuing the last chunk of payload data to be sent. + * The `http2stream.sendTrailers()` method can then be called to send trailing + * headers to the peer. + * + * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically + * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`. + * + * When `options.signal` is set with an `AbortSignal` and then `abort` on the + * corresponding `AbortController` is called, the request will emit an `'error'`event with an `AbortError` error. + * + * The `:method` and `:path` pseudo-headers are not specified within `headers`, + * they respectively default to: + * + * * `:method` \= `'GET'` + * * `:path` \= `/` + * @since v8.4.0 + */ + request(headers?: OutgoingHttpHeaders, options?: ClientSessionRequestOptions): ClientHttp2Stream; + addListener(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this; + addListener(event: 'origin', listener: (origins: string[]) => void): this; + addListener(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + addListener(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: 'altsvc', alt: string, origin: string, stream: number): boolean; + emit(event: 'origin', origins: ReadonlyArray): boolean; + emit(event: 'connect', session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean; + emit(event: 'stream', stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this; + on(event: 'origin', listener: (origins: string[]) => void): this; + on(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + on(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this; + once(event: 'origin', listener: (origins: string[]) => void): this; + once(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + once(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this; + prependListener(event: 'origin', listener: (origins: string[]) => void): this; + prependListener(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependListener(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'altsvc', listener: (alt: string, origin: string, stream: number) => void): this; + prependOnceListener(event: 'origin', listener: (origins: string[]) => void): this; + prependOnceListener(event: 'connect', listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependOnceListener(event: 'stream', listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + export interface AlternativeServiceOptions { + origin: number | string | url.URL; + } + export interface ServerHttp2Session extends Http2Session { + readonly server: Http2Server | Http2SecureServer; + /** + * Submits an `ALTSVC` frame (as defined by [RFC 7838](https://tools.ietf.org/html/rfc7838)) to the connected client. + * + * ```js + * const http2 = require('http2'); + * + * const server = http2.createServer(); + * server.on('session', (session) => { + * // Set altsvc for origin https://example.org:80 + * session.altsvc('h2=":8000"', 'https://example.org:80'); + * }); + * + * server.on('stream', (stream) => { + * // Set altsvc for a specific stream + * stream.session.altsvc('h2=":8000"', stream.id); + * }); + * ``` + * + * Sending an `ALTSVC` frame with a specific stream ID indicates that the alternate + * service is associated with the origin of the given `Http2Stream`. + * + * The `alt` and origin string _must_ contain only ASCII bytes and are + * strictly interpreted as a sequence of ASCII bytes. The special value `'clear'`may be passed to clear any previously set alternative service for a given + * domain. + * + * When a string is passed for the `originOrStream` argument, it will be parsed as + * a URL and the origin will be derived. For instance, the origin for the + * HTTP URL `'https://example.org/foo/bar'` is the ASCII string`'https://example.org'`. An error will be thrown if either the given string + * cannot be parsed as a URL or if a valid origin cannot be derived. + * + * A `URL` object, or any object with an `origin` property, may be passed as`originOrStream`, in which case the value of the `origin` property will be + * used. The value of the `origin` property _must_ be a properly serialized + * ASCII origin. + * @since v9.4.0 + * @param alt A description of the alternative service configuration as defined by `RFC 7838`. + * @param originOrStream Either a URL string specifying the origin (or an `Object` with an `origin` property) or the numeric identifier of an active `Http2Stream` as given by the + * `http2stream.id` property. + */ + altsvc(alt: string, originOrStream: number | string | url.URL | AlternativeServiceOptions): void; + /** + * Submits an `ORIGIN` frame (as defined by [RFC 8336](https://tools.ietf.org/html/rfc8336)) to the connected client + * to advertise the set of origins for which the server is capable of providing + * authoritative responses. + * + * ```js + * const http2 = require('http2'); + * const options = getSecureOptionsSomehow(); + * const server = http2.createSecureServer(options); + * server.on('stream', (stream) => { + * stream.respond(); + * stream.end('ok'); + * }); + * server.on('session', (session) => { + * session.origin('https://example.com', 'https://example.org'); + * }); + * ``` + * + * When a string is passed as an `origin`, it will be parsed as a URL and the + * origin will be derived. For instance, the origin for the HTTP URL`'https://example.org/foo/bar'` is the ASCII string`'https://example.org'`. An error will be thrown if either the given + * string + * cannot be parsed as a URL or if a valid origin cannot be derived. + * + * A `URL` object, or any object with an `origin` property, may be passed as + * an `origin`, in which case the value of the `origin` property will be + * used. The value of the `origin` property _must_ be a properly serialized + * ASCII origin. + * + * Alternatively, the `origins` option may be used when creating a new HTTP/2 + * server using the `http2.createSecureServer()` method: + * + * ```js + * const http2 = require('http2'); + * const options = getSecureOptionsSomehow(); + * options.origins = ['https://example.com', 'https://example.org']; + * const server = http2.createSecureServer(options); + * server.on('stream', (stream) => { + * stream.respond(); + * stream.end('ok'); + * }); + * ``` + * @since v10.12.0 + * @param origins One or more URL Strings passed as separate arguments. + */ + origin( + ...origins: Array< + | string + | url.URL + | { + origin: string; + } + > + ): void; + addListener(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + addListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: 'connect', session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket): boolean; + emit(event: 'stream', stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + on(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + once(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'connect', listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependOnceListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + // Http2Server + export interface SessionOptions { + maxDeflateDynamicTableSize?: number | undefined; + maxSessionMemory?: number | undefined; + maxHeaderListPairs?: number | undefined; + maxOutstandingPings?: number | undefined; + maxSendHeaderBlockLength?: number | undefined; + paddingStrategy?: number | undefined; + peerMaxConcurrentStreams?: number | undefined; + settings?: Settings | undefined; + /** + * Specifies a timeout in milliseconds that + * a server should wait when an [`'unknownProtocol'`][] is emitted. If the + * socket has not been destroyed by that time the server will destroy it. + * @default 100000 + */ + unknownProtocolTimeout?: number | undefined; + selectPadding?(frameLen: number, maxFrameLen: number): number; + createConnection?(authority: url.URL, option: SessionOptions): stream.Duplex; + } + export interface ClientSessionOptions extends SessionOptions { + maxReservedRemoteStreams?: number | undefined; + createConnection?: ((authority: url.URL, option: SessionOptions) => stream.Duplex) | undefined; + protocol?: 'http:' | 'https:' | undefined; + } + export interface ServerSessionOptions extends SessionOptions { + Http1IncomingMessage?: typeof IncomingMessage | undefined; + Http1ServerResponse?: typeof ServerResponse | undefined; + Http2ServerRequest?: typeof Http2ServerRequest | undefined; + Http2ServerResponse?: typeof Http2ServerResponse | undefined; + } + export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions {} + export interface SecureServerSessionOptions extends ServerSessionOptions, tls.TlsOptions {} + export interface ServerOptions extends ServerSessionOptions {} + export interface SecureServerOptions extends SecureServerSessionOptions { + allowHTTP1?: boolean | undefined; + origins?: string[] | undefined; + } + interface HTTP2ServerCommon { + setTimeout(msec?: number, callback?: () => void): this; + /** + * Throws ERR_HTTP2_INVALID_SETTING_VALUE for invalid settings values. + * Throws ERR_INVALID_ARG_TYPE for invalid settings argument. + */ + updateSettings(settings: Settings): void; + } + export interface Http2Server extends net.Server, HTTP2ServerCommon { + addListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: 'session', listener: (session: ServerHttp2Session) => void): this; + addListener(event: 'sessionError', listener: (err: Error) => void): this; + addListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: 'timeout', listener: () => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: 'checkContinue', request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: 'request', request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: 'session', session: ServerHttp2Session): boolean; + emit(event: 'sessionError', err: Error): boolean; + emit(event: 'stream', stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: 'timeout'): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: 'session', listener: (session: ServerHttp2Session) => void): this; + on(event: 'sessionError', listener: (err: Error) => void): this; + on(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: 'timeout', listener: () => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: 'session', listener: (session: ServerHttp2Session) => void): this; + once(event: 'sessionError', listener: (err: Error) => void): this; + once(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: 'timeout', listener: () => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: 'session', listener: (session: ServerHttp2Session) => void): this; + prependListener(event: 'sessionError', listener: (err: Error) => void): this; + prependListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: 'timeout', listener: () => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: 'session', listener: (session: ServerHttp2Session) => void): this; + prependOnceListener(event: 'sessionError', listener: (err: Error) => void): this; + prependOnceListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: 'timeout', listener: () => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + export interface Http2SecureServer extends tls.Server, HTTP2ServerCommon { + addListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: 'session', listener: (session: ServerHttp2Session) => void): this; + addListener(event: 'sessionError', listener: (err: Error) => void): this; + addListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: 'timeout', listener: () => void): this; + addListener(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: 'checkContinue', request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: 'request', request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: 'session', session: ServerHttp2Session): boolean; + emit(event: 'sessionError', err: Error): boolean; + emit(event: 'stream', stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: 'timeout'): boolean; + emit(event: 'unknownProtocol', socket: tls.TLSSocket): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: 'session', listener: (session: ServerHttp2Session) => void): this; + on(event: 'sessionError', listener: (err: Error) => void): this; + on(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: 'timeout', listener: () => void): this; + on(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: 'session', listener: (session: ServerHttp2Session) => void): this; + once(event: 'sessionError', listener: (err: Error) => void): this; + once(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: 'timeout', listener: () => void): this; + once(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: 'session', listener: (session: ServerHttp2Session) => void): this; + prependListener(event: 'sessionError', listener: (err: Error) => void): this; + prependListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: 'timeout', listener: () => void): this; + prependListener(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'checkContinue', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: 'request', listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: 'session', listener: (session: ServerHttp2Session) => void): this; + prependOnceListener(event: 'sessionError', listener: (err: Error) => void): this; + prependOnceListener(event: 'stream', listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: 'timeout', listener: () => void): this; + prependOnceListener(event: 'unknownProtocol', listener: (socket: tls.TLSSocket) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + /** + * A `Http2ServerRequest` object is created by {@link Server} or {@link SecureServer} and passed as the first argument to the `'request'` event. It may be used to access a request status, + * headers, and + * data. + * @since v8.4.0 + */ + export class Http2ServerRequest extends stream.Readable { + constructor(stream: ServerHttp2Stream, headers: IncomingHttpHeaders, options: stream.ReadableOptions, rawHeaders: ReadonlyArray); + /** + * The `request.aborted` property will be `true` if the request has + * been aborted. + * @since v10.1.0 + */ + readonly aborted: boolean; + /** + * The request authority pseudo header field. Because HTTP/2 allows requests + * to set either `:authority` or `host`, this value is derived from`req.headers[':authority']` if present. Otherwise, it is derived from`req.headers['host']`. + * @since v8.4.0 + */ + readonly authority: string; + /** + * See `request.socket`. + * @since v8.4.0 + * @deprecated Since v13.0.0 - Use `socket`. + */ + readonly connection: net.Socket | tls.TLSSocket; + /** + * The `request.complete` property will be `true` if the request has + * been completed, aborted, or destroyed. + * @since v12.10.0 + */ + readonly complete: boolean; + /** + * The request/response headers object. + * + * Key-value pairs of header names and values. Header names are lower-cased. + * + * ```js + * // Prints something like: + * // + * // { 'user-agent': 'curl/7.22.0', + * // host: '127.0.0.1:8000', + * // accept: '*' } + * console.log(request.headers); + * ``` + * + * See `HTTP/2 Headers Object`. + * + * In HTTP/2, the request path, host name, protocol, and method are represented as + * special headers prefixed with the `:` character (e.g. `':path'`). These special + * headers will be included in the `request.headers` object. Care must be taken not + * to inadvertently modify these special headers or errors may occur. For instance, + * removing all headers from the request will cause errors to occur: + * + * ```js + * removeAllHeaders(request.headers); + * assert(request.url); // Fails because the :path header has been removed + * ``` + * @since v8.4.0 + */ + readonly headers: IncomingHttpHeaders; + /** + * In case of server request, the HTTP version sent by the client. In the case of + * client response, the HTTP version of the connected-to server. Returns`'2.0'`. + * + * Also `message.httpVersionMajor` is the first integer and`message.httpVersionMinor` is the second. + * @since v8.4.0 + */ + readonly httpVersion: string; + readonly httpVersionMinor: number; + readonly httpVersionMajor: number; + /** + * The request method as a string. Read-only. Examples: `'GET'`, `'DELETE'`. + * @since v8.4.0 + */ + readonly method: string; + /** + * The raw request/response headers list exactly as they were received. + * + * The keys and values are in the same list. It is _not_ a + * list of tuples. So, the even-numbered offsets are key values, and the + * odd-numbered offsets are the associated values. + * + * Header names are not lowercased, and duplicates are not merged. + * + * ```js + * // Prints something like: + * // + * // [ 'user-agent', + * // 'this is invalid because there can be only one', + * // 'User-Agent', + * // 'curl/7.22.0', + * // 'Host', + * // '127.0.0.1:8000', + * // 'ACCEPT', + * // '*' ] + * console.log(request.rawHeaders); + * ``` + * @since v8.4.0 + */ + readonly rawHeaders: string[]; + /** + * The raw request/response trailer keys and values exactly as they were + * received. Only populated at the `'end'` event. + * @since v8.4.0 + */ + readonly rawTrailers: string[]; + /** + * The request scheme pseudo header field indicating the scheme + * portion of the target URL. + * @since v8.4.0 + */ + readonly scheme: string; + /** + * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but + * applies getters, setters, and methods based on HTTP/2 logic. + * + * `destroyed`, `readable`, and `writable` properties will be retrieved from and + * set on `request.stream`. + * + * `destroy`, `emit`, `end`, `on` and `once` methods will be called on`request.stream`. + * + * `setTimeout` method will be called on `request.stream.session`. + * + * `pause`, `read`, `resume`, and `write` will throw an error with code`ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for + * more information. + * + * All other interactions will be routed directly to the socket. With TLS support, + * use `request.socket.getPeerCertificate()` to obtain the client's + * authentication details. + * @since v8.4.0 + */ + readonly socket: net.Socket | tls.TLSSocket; + /** + * The `Http2Stream` object backing the request. + * @since v8.4.0 + */ + readonly stream: ServerHttp2Stream; + /** + * The request/response trailers object. Only populated at the `'end'` event. + * @since v8.4.0 + */ + readonly trailers: IncomingHttpHeaders; + /** + * Request URL string. This contains only the URL that is present in the actual + * HTTP request. If the request is: + * + * ```http + * GET /status?name=ryan HTTP/1.1 + * Accept: text/plain + * ``` + * + * Then `request.url` will be: + * + * ```js + * '/status?name=ryan' + * ``` + * + * To parse the url into its parts, `new URL()` can be used: + * + * ```console + * $ node + * > new URL('/status?name=ryan', 'http://example.com') + * URL { + * href: 'http://example.com/status?name=ryan', + * origin: 'http://example.com', + * protocol: 'http:', + * username: '', + * password: '', + * host: 'example.com', + * hostname: 'example.com', + * port: '', + * pathname: '/status', + * search: '?name=ryan', + * searchParams: URLSearchParams { 'name' => 'ryan' }, + * hash: '' + * } + * ``` + * @since v8.4.0 + */ + readonly url: string; + /** + * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is + * provided, then it is added as a listener on the `'timeout'` event on + * the response object. + * + * If no `'timeout'` listener is added to the request, the response, or + * the server, then `Http2Stream` s are destroyed when they time out. If a + * handler is assigned to the request, the response, or the server's `'timeout'`events, timed out sockets must be handled explicitly. + * @since v8.4.0 + */ + setTimeout(msecs: number, callback?: () => void): void; + read(size?: number): Buffer | string | null; + addListener(event: 'aborted', listener: (hadError: boolean, code: number) => void): this; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'data', listener: (chunk: Buffer | string) => void): this; + addListener(event: 'end', listener: () => void): this; + addListener(event: 'readable', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: 'aborted', hadError: boolean, code: number): boolean; + emit(event: 'close'): boolean; + emit(event: 'data', chunk: Buffer | string): boolean; + emit(event: 'end'): boolean; + emit(event: 'readable'): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: 'aborted', listener: (hadError: boolean, code: number) => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'data', listener: (chunk: Buffer | string) => void): this; + on(event: 'end', listener: () => void): this; + on(event: 'readable', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: 'aborted', listener: (hadError: boolean, code: number) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'data', listener: (chunk: Buffer | string) => void): this; + once(event: 'end', listener: () => void): this; + once(event: 'readable', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'aborted', listener: (hadError: boolean, code: number) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'data', listener: (chunk: Buffer | string) => void): this; + prependListener(event: 'end', listener: () => void): this; + prependListener(event: 'readable', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'aborted', listener: (hadError: boolean, code: number) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'data', listener: (chunk: Buffer | string) => void): this; + prependOnceListener(event: 'end', listener: () => void): this; + prependOnceListener(event: 'readable', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + /** + * This object is created internally by an HTTP server, not by the user. It is + * passed as the second parameter to the `'request'` event. + * @since v8.4.0 + */ + export class Http2ServerResponse extends stream.Writable { + constructor(stream: ServerHttp2Stream); + /** + * See `response.socket`. + * @since v8.4.0 + * @deprecated Since v13.0.0 - Use `socket`. + */ + readonly connection: net.Socket | tls.TLSSocket; + /** + * Boolean value that indicates whether the response has completed. Starts + * as `false`. After `response.end()` executes, the value will be `true`. + * @since v8.4.0 + * @deprecated Since v13.4.0,v12.16.0 - Use `writableEnded`. + */ + readonly finished: boolean; + /** + * True if headers were sent, false otherwise (read-only). + * @since v8.4.0 + */ + readonly headersSent: boolean; + /** + * A reference to the original HTTP2 request object. + * @since v15.7.0 + */ + readonly req: Http2ServerRequest; + /** + * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but + * applies getters, setters, and methods based on HTTP/2 logic. + * + * `destroyed`, `readable`, and `writable` properties will be retrieved from and + * set on `response.stream`. + * + * `destroy`, `emit`, `end`, `on` and `once` methods will be called on`response.stream`. + * + * `setTimeout` method will be called on `response.stream.session`. + * + * `pause`, `read`, `resume`, and `write` will throw an error with code`ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for + * more information. + * + * All other interactions will be routed directly to the socket. + * + * ```js + * const http2 = require('http2'); + * const server = http2.createServer((req, res) => { + * const ip = req.socket.remoteAddress; + * const port = req.socket.remotePort; + * res.end(`Your IP address is ${ip} and your source port is ${port}.`); + * }).listen(3000); + * ``` + * @since v8.4.0 + */ + readonly socket: net.Socket | tls.TLSSocket; + /** + * The `Http2Stream` object backing the response. + * @since v8.4.0 + */ + readonly stream: ServerHttp2Stream; + /** + * When true, the Date header will be automatically generated and sent in + * the response if it is not already present in the headers. Defaults to true. + * + * This should only be disabled for testing; HTTP requires the Date header + * in responses. + * @since v8.4.0 + */ + sendDate: boolean; + /** + * When using implicit headers (not calling `response.writeHead()` explicitly), + * this property controls the status code that will be sent to the client when + * the headers get flushed. + * + * ```js + * response.statusCode = 404; + * ``` + * + * After response header was sent to the client, this property indicates the + * status code which was sent out. + * @since v8.4.0 + */ + statusCode: number; + /** + * Status message is not supported by HTTP/2 (RFC 7540 8.1.2.4). It returns + * an empty string. + * @since v8.4.0 + */ + statusMessage: ''; + /** + * This method adds HTTP trailing headers (a header but at the end of the + * message) to the response. + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * @since v8.4.0 + */ + addTrailers(trailers: OutgoingHttpHeaders): void; + /** + * This method signals to the server that all of the response headers and body + * have been sent; that server should consider this message complete. + * The method, `response.end()`, MUST be called on each response. + * + * If `data` is specified, it is equivalent to calling `response.write(data, encoding)` followed by `response.end(callback)`. + * + * If `callback` is specified, it will be called when the response stream + * is finished. + * @since v8.4.0 + */ + end(callback?: () => void): void; + end(data: string | Uint8Array, callback?: () => void): void; + end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void): void; + /** + * Reads out a header that has already been queued but not sent to the client. + * The name is case-insensitive. + * + * ```js + * const contentType = response.getHeader('content-type'); + * ``` + * @since v8.4.0 + */ + getHeader(name: string): string; + /** + * Returns an array containing the unique names of the current outgoing headers. + * All header names are lowercase. + * + * ```js + * response.setHeader('Foo', 'bar'); + * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); + * + * const headerNames = response.getHeaderNames(); + * // headerNames === ['foo', 'set-cookie'] + * ``` + * @since v8.4.0 + */ + getHeaderNames(): string[]; + /** + * Returns a shallow copy of the current outgoing headers. Since a shallow copy + * is used, array values may be mutated without additional calls to various + * header-related http module methods. The keys of the returned object are the + * header names and the values are the respective header values. All header names + * are lowercase. + * + * The object returned by the `response.getHeaders()` method _does not_prototypically inherit from the JavaScript `Object`. This means that typical`Object` methods such as `obj.toString()`, + * `obj.hasOwnProperty()`, and others + * are not defined and _will not work_. + * + * ```js + * response.setHeader('Foo', 'bar'); + * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); + * + * const headers = response.getHeaders(); + * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] } + * ``` + * @since v8.4.0 + */ + getHeaders(): OutgoingHttpHeaders; + /** + * Returns `true` if the header identified by `name` is currently set in the + * outgoing headers. The header name matching is case-insensitive. + * + * ```js + * const hasContentType = response.hasHeader('content-type'); + * ``` + * @since v8.4.0 + */ + hasHeader(name: string): boolean; + /** + * Removes a header that has been queued for implicit sending. + * + * ```js + * response.removeHeader('Content-Encoding'); + * ``` + * @since v8.4.0 + */ + removeHeader(name: string): void; + /** + * Sets a single header value for implicit headers. If this header already exists + * in the to-be-sent headers, its value will be replaced. Use an array of strings + * here to send multiple headers with the same name. + * + * ```js + * response.setHeader('Content-Type', 'text/html; charset=utf-8'); + * ``` + * + * or + * + * ```js + * response.setHeader('Set-Cookie', ['type=ninja', 'language=javascript']); + * ``` + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * + * When headers have been set with `response.setHeader()`, they will be merged + * with any headers passed to `response.writeHead()`, with the headers passed + * to `response.writeHead()` given precedence. + * + * ```js + * // Returns content-type = text/plain + * const server = http2.createServer((req, res) => { + * res.setHeader('Content-Type', 'text/html; charset=utf-8'); + * res.setHeader('X-Foo', 'bar'); + * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' }); + * res.end('ok'); + * }); + * ``` + * @since v8.4.0 + */ + setHeader(name: string, value: number | string | ReadonlyArray): void; + /** + * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is + * provided, then it is added as a listener on the `'timeout'` event on + * the response object. + * + * If no `'timeout'` listener is added to the request, the response, or + * the server, then `Http2Stream` s are destroyed when they time out. If a + * handler is assigned to the request, the response, or the server's `'timeout'`events, timed out sockets must be handled explicitly. + * @since v8.4.0 + */ + setTimeout(msecs: number, callback?: () => void): void; + /** + * If this method is called and `response.writeHead()` has not been called, + * it will switch to implicit header mode and flush the implicit headers. + * + * This sends a chunk of the response body. This method may + * be called multiple times to provide successive parts of the body. + * + * In the `http` module, the response body is omitted when the + * request is a HEAD request. Similarly, the `204` and `304` responses_must not_ include a message body. + * + * `chunk` can be a string or a buffer. If `chunk` is a string, + * the second parameter specifies how to encode it into a byte stream. + * By default the `encoding` is `'utf8'`. `callback` will be called when this chunk + * of data is flushed. + * + * This is the raw HTTP body and has nothing to do with higher-level multi-part + * body encodings that may be used. + * + * The first time `response.write()` is called, it will send the buffered + * header information and the first chunk of the body to the client. The second + * time `response.write()` is called, Node.js assumes data will be streamed, + * and sends the new data separately. That is, the response is buffered up to the + * first chunk of the body. + * + * Returns `true` if the entire data was flushed successfully to the kernel + * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is free again. + * @since v8.4.0 + */ + write(chunk: string | Uint8Array, callback?: (err: Error) => void): boolean; + write(chunk: string | Uint8Array, encoding: BufferEncoding, callback?: (err: Error) => void): boolean; + /** + * Sends a status `100 Continue` to the client, indicating that the request body + * should be sent. See the `'checkContinue'` event on `Http2Server` and`Http2SecureServer`. + * @since v8.4.0 + */ + writeContinue(): void; + /** + * Sends a response header to the request. The status code is a 3-digit HTTP + * status code, like `404`. The last argument, `headers`, are the response headers. + * + * Returns a reference to the `Http2ServerResponse`, so that calls can be chained. + * + * For compatibility with `HTTP/1`, a human-readable `statusMessage` may be + * passed as the second argument. However, because the `statusMessage` has no + * meaning within HTTP/2, the argument will have no effect and a process warning + * will be emitted. + * + * ```js + * const body = 'hello world'; + * response.writeHead(200, { + * 'Content-Length': Buffer.byteLength(body), + * 'Content-Type': 'text/plain; charset=utf-8', + * }); + * ``` + * + * `Content-Length` is given in bytes not characters. The`Buffer.byteLength()` API may be used to determine the number of bytes in a + * given encoding. On outbound messages, Node.js does not check if Content-Length + * and the length of the body being transmitted are equal or not. However, when + * receiving messages, Node.js will automatically reject messages when the`Content-Length` does not match the actual payload size. + * + * This method may be called at most one time on a message before `response.end()` is called. + * + * If `response.write()` or `response.end()` are called before calling + * this, the implicit/mutable headers will be calculated and call this function. + * + * When headers have been set with `response.setHeader()`, they will be merged + * with any headers passed to `response.writeHead()`, with the headers passed + * to `response.writeHead()` given precedence. + * + * ```js + * // Returns content-type = text/plain + * const server = http2.createServer((req, res) => { + * res.setHeader('Content-Type', 'text/html; charset=utf-8'); + * res.setHeader('X-Foo', 'bar'); + * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' }); + * res.end('ok'); + * }); + * ``` + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * @since v8.4.0 + */ + writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this; + writeHead(statusCode: number, statusMessage: string, headers?: OutgoingHttpHeaders): this; + /** + * Call `http2stream.pushStream()` with the given headers, and wrap the + * given `Http2Stream` on a newly created `Http2ServerResponse` as the callback + * parameter if successful. When `Http2ServerRequest` is closed, the callback is + * called with an error `ERR_HTTP2_INVALID_STREAM`. + * @since v8.4.0 + * @param headers An object describing the headers + * @param callback Called once `http2stream.pushStream()` is finished, or either when the attempt to create the pushed `Http2Stream` has failed or has been rejected, or the state of + * `Http2ServerRequest` is closed prior to calling the `http2stream.pushStream()` method + */ + createPushResponse(headers: OutgoingHttpHeaders, callback: (err: Error | null, res: Http2ServerResponse) => void): void; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'drain', listener: () => void): this; + addListener(event: 'error', listener: (error: Error) => void): this; + addListener(event: 'finish', listener: () => void): this; + addListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: 'close'): boolean; + emit(event: 'drain'): boolean; + emit(event: 'error', error: Error): boolean; + emit(event: 'finish'): boolean; + emit(event: 'pipe', src: stream.Readable): boolean; + emit(event: 'unpipe', src: stream.Readable): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: 'close', listener: () => void): this; + on(event: 'drain', listener: () => void): this; + on(event: 'error', listener: (error: Error) => void): this; + on(event: 'finish', listener: () => void): this; + on(event: 'pipe', listener: (src: stream.Readable) => void): this; + on(event: 'unpipe', listener: (src: stream.Readable) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'drain', listener: () => void): this; + once(event: 'error', listener: (error: Error) => void): this; + once(event: 'finish', listener: () => void): this; + once(event: 'pipe', listener: (src: stream.Readable) => void): this; + once(event: 'unpipe', listener: (src: stream.Readable) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'drain', listener: () => void): this; + prependListener(event: 'error', listener: (error: Error) => void): this; + prependListener(event: 'finish', listener: () => void): this; + prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'drain', listener: () => void): this; + prependOnceListener(event: 'error', listener: (error: Error) => void): this; + prependOnceListener(event: 'finish', listener: () => void): this; + prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this; + prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + export namespace constants { + const NGHTTP2_SESSION_SERVER: number; + const NGHTTP2_SESSION_CLIENT: number; + const NGHTTP2_STREAM_STATE_IDLE: number; + const NGHTTP2_STREAM_STATE_OPEN: number; + const NGHTTP2_STREAM_STATE_RESERVED_LOCAL: number; + const NGHTTP2_STREAM_STATE_RESERVED_REMOTE: number; + const NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL: number; + const NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE: number; + const NGHTTP2_STREAM_STATE_CLOSED: number; + const NGHTTP2_NO_ERROR: number; + const NGHTTP2_PROTOCOL_ERROR: number; + const NGHTTP2_INTERNAL_ERROR: number; + const NGHTTP2_FLOW_CONTROL_ERROR: number; + const NGHTTP2_SETTINGS_TIMEOUT: number; + const NGHTTP2_STREAM_CLOSED: number; + const NGHTTP2_FRAME_SIZE_ERROR: number; + const NGHTTP2_REFUSED_STREAM: number; + const NGHTTP2_CANCEL: number; + const NGHTTP2_COMPRESSION_ERROR: number; + const NGHTTP2_CONNECT_ERROR: number; + const NGHTTP2_ENHANCE_YOUR_CALM: number; + const NGHTTP2_INADEQUATE_SECURITY: number; + const NGHTTP2_HTTP_1_1_REQUIRED: number; + const NGHTTP2_ERR_FRAME_SIZE_ERROR: number; + const NGHTTP2_FLAG_NONE: number; + const NGHTTP2_FLAG_END_STREAM: number; + const NGHTTP2_FLAG_END_HEADERS: number; + const NGHTTP2_FLAG_ACK: number; + const NGHTTP2_FLAG_PADDED: number; + const NGHTTP2_FLAG_PRIORITY: number; + const DEFAULT_SETTINGS_HEADER_TABLE_SIZE: number; + const DEFAULT_SETTINGS_ENABLE_PUSH: number; + const DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: number; + const DEFAULT_SETTINGS_MAX_FRAME_SIZE: number; + const MAX_MAX_FRAME_SIZE: number; + const MIN_MAX_FRAME_SIZE: number; + const MAX_INITIAL_WINDOW_SIZE: number; + const NGHTTP2_DEFAULT_WEIGHT: number; + const NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: number; + const NGHTTP2_SETTINGS_ENABLE_PUSH: number; + const NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS: number; + const NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: number; + const NGHTTP2_SETTINGS_MAX_FRAME_SIZE: number; + const NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE: number; + const PADDING_STRATEGY_NONE: number; + const PADDING_STRATEGY_MAX: number; + const PADDING_STRATEGY_CALLBACK: number; + const HTTP2_HEADER_STATUS: string; + const HTTP2_HEADER_METHOD: string; + const HTTP2_HEADER_AUTHORITY: string; + const HTTP2_HEADER_SCHEME: string; + const HTTP2_HEADER_PATH: string; + const HTTP2_HEADER_ACCEPT_CHARSET: string; + const HTTP2_HEADER_ACCEPT_ENCODING: string; + const HTTP2_HEADER_ACCEPT_LANGUAGE: string; + const HTTP2_HEADER_ACCEPT_RANGES: string; + const HTTP2_HEADER_ACCEPT: string; + const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: string; + const HTTP2_HEADER_AGE: string; + const HTTP2_HEADER_ALLOW: string; + const HTTP2_HEADER_AUTHORIZATION: string; + const HTTP2_HEADER_CACHE_CONTROL: string; + const HTTP2_HEADER_CONNECTION: string; + const HTTP2_HEADER_CONTENT_DISPOSITION: string; + const HTTP2_HEADER_CONTENT_ENCODING: string; + const HTTP2_HEADER_CONTENT_LANGUAGE: string; + const HTTP2_HEADER_CONTENT_LENGTH: string; + const HTTP2_HEADER_CONTENT_LOCATION: string; + const HTTP2_HEADER_CONTENT_MD5: string; + const HTTP2_HEADER_CONTENT_RANGE: string; + const HTTP2_HEADER_CONTENT_TYPE: string; + const HTTP2_HEADER_COOKIE: string; + const HTTP2_HEADER_DATE: string; + const HTTP2_HEADER_ETAG: string; + const HTTP2_HEADER_EXPECT: string; + const HTTP2_HEADER_EXPIRES: string; + const HTTP2_HEADER_FROM: string; + const HTTP2_HEADER_HOST: string; + const HTTP2_HEADER_IF_MATCH: string; + const HTTP2_HEADER_IF_MODIFIED_SINCE: string; + const HTTP2_HEADER_IF_NONE_MATCH: string; + const HTTP2_HEADER_IF_RANGE: string; + const HTTP2_HEADER_IF_UNMODIFIED_SINCE: string; + const HTTP2_HEADER_LAST_MODIFIED: string; + const HTTP2_HEADER_LINK: string; + const HTTP2_HEADER_LOCATION: string; + const HTTP2_HEADER_MAX_FORWARDS: string; + const HTTP2_HEADER_PREFER: string; + const HTTP2_HEADER_PROXY_AUTHENTICATE: string; + const HTTP2_HEADER_PROXY_AUTHORIZATION: string; + const HTTP2_HEADER_RANGE: string; + const HTTP2_HEADER_REFERER: string; + const HTTP2_HEADER_REFRESH: string; + const HTTP2_HEADER_RETRY_AFTER: string; + const HTTP2_HEADER_SERVER: string; + const HTTP2_HEADER_SET_COOKIE: string; + const HTTP2_HEADER_STRICT_TRANSPORT_SECURITY: string; + const HTTP2_HEADER_TRANSFER_ENCODING: string; + const HTTP2_HEADER_TE: string; + const HTTP2_HEADER_UPGRADE: string; + const HTTP2_HEADER_USER_AGENT: string; + const HTTP2_HEADER_VARY: string; + const HTTP2_HEADER_VIA: string; + const HTTP2_HEADER_WWW_AUTHENTICATE: string; + const HTTP2_HEADER_HTTP2_SETTINGS: string; + const HTTP2_HEADER_KEEP_ALIVE: string; + const HTTP2_HEADER_PROXY_CONNECTION: string; + const HTTP2_METHOD_ACL: string; + const HTTP2_METHOD_BASELINE_CONTROL: string; + const HTTP2_METHOD_BIND: string; + const HTTP2_METHOD_CHECKIN: string; + const HTTP2_METHOD_CHECKOUT: string; + const HTTP2_METHOD_CONNECT: string; + const HTTP2_METHOD_COPY: string; + const HTTP2_METHOD_DELETE: string; + const HTTP2_METHOD_GET: string; + const HTTP2_METHOD_HEAD: string; + const HTTP2_METHOD_LABEL: string; + const HTTP2_METHOD_LINK: string; + const HTTP2_METHOD_LOCK: string; + const HTTP2_METHOD_MERGE: string; + const HTTP2_METHOD_MKACTIVITY: string; + const HTTP2_METHOD_MKCALENDAR: string; + const HTTP2_METHOD_MKCOL: string; + const HTTP2_METHOD_MKREDIRECTREF: string; + const HTTP2_METHOD_MKWORKSPACE: string; + const HTTP2_METHOD_MOVE: string; + const HTTP2_METHOD_OPTIONS: string; + const HTTP2_METHOD_ORDERPATCH: string; + const HTTP2_METHOD_PATCH: string; + const HTTP2_METHOD_POST: string; + const HTTP2_METHOD_PRI: string; + const HTTP2_METHOD_PROPFIND: string; + const HTTP2_METHOD_PROPPATCH: string; + const HTTP2_METHOD_PUT: string; + const HTTP2_METHOD_REBIND: string; + const HTTP2_METHOD_REPORT: string; + const HTTP2_METHOD_SEARCH: string; + const HTTP2_METHOD_TRACE: string; + const HTTP2_METHOD_UNBIND: string; + const HTTP2_METHOD_UNCHECKOUT: string; + const HTTP2_METHOD_UNLINK: string; + const HTTP2_METHOD_UNLOCK: string; + const HTTP2_METHOD_UPDATE: string; + const HTTP2_METHOD_UPDATEREDIRECTREF: string; + const HTTP2_METHOD_VERSION_CONTROL: string; + const HTTP_STATUS_CONTINUE: number; + const HTTP_STATUS_SWITCHING_PROTOCOLS: number; + const HTTP_STATUS_PROCESSING: number; + const HTTP_STATUS_OK: number; + const HTTP_STATUS_CREATED: number; + const HTTP_STATUS_ACCEPTED: number; + const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION: number; + const HTTP_STATUS_NO_CONTENT: number; + const HTTP_STATUS_RESET_CONTENT: number; + const HTTP_STATUS_PARTIAL_CONTENT: number; + const HTTP_STATUS_MULTI_STATUS: number; + const HTTP_STATUS_ALREADY_REPORTED: number; + const HTTP_STATUS_IM_USED: number; + const HTTP_STATUS_MULTIPLE_CHOICES: number; + const HTTP_STATUS_MOVED_PERMANENTLY: number; + const HTTP_STATUS_FOUND: number; + const HTTP_STATUS_SEE_OTHER: number; + const HTTP_STATUS_NOT_MODIFIED: number; + const HTTP_STATUS_USE_PROXY: number; + const HTTP_STATUS_TEMPORARY_REDIRECT: number; + const HTTP_STATUS_PERMANENT_REDIRECT: number; + const HTTP_STATUS_BAD_REQUEST: number; + const HTTP_STATUS_UNAUTHORIZED: number; + const HTTP_STATUS_PAYMENT_REQUIRED: number; + const HTTP_STATUS_FORBIDDEN: number; + const HTTP_STATUS_NOT_FOUND: number; + const HTTP_STATUS_METHOD_NOT_ALLOWED: number; + const HTTP_STATUS_NOT_ACCEPTABLE: number; + const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED: number; + const HTTP_STATUS_REQUEST_TIMEOUT: number; + const HTTP_STATUS_CONFLICT: number; + const HTTP_STATUS_GONE: number; + const HTTP_STATUS_LENGTH_REQUIRED: number; + const HTTP_STATUS_PRECONDITION_FAILED: number; + const HTTP_STATUS_PAYLOAD_TOO_LARGE: number; + const HTTP_STATUS_URI_TOO_LONG: number; + const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: number; + const HTTP_STATUS_RANGE_NOT_SATISFIABLE: number; + const HTTP_STATUS_EXPECTATION_FAILED: number; + const HTTP_STATUS_TEAPOT: number; + const HTTP_STATUS_MISDIRECTED_REQUEST: number; + const HTTP_STATUS_UNPROCESSABLE_ENTITY: number; + const HTTP_STATUS_LOCKED: number; + const HTTP_STATUS_FAILED_DEPENDENCY: number; + const HTTP_STATUS_UNORDERED_COLLECTION: number; + const HTTP_STATUS_UPGRADE_REQUIRED: number; + const HTTP_STATUS_PRECONDITION_REQUIRED: number; + const HTTP_STATUS_TOO_MANY_REQUESTS: number; + const HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE: number; + const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS: number; + const HTTP_STATUS_INTERNAL_SERVER_ERROR: number; + const HTTP_STATUS_NOT_IMPLEMENTED: number; + const HTTP_STATUS_BAD_GATEWAY: number; + const HTTP_STATUS_SERVICE_UNAVAILABLE: number; + const HTTP_STATUS_GATEWAY_TIMEOUT: number; + const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED: number; + const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES: number; + const HTTP_STATUS_INSUFFICIENT_STORAGE: number; + const HTTP_STATUS_LOOP_DETECTED: number; + const HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED: number; + const HTTP_STATUS_NOT_EXTENDED: number; + const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED: number; + } + /** + * This symbol can be set as a property on the HTTP/2 headers object with + * an array value in order to provide a list of headers considered sensitive. + */ + export const sensitiveHeaders: symbol; + /** + * Returns an object containing the default settings for an `Http2Session`instance. This method returns a new object instance every time it is called + * so instances returned may be safely modified for use. + * @since v8.4.0 + */ + export function getDefaultSettings(): Settings; + /** + * Returns a `Buffer` instance containing serialized representation of the given + * HTTP/2 settings as specified in the [HTTP/2](https://tools.ietf.org/html/rfc7540) specification. This is intended + * for use with the `HTTP2-Settings` header field. + * + * ```js + * const http2 = require('http2'); + * + * const packed = http2.getPackedSettings({ enablePush: false }); + * + * console.log(packed.toString('base64')); + * // Prints: AAIAAAAA + * ``` + * @since v8.4.0 + */ + export function getPackedSettings(settings: Settings): Buffer; + /** + * Returns a `HTTP/2 Settings Object` containing the deserialized settings from + * the given `Buffer` as generated by `http2.getPackedSettings()`. + * @since v8.4.0 + * @param buf The packed settings. + */ + export function getUnpackedSettings(buf: Uint8Array): Settings; + /** + * Returns a `net.Server` instance that creates and manages `Http2Session`instances. + * + * Since there are no browsers known that support [unencrypted HTTP/2](https://http2.github.io/faq/#does-http2-require-encryption), the use of {@link createSecureServer} is necessary when + * communicating + * with browser clients. + * + * ```js + * const http2 = require('http2'); + * + * // Create an unencrypted HTTP/2 server. + * // Since there are no browsers known that support + * // unencrypted HTTP/2, the use of `http2.createSecureServer()` + * // is necessary when communicating with browser clients. + * const server = http2.createServer(); + * + * server.on('stream', (stream, headers) => { + * stream.respond({ + * 'content-type': 'text/html; charset=utf-8', + * ':status': 200 + * }); + * stream.end('

Hello World

'); + * }); + * + * server.listen(80); + * ``` + * @since v8.4.0 + * @param onRequestHandler See `Compatibility API` + */ + export function createServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server; + export function createServer(options: ServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server; + /** + * Returns a `tls.Server` instance that creates and manages `Http2Session`instances. + * + * ```js + * const http2 = require('http2'); + * const fs = require('fs'); + * + * const options = { + * key: fs.readFileSync('server-key.pem'), + * cert: fs.readFileSync('server-cert.pem') + * }; + * + * // Create a secure HTTP/2 server + * const server = http2.createSecureServer(options); + * + * server.on('stream', (stream, headers) => { + * stream.respond({ + * 'content-type': 'text/html; charset=utf-8', + * ':status': 200 + * }); + * stream.end('

Hello World

'); + * }); + * + * server.listen(80); + * ``` + * @since v8.4.0 + * @param onRequestHandler See `Compatibility API` + */ + export function createSecureServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer; + export function createSecureServer(options: SecureServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer; + /** + * Returns a `ClientHttp2Session` instance. + * + * ```js + * const http2 = require('http2'); + * const client = http2.connect('https://localhost:1234'); + * + * // Use the client + * + * client.close(); + * ``` + * @since v8.4.0 + * @param authority The remote HTTP/2 server to connect to. This must be in the form of a minimal, valid URL with the `http://` or `https://` prefix, host name, and IP port (if a non-default port + * is used). Userinfo (user ID and password), path, querystring, and fragment details in the URL will be ignored. + * @param listener Will be registered as a one-time listener of the {@link 'connect'} event. + */ + export function connect(authority: string | url.URL, listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): ClientHttp2Session; + export function connect( + authority: string | url.URL, + options?: ClientSessionOptions | SecureClientSessionOptions, + listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void + ): ClientHttp2Session; +} +declare module 'node:http2' { + export * from 'http2'; +} diff --git a/frontend/node_modules/@types/node/https.d.ts b/frontend/node_modules/@types/node/https.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..194a3ad1ce77fc13c5cadb91607273251496835d --- /dev/null +++ b/frontend/node_modules/@types/node/https.d.ts @@ -0,0 +1,391 @@ +/** + * HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a + * separate module. + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/https.js) + */ +declare module 'https' { + import { Duplex } from 'node:stream'; + import * as tls from 'node:tls'; + import * as http from 'node:http'; + import { URL } from 'node:url'; + type ServerOptions = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions; + type RequestOptions = http.RequestOptions & + tls.SecureContextOptions & { + rejectUnauthorized?: boolean | undefined; // Defaults to true + servername?: string | undefined; // SNI TLS Extension + }; + interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions { + rejectUnauthorized?: boolean | undefined; + maxCachedSessions?: number | undefined; + } + /** + * An `Agent` object for HTTPS similar to `http.Agent`. See {@link request} for more information. + * @since v0.4.5 + */ + class Agent extends http.Agent { + constructor(options?: AgentOptions); + options: AgentOptions; + } + interface Server extends http.Server {} + /** + * See `http.Server` for more information. + * @since v0.3.4 + */ + class Server extends tls.Server { + constructor(requestListener?: http.RequestListener); + constructor(options: ServerOptions, requestListener?: http.RequestListener); + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this; + addListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; + addListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + addListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; + addListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this; + addListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'connection', listener: (socket: Duplex) => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'listening', listener: () => void): this; + addListener(event: 'checkContinue', listener: http.RequestListener): this; + addListener(event: 'checkExpectation', listener: http.RequestListener): this; + addListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this; + addListener(event: 'connect', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this; + addListener(event: 'request', listener: http.RequestListener): this; + addListener(event: 'upgrade', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this; + emit(event: string, ...args: any[]): boolean; + emit(event: 'keylog', line: Buffer, tlsSocket: tls.TLSSocket): boolean; + emit(event: 'newSession', sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void): boolean; + emit(event: 'OCSPRequest', certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void): boolean; + emit(event: 'resumeSession', sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean; + emit(event: 'secureConnection', tlsSocket: tls.TLSSocket): boolean; + emit(event: 'tlsClientError', err: Error, tlsSocket: tls.TLSSocket): boolean; + emit(event: 'close'): boolean; + emit(event: 'connection', socket: Duplex): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'listening'): boolean; + emit(event: 'checkContinue', req: http.IncomingMessage, res: http.ServerResponse): boolean; + emit(event: 'checkExpectation', req: http.IncomingMessage, res: http.ServerResponse): boolean; + emit(event: 'clientError', err: Error, socket: Duplex): boolean; + emit(event: 'connect', req: http.IncomingMessage, socket: Duplex, head: Buffer): boolean; + emit(event: 'request', req: http.IncomingMessage, res: http.ServerResponse): boolean; + emit(event: 'upgrade', req: http.IncomingMessage, socket: Duplex, head: Buffer): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this; + on(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; + on(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + on(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; + on(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this; + on(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'connection', listener: (socket: Duplex) => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'listening', listener: () => void): this; + on(event: 'checkContinue', listener: http.RequestListener): this; + on(event: 'checkExpectation', listener: http.RequestListener): this; + on(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this; + on(event: 'connect', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this; + on(event: 'request', listener: http.RequestListener): this; + on(event: 'upgrade', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this; + once(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; + once(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + once(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; + once(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this; + once(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'connection', listener: (socket: Duplex) => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'listening', listener: () => void): this; + once(event: 'checkContinue', listener: http.RequestListener): this; + once(event: 'checkExpectation', listener: http.RequestListener): this; + once(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this; + once(event: 'connect', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this; + once(event: 'request', listener: http.RequestListener): this; + once(event: 'upgrade', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this; + prependListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; + prependListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + prependListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; + prependListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this; + prependListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'connection', listener: (socket: Duplex) => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'listening', listener: () => void): this; + prependListener(event: 'checkContinue', listener: http.RequestListener): this; + prependListener(event: 'checkExpectation', listener: http.RequestListener): this; + prependListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this; + prependListener(event: 'connect', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this; + prependListener(event: 'request', listener: http.RequestListener): this; + prependListener(event: 'upgrade', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this; + prependOnceListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; + prependOnceListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + prependOnceListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; + prependOnceListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this; + prependOnceListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'connection', listener: (socket: Duplex) => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'listening', listener: () => void): this; + prependOnceListener(event: 'checkContinue', listener: http.RequestListener): this; + prependOnceListener(event: 'checkExpectation', listener: http.RequestListener): this; + prependOnceListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this; + prependOnceListener(event: 'connect', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this; + prependOnceListener(event: 'request', listener: http.RequestListener): this; + prependOnceListener(event: 'upgrade', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this; + } + /** + * ```js + * // curl -k https://localhost:8000/ + * const https = require('https'); + * const fs = require('fs'); + * + * const options = { + * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), + * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem') + * }; + * + * https.createServer(options, (req, res) => { + * res.writeHead(200); + * res.end('hello world\n'); + * }).listen(8000); + * ``` + * + * Or + * + * ```js + * const https = require('https'); + * const fs = require('fs'); + * + * const options = { + * pfx: fs.readFileSync('test/fixtures/test_cert.pfx'), + * passphrase: 'sample' + * }; + * + * https.createServer(options, (req, res) => { + * res.writeHead(200); + * res.end('hello world\n'); + * }).listen(8000); + * ``` + * @since v0.3.4 + * @param options Accepts `options` from `createServer`, `createSecureContext` and `createServer`. + * @param requestListener A listener to be added to the `'request'` event. + */ + function createServer(requestListener?: http.RequestListener): Server; + function createServer(options: ServerOptions, requestListener?: http.RequestListener): Server; + /** + * Makes a request to a secure web server. + * + * The following additional `options` from `tls.connect()` are also accepted:`ca`, `cert`, `ciphers`, `clientCertEngine`, `crl`, `dhparam`, `ecdhCurve`,`honorCipherOrder`, `key`, `passphrase`, + * `pfx`, `rejectUnauthorized`,`secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`,`highWaterMark`. + * + * `options` can be an object, a string, or a `URL` object. If `options` is a + * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. + * + * `https.request()` returns an instance of the `http.ClientRequest` class. The `ClientRequest` instance is a writable stream. If one needs to + * upload a file with a POST request, then write to the `ClientRequest` object. + * + * ```js + * const https = require('https'); + * + * const options = { + * hostname: 'encrypted.google.com', + * port: 443, + * path: '/', + * method: 'GET' + * }; + * + * const req = https.request(options, (res) => { + * console.log('statusCode:', res.statusCode); + * console.log('headers:', res.headers); + * + * res.on('data', (d) => { + * process.stdout.write(d); + * }); + * }); + * + * req.on('error', (e) => { + * console.error(e); + * }); + * req.end(); + * ``` + * + * Example using options from `tls.connect()`: + * + * ```js + * const options = { + * hostname: 'encrypted.google.com', + * port: 443, + * path: '/', + * method: 'GET', + * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), + * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem') + * }; + * options.agent = new https.Agent(options); + * + * const req = https.request(options, (res) => { + * // ... + * }); + * ``` + * + * Alternatively, opt out of connection pooling by not using an `Agent`. + * + * ```js + * const options = { + * hostname: 'encrypted.google.com', + * port: 443, + * path: '/', + * method: 'GET', + * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), + * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'), + * agent: false + * }; + * + * const req = https.request(options, (res) => { + * // ... + * }); + * ``` + * + * Example using a `URL` as `options`: + * + * ```js + * const options = new URL('https://abc:xyz@example.com'); + * + * const req = https.request(options, (res) => { + * // ... + * }); + * ``` + * + * Example pinning on certificate fingerprint, or the public key (similar to`pin-sha256`): + * + * ```js + * const tls = require('tls'); + * const https = require('https'); + * const crypto = require('crypto'); + * + * function sha256(s) { + * return crypto.createHash('sha256').update(s).digest('base64'); + * } + * const options = { + * hostname: 'github.com', + * port: 443, + * path: '/', + * method: 'GET', + * checkServerIdentity: function(host, cert) { + * // Make sure the certificate is issued to the host we are connected to + * const err = tls.checkServerIdentity(host, cert); + * if (err) { + * return err; + * } + * + * // Pin the public key, similar to HPKP pin-sha25 pinning + * const pubkey256 = 'pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU='; + * if (sha256(cert.pubkey) !== pubkey256) { + * const msg = 'Certificate verification error: ' + + * `The public key of '${cert.subject.CN}' ` + + * 'does not match our pinned fingerprint'; + * return new Error(msg); + * } + * + * // Pin the exact certificate, rather than the pub key + * const cert256 = '25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:' + + * 'D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16'; + * if (cert.fingerprint256 !== cert256) { + * const msg = 'Certificate verification error: ' + + * `The certificate of '${cert.subject.CN}' ` + + * 'does not match our pinned fingerprint'; + * return new Error(msg); + * } + * + * // This loop is informational only. + * // Print the certificate and public key fingerprints of all certs in the + * // chain. Its common to pin the public key of the issuer on the public + * // internet, while pinning the public key of the service in sensitive + * // environments. + * do { + * console.log('Subject Common Name:', cert.subject.CN); + * console.log(' Certificate SHA256 fingerprint:', cert.fingerprint256); + * + * hash = crypto.createHash('sha256'); + * console.log(' Public key ping-sha256:', sha256(cert.pubkey)); + * + * lastprint256 = cert.fingerprint256; + * cert = cert.issuerCertificate; + * } while (cert.fingerprint256 !== lastprint256); + * + * }, + * }; + * + * options.agent = new https.Agent(options); + * const req = https.request(options, (res) => { + * console.log('All OK. Server matched our pinned cert or public key'); + * console.log('statusCode:', res.statusCode); + * // Print the HPKP values + * console.log('headers:', res.headers['public-key-pins']); + * + * res.on('data', (d) => {}); + * }); + * + * req.on('error', (e) => { + * console.error(e.message); + * }); + * req.end(); + * ``` + * + * Outputs for example: + * + * ```text + * Subject Common Name: github.com + * Certificate SHA256 fingerprint: 25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16 + * Public key ping-sha256: pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU= + * Subject Common Name: DigiCert SHA2 Extended Validation Server CA + * Certificate SHA256 fingerprint: 40:3E:06:2A:26:53:05:91:13:28:5B:AF:80:A0:D4:AE:42:2C:84:8C:9F:78:FA:D0:1F:C9:4B:C5:B8:7F:EF:1A + * Public key ping-sha256: RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho= + * Subject Common Name: DigiCert High Assurance EV Root CA + * Certificate SHA256 fingerprint: 74:31:E5:F4:C3:C1:CE:46:90:77:4F:0B:61:E0:54:40:88:3B:A9:A0:1E:D0:0B:A6:AB:D7:80:6E:D3:B1:18:CF + * Public key ping-sha256: WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18= + * All OK. Server matched our pinned cert or public key + * statusCode: 200 + * headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho="; + * pin-sha256="k2v657xBsOVe1PQRwOsHsw3bsGT2VzIqz5K+59sNQws="; pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="IQBnNBEiFuhj+8x6X8XLgh01V9Ic5/V3IRQLNFFc7v4="; + * pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0="; pin-sha256="LvRiGEjRqfzurezaWuj8Wie2gyHMrW5Q06LspMnox7A="; includeSubDomains + * ``` + * @since v0.3.6 + * @param options Accepts all `options` from `request`, with some differences in default values: + */ + function request(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; + function request(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; + /** + * Like `http.get()` but for HTTPS. + * + * `options` can be an object, a string, or a `URL` object. If `options` is a + * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. + * + * ```js + * const https = require('https'); + * + * https.get('https://encrypted.google.com/', (res) => { + * console.log('statusCode:', res.statusCode); + * console.log('headers:', res.headers); + * + * res.on('data', (d) => { + * process.stdout.write(d); + * }); + * + * }).on('error', (e) => { + * console.error(e); + * }); + * ``` + * @since v0.3.6 + * @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`. + */ + function get(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; + function get(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; + let globalAgent: Agent; +} +declare module 'node:https' { + export * from 'https'; +} diff --git a/frontend/node_modules/@types/node/index.d.ts b/frontend/node_modules/@types/node/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d25d8f9323c05f8a3933059a90ee85d1cab6f8e9 --- /dev/null +++ b/frontend/node_modules/@types/node/index.d.ts @@ -0,0 +1,130 @@ +// Type definitions for non-npm package Node.js 16.11 +// Project: https://nodejs.org/ +// Definitions by: Microsoft TypeScript +// DefinitelyTyped +// Alberto Schiabel +// Alvis HT Tang +// Andrew Makarov +// Benjamin Toueg +// Chigozirim C. +// David Junger +// Deividas Bakanas +// Eugene Y. Q. Shen +// Hannes Magnusson +// Huw +// Kelvin Jin +// Klaus Meinhardt +// Lishude +// Mariusz Wiktorczyk +// Mohsen Azimi +// Nicolas Even +// Nikita Galkin +// Parambir Singh +// Sebastian Silbermann +// Simon Schick +// Thomas den Hollander +// Wilco Bakker +// wwwy3y3 +// Samuel Ainsworth +// Kyle Uehlein +// Thanik Bhongbhibhat +// Marcin Kopacz +// Trivikram Kamat +// Junxiao Shi +// Ilia Baryshnikov +// ExE Boss +// Surasak Chaisurin +// Piotr Błażejewicz +// Anna Henningsen +// Victor Perin +// Yongsheng Zhang +// NodeJS Contributors +// Linus Unnebäck +// wafuwafu13 +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * License for programmatically and manually incorporated + * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc + * + * Copyright Node.js contributors. All rights reserved. + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +// NOTE: These definitions support NodeJS and TypeScript 3.7+. + +// Reference required types from the default lib: +/// +/// +/// +/// + +// Base definitions for all NodeJS modules that are not specific to any version of TypeScript: +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// + +/// diff --git a/frontend/node_modules/@types/node/inspector.d.ts b/frontend/node_modules/@types/node/inspector.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..5e84a1a6b567fdd27eefa7220731a49622832dab --- /dev/null +++ b/frontend/node_modules/@types/node/inspector.d.ts @@ -0,0 +1,2745 @@ +// tslint:disable-next-line:dt-header +// Type definitions for inspector + +// These definitions are auto-generated. +// Please see https://github.com/DefinitelyTyped/DefinitelyTyped/pull/19330 +// for more information. + +// tslint:disable:max-line-length + +/** + * The `inspector` module provides an API for interacting with the V8 inspector. + * + * It can be accessed using: + * + * ```js + * const inspector = require('inspector'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/inspector.js) + */ +declare module 'inspector' { + import EventEmitter = require('node:events'); + interface InspectorNotification { + method: string; + params: T; + } + namespace Schema { + /** + * Description of the protocol domain. + */ + interface Domain { + /** + * Domain name. + */ + name: string; + /** + * Domain version. + */ + version: string; + } + interface GetDomainsReturnType { + /** + * List of supported domains. + */ + domains: Domain[]; + } + } + namespace Runtime { + /** + * Unique script identifier. + */ + type ScriptId = string; + /** + * Unique object identifier. + */ + type RemoteObjectId = string; + /** + * Primitive value which cannot be JSON-stringified. + */ + type UnserializableValue = string; + /** + * Mirror object referencing original JavaScript object. + */ + interface RemoteObject { + /** + * Object type. + */ + type: string; + /** + * Object subtype hint. Specified for object type values only. + */ + subtype?: string | undefined; + /** + * Object class (constructor) name. Specified for object type values only. + */ + className?: string | undefined; + /** + * Remote object value in case of primitive values or JSON values (if it was requested). + */ + value?: any; + /** + * Primitive value which can not be JSON-stringified does not have value, but gets this property. + */ + unserializableValue?: UnserializableValue | undefined; + /** + * String representation of the object. + */ + description?: string | undefined; + /** + * Unique object identifier (for non-primitive values). + */ + objectId?: RemoteObjectId | undefined; + /** + * Preview containing abbreviated property values. Specified for object type values only. + * @experimental + */ + preview?: ObjectPreview | undefined; + /** + * @experimental + */ + customPreview?: CustomPreview | undefined; + } + /** + * @experimental + */ + interface CustomPreview { + header: string; + hasBody: boolean; + formatterObjectId: RemoteObjectId; + bindRemoteObjectFunctionId: RemoteObjectId; + configObjectId?: RemoteObjectId | undefined; + } + /** + * Object containing abbreviated remote object value. + * @experimental + */ + interface ObjectPreview { + /** + * Object type. + */ + type: string; + /** + * Object subtype hint. Specified for object type values only. + */ + subtype?: string | undefined; + /** + * String representation of the object. + */ + description?: string | undefined; + /** + * True iff some of the properties or entries of the original object did not fit. + */ + overflow: boolean; + /** + * List of the properties. + */ + properties: PropertyPreview[]; + /** + * List of the entries. Specified for map and set subtype values only. + */ + entries?: EntryPreview[] | undefined; + } + /** + * @experimental + */ + interface PropertyPreview { + /** + * Property name. + */ + name: string; + /** + * Object type. Accessor means that the property itself is an accessor property. + */ + type: string; + /** + * User-friendly property value string. + */ + value?: string | undefined; + /** + * Nested value preview. + */ + valuePreview?: ObjectPreview | undefined; + /** + * Object subtype hint. Specified for object type values only. + */ + subtype?: string | undefined; + } + /** + * @experimental + */ + interface EntryPreview { + /** + * Preview of the key. Specified for map-like collection entries. + */ + key?: ObjectPreview | undefined; + /** + * Preview of the value. + */ + value: ObjectPreview; + } + /** + * Object property descriptor. + */ + interface PropertyDescriptor { + /** + * Property name or symbol description. + */ + name: string; + /** + * The value associated with the property. + */ + value?: RemoteObject | undefined; + /** + * True if the value associated with the property may be changed (data descriptors only). + */ + writable?: boolean | undefined; + /** + * A function which serves as a getter for the property, or undefined if there is no getter (accessor descriptors only). + */ + get?: RemoteObject | undefined; + /** + * A function which serves as a setter for the property, or undefined if there is no setter (accessor descriptors only). + */ + set?: RemoteObject | undefined; + /** + * True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object. + */ + configurable: boolean; + /** + * True if this property shows up during enumeration of the properties on the corresponding object. + */ + enumerable: boolean; + /** + * True if the result was thrown during the evaluation. + */ + wasThrown?: boolean | undefined; + /** + * True if the property is owned for the object. + */ + isOwn?: boolean | undefined; + /** + * Property symbol object, if the property is of the symbol type. + */ + symbol?: RemoteObject | undefined; + } + /** + * Object internal property descriptor. This property isn't normally visible in JavaScript code. + */ + interface InternalPropertyDescriptor { + /** + * Conventional property name. + */ + name: string; + /** + * The value associated with the property. + */ + value?: RemoteObject | undefined; + } + /** + * Represents function call argument. Either remote object id objectId, primitive value, unserializable primitive value or neither of (for undefined) them should be specified. + */ + interface CallArgument { + /** + * Primitive value or serializable javascript object. + */ + value?: any; + /** + * Primitive value which can not be JSON-stringified. + */ + unserializableValue?: UnserializableValue | undefined; + /** + * Remote object handle. + */ + objectId?: RemoteObjectId | undefined; + } + /** + * Id of an execution context. + */ + type ExecutionContextId = number; + /** + * Description of an isolated world. + */ + interface ExecutionContextDescription { + /** + * Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed. + */ + id: ExecutionContextId; + /** + * Execution context origin. + */ + origin: string; + /** + * Human readable name describing given context. + */ + name: string; + /** + * Embedder-specific auxiliary data. + */ + auxData?: {} | undefined; + } + /** + * Detailed information about exception (or error) that was thrown during script compilation or execution. + */ + interface ExceptionDetails { + /** + * Exception id. + */ + exceptionId: number; + /** + * Exception text, which should be used together with exception object when available. + */ + text: string; + /** + * Line number of the exception location (0-based). + */ + lineNumber: number; + /** + * Column number of the exception location (0-based). + */ + columnNumber: number; + /** + * Script ID of the exception location. + */ + scriptId?: ScriptId | undefined; + /** + * URL of the exception location, to be used when the script was not reported. + */ + url?: string | undefined; + /** + * JavaScript stack trace if available. + */ + stackTrace?: StackTrace | undefined; + /** + * Exception object if available. + */ + exception?: RemoteObject | undefined; + /** + * Identifier of the context where exception happened. + */ + executionContextId?: ExecutionContextId | undefined; + } + /** + * Number of milliseconds since epoch. + */ + type Timestamp = number; + /** + * Stack entry for runtime errors and assertions. + */ + interface CallFrame { + /** + * JavaScript function name. + */ + functionName: string; + /** + * JavaScript script id. + */ + scriptId: ScriptId; + /** + * JavaScript script name or url. + */ + url: string; + /** + * JavaScript script line number (0-based). + */ + lineNumber: number; + /** + * JavaScript script column number (0-based). + */ + columnNumber: number; + } + /** + * Call frames for assertions or error messages. + */ + interface StackTrace { + /** + * String label of this stack trace. For async traces this may be a name of the function that initiated the async call. + */ + description?: string | undefined; + /** + * JavaScript function name. + */ + callFrames: CallFrame[]; + /** + * Asynchronous JavaScript stack trace that preceded this stack, if available. + */ + parent?: StackTrace | undefined; + /** + * Asynchronous JavaScript stack trace that preceded this stack, if available. + * @experimental + */ + parentId?: StackTraceId | undefined; + } + /** + * Unique identifier of current debugger. + * @experimental + */ + type UniqueDebuggerId = string; + /** + * If debuggerId is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See Runtime.StackTrace and Debugger.paused for usages. + * @experimental + */ + interface StackTraceId { + id: string; + debuggerId?: UniqueDebuggerId | undefined; + } + interface EvaluateParameterType { + /** + * Expression to evaluate. + */ + expression: string; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string | undefined; + /** + * Determines whether Command Line API should be available during the evaluation. + */ + includeCommandLineAPI?: boolean | undefined; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean | undefined; + /** + * Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page. + */ + contextId?: ExecutionContextId | undefined; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean | undefined; + /** + * Whether execution should be treated as initiated by user in the UI. + */ + userGesture?: boolean | undefined; + /** + * Whether execution should await for resulting value and return once awaited promise is resolved. + */ + awaitPromise?: boolean | undefined; + } + interface AwaitPromiseParameterType { + /** + * Identifier of the promise. + */ + promiseObjectId: RemoteObjectId; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + */ + generatePreview?: boolean | undefined; + } + interface CallFunctionOnParameterType { + /** + * Declaration of the function to call. + */ + functionDeclaration: string; + /** + * Identifier of the object to call function on. Either objectId or executionContextId should be specified. + */ + objectId?: RemoteObjectId | undefined; + /** + * Call arguments. All call arguments must belong to the same JavaScript world as the target object. + */ + arguments?: CallArgument[] | undefined; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean | undefined; + /** + * Whether the result is expected to be a JSON object which should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean | undefined; + /** + * Whether execution should be treated as initiated by user in the UI. + */ + userGesture?: boolean | undefined; + /** + * Whether execution should await for resulting value and return once awaited promise is resolved. + */ + awaitPromise?: boolean | undefined; + /** + * Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified. + */ + executionContextId?: ExecutionContextId | undefined; + /** + * Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object. + */ + objectGroup?: string | undefined; + } + interface GetPropertiesParameterType { + /** + * Identifier of the object to return properties for. + */ + objectId: RemoteObjectId; + /** + * If true, returns properties belonging only to the element itself, not to its prototype chain. + */ + ownProperties?: boolean | undefined; + /** + * If true, returns accessor properties (with getter/setter) only; internal properties are not returned either. + * @experimental + */ + accessorPropertiesOnly?: boolean | undefined; + /** + * Whether preview should be generated for the results. + * @experimental + */ + generatePreview?: boolean | undefined; + } + interface ReleaseObjectParameterType { + /** + * Identifier of the object to release. + */ + objectId: RemoteObjectId; + } + interface ReleaseObjectGroupParameterType { + /** + * Symbolic object group name. + */ + objectGroup: string; + } + interface SetCustomObjectFormatterEnabledParameterType { + enabled: boolean; + } + interface CompileScriptParameterType { + /** + * Expression to compile. + */ + expression: string; + /** + * Source url to be set for the script. + */ + sourceURL: string; + /** + * Specifies whether the compiled script should be persisted. + */ + persistScript: boolean; + /** + * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. + */ + executionContextId?: ExecutionContextId | undefined; + } + interface RunScriptParameterType { + /** + * Id of the script to run. + */ + scriptId: ScriptId; + /** + * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. + */ + executionContextId?: ExecutionContextId | undefined; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string | undefined; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean | undefined; + /** + * Determines whether Command Line API should be available during the evaluation. + */ + includeCommandLineAPI?: boolean | undefined; + /** + * Whether the result is expected to be a JSON object which should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + */ + generatePreview?: boolean | undefined; + /** + * Whether execution should await for resulting value and return once awaited promise is resolved. + */ + awaitPromise?: boolean | undefined; + } + interface QueryObjectsParameterType { + /** + * Identifier of the prototype to return objects for. + */ + prototypeObjectId: RemoteObjectId; + } + interface GlobalLexicalScopeNamesParameterType { + /** + * Specifies in which execution context to lookup global scope variables. + */ + executionContextId?: ExecutionContextId | undefined; + } + interface EvaluateReturnType { + /** + * Evaluation result. + */ + result: RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface AwaitPromiseReturnType { + /** + * Promise result. Will contain rejected value if promise was rejected. + */ + result: RemoteObject; + /** + * Exception details if stack strace is available. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface CallFunctionOnReturnType { + /** + * Call result. + */ + result: RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface GetPropertiesReturnType { + /** + * Object properties. + */ + result: PropertyDescriptor[]; + /** + * Internal object properties (only of the element itself). + */ + internalProperties?: InternalPropertyDescriptor[] | undefined; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface CompileScriptReturnType { + /** + * Id of the script. + */ + scriptId?: ScriptId | undefined; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface RunScriptReturnType { + /** + * Run result. + */ + result: RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface QueryObjectsReturnType { + /** + * Array with objects. + */ + objects: RemoteObject; + } + interface GlobalLexicalScopeNamesReturnType { + names: string[]; + } + interface ExecutionContextCreatedEventDataType { + /** + * A newly created execution context. + */ + context: ExecutionContextDescription; + } + interface ExecutionContextDestroyedEventDataType { + /** + * Id of the destroyed context + */ + executionContextId: ExecutionContextId; + } + interface ExceptionThrownEventDataType { + /** + * Timestamp of the exception. + */ + timestamp: Timestamp; + exceptionDetails: ExceptionDetails; + } + interface ExceptionRevokedEventDataType { + /** + * Reason describing why exception was revoked. + */ + reason: string; + /** + * The id of revoked exception, as reported in exceptionThrown. + */ + exceptionId: number; + } + interface ConsoleAPICalledEventDataType { + /** + * Type of the call. + */ + type: string; + /** + * Call arguments. + */ + args: RemoteObject[]; + /** + * Identifier of the context where the call was made. + */ + executionContextId: ExecutionContextId; + /** + * Call timestamp. + */ + timestamp: Timestamp; + /** + * Stack trace captured when the call was made. + */ + stackTrace?: StackTrace | undefined; + /** + * Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context. + * @experimental + */ + context?: string | undefined; + } + interface InspectRequestedEventDataType { + object: RemoteObject; + hints: {}; + } + } + namespace Debugger { + /** + * Breakpoint identifier. + */ + type BreakpointId = string; + /** + * Call frame identifier. + */ + type CallFrameId = string; + /** + * Location in the source code. + */ + interface Location { + /** + * Script identifier as reported in the Debugger.scriptParsed. + */ + scriptId: Runtime.ScriptId; + /** + * Line number in the script (0-based). + */ + lineNumber: number; + /** + * Column number in the script (0-based). + */ + columnNumber?: number | undefined; + } + /** + * Location in the source code. + * @experimental + */ + interface ScriptPosition { + lineNumber: number; + columnNumber: number; + } + /** + * JavaScript call frame. Array of call frames form the call stack. + */ + interface CallFrame { + /** + * Call frame identifier. This identifier is only valid while the virtual machine is paused. + */ + callFrameId: CallFrameId; + /** + * Name of the JavaScript function called on this call frame. + */ + functionName: string; + /** + * Location in the source code. + */ + functionLocation?: Location | undefined; + /** + * Location in the source code. + */ + location: Location; + /** + * JavaScript script name or url. + */ + url: string; + /** + * Scope chain for this call frame. + */ + scopeChain: Scope[]; + /** + * this object for this call frame. + */ + this: Runtime.RemoteObject; + /** + * The value being returned, if the function is at return point. + */ + returnValue?: Runtime.RemoteObject | undefined; + } + /** + * Scope description. + */ + interface Scope { + /** + * Scope type. + */ + type: string; + /** + * Object representing the scope. For global and with scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties. + */ + object: Runtime.RemoteObject; + name?: string | undefined; + /** + * Location in the source code where scope starts + */ + startLocation?: Location | undefined; + /** + * Location in the source code where scope ends + */ + endLocation?: Location | undefined; + } + /** + * Search match for resource. + */ + interface SearchMatch { + /** + * Line number in resource content. + */ + lineNumber: number; + /** + * Line with match content. + */ + lineContent: string; + } + interface BreakLocation { + /** + * Script identifier as reported in the Debugger.scriptParsed. + */ + scriptId: Runtime.ScriptId; + /** + * Line number in the script (0-based). + */ + lineNumber: number; + /** + * Column number in the script (0-based). + */ + columnNumber?: number | undefined; + type?: string | undefined; + } + interface SetBreakpointsActiveParameterType { + /** + * New value for breakpoints active state. + */ + active: boolean; + } + interface SetSkipAllPausesParameterType { + /** + * New value for skip pauses state. + */ + skip: boolean; + } + interface SetBreakpointByUrlParameterType { + /** + * Line number to set breakpoint at. + */ + lineNumber: number; + /** + * URL of the resources to set breakpoint on. + */ + url?: string | undefined; + /** + * Regex pattern for the URLs of the resources to set breakpoints on. Either url or urlRegex must be specified. + */ + urlRegex?: string | undefined; + /** + * Script hash of the resources to set breakpoint on. + */ + scriptHash?: string | undefined; + /** + * Offset in the line to set breakpoint at. + */ + columnNumber?: number | undefined; + /** + * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. + */ + condition?: string | undefined; + } + interface SetBreakpointParameterType { + /** + * Location to set breakpoint in. + */ + location: Location; + /** + * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. + */ + condition?: string | undefined; + } + interface RemoveBreakpointParameterType { + breakpointId: BreakpointId; + } + interface GetPossibleBreakpointsParameterType { + /** + * Start of range to search possible breakpoint locations in. + */ + start: Location; + /** + * End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range. + */ + end?: Location | undefined; + /** + * Only consider locations which are in the same (non-nested) function as start. + */ + restrictToFunction?: boolean | undefined; + } + interface ContinueToLocationParameterType { + /** + * Location to continue to. + */ + location: Location; + targetCallFrames?: string | undefined; + } + interface PauseOnAsyncCallParameterType { + /** + * Debugger will pause when async call with given stack trace is started. + */ + parentStackTraceId: Runtime.StackTraceId; + } + interface StepIntoParameterType { + /** + * Debugger will issue additional Debugger.paused notification if any async task is scheduled before next pause. + * @experimental + */ + breakOnAsyncCall?: boolean | undefined; + } + interface GetStackTraceParameterType { + stackTraceId: Runtime.StackTraceId; + } + interface SearchInContentParameterType { + /** + * Id of the script to search in. + */ + scriptId: Runtime.ScriptId; + /** + * String to search for. + */ + query: string; + /** + * If true, search is case sensitive. + */ + caseSensitive?: boolean | undefined; + /** + * If true, treats string parameter as regex. + */ + isRegex?: boolean | undefined; + } + interface SetScriptSourceParameterType { + /** + * Id of the script to edit. + */ + scriptId: Runtime.ScriptId; + /** + * New content of the script. + */ + scriptSource: string; + /** + * If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code. + */ + dryRun?: boolean | undefined; + } + interface RestartFrameParameterType { + /** + * Call frame identifier to evaluate on. + */ + callFrameId: CallFrameId; + } + interface GetScriptSourceParameterType { + /** + * Id of the script to get source for. + */ + scriptId: Runtime.ScriptId; + } + interface SetPauseOnExceptionsParameterType { + /** + * Pause on exceptions mode. + */ + state: string; + } + interface EvaluateOnCallFrameParameterType { + /** + * Call frame identifier to evaluate on. + */ + callFrameId: CallFrameId; + /** + * Expression to evaluate. + */ + expression: string; + /** + * String object group name to put result into (allows rapid releasing resulting object handles using releaseObjectGroup). + */ + objectGroup?: string | undefined; + /** + * Specifies whether command line API should be available to the evaluated expression, defaults to false. + */ + includeCommandLineAPI?: boolean | undefined; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean | undefined; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean | undefined; + /** + * Whether to throw an exception if side effect cannot be ruled out during evaluation. + */ + throwOnSideEffect?: boolean | undefined; + } + interface SetVariableValueParameterType { + /** + * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually. + */ + scopeNumber: number; + /** + * Variable name. + */ + variableName: string; + /** + * New variable value. + */ + newValue: Runtime.CallArgument; + /** + * Id of callframe that holds variable. + */ + callFrameId: CallFrameId; + } + interface SetReturnValueParameterType { + /** + * New return value. + */ + newValue: Runtime.CallArgument; + } + interface SetAsyncCallStackDepthParameterType { + /** + * Maximum depth of async call stacks. Setting to 0 will effectively disable collecting async call stacks (default). + */ + maxDepth: number; + } + interface SetBlackboxPatternsParameterType { + /** + * Array of regexps that will be used to check script url for blackbox state. + */ + patterns: string[]; + } + interface SetBlackboxedRangesParameterType { + /** + * Id of the script. + */ + scriptId: Runtime.ScriptId; + positions: ScriptPosition[]; + } + interface EnableReturnType { + /** + * Unique identifier of the debugger. + * @experimental + */ + debuggerId: Runtime.UniqueDebuggerId; + } + interface SetBreakpointByUrlReturnType { + /** + * Id of the created breakpoint for further reference. + */ + breakpointId: BreakpointId; + /** + * List of the locations this breakpoint resolved into upon addition. + */ + locations: Location[]; + } + interface SetBreakpointReturnType { + /** + * Id of the created breakpoint for further reference. + */ + breakpointId: BreakpointId; + /** + * Location this breakpoint resolved into. + */ + actualLocation: Location; + } + interface GetPossibleBreakpointsReturnType { + /** + * List of the possible breakpoint locations. + */ + locations: BreakLocation[]; + } + interface GetStackTraceReturnType { + stackTrace: Runtime.StackTrace; + } + interface SearchInContentReturnType { + /** + * List of search matches. + */ + result: SearchMatch[]; + } + interface SetScriptSourceReturnType { + /** + * New stack trace in case editing has happened while VM was stopped. + */ + callFrames?: CallFrame[] | undefined; + /** + * Whether current call stack was modified after applying the changes. + */ + stackChanged?: boolean | undefined; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace | undefined; + /** + * Async stack trace, if any. + * @experimental + */ + asyncStackTraceId?: Runtime.StackTraceId | undefined; + /** + * Exception details if any. + */ + exceptionDetails?: Runtime.ExceptionDetails | undefined; + } + interface RestartFrameReturnType { + /** + * New stack trace. + */ + callFrames: CallFrame[]; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace | undefined; + /** + * Async stack trace, if any. + * @experimental + */ + asyncStackTraceId?: Runtime.StackTraceId | undefined; + } + interface GetScriptSourceReturnType { + /** + * Script source. + */ + scriptSource: string; + } + interface EvaluateOnCallFrameReturnType { + /** + * Object wrapper for the evaluation result. + */ + result: Runtime.RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: Runtime.ExceptionDetails | undefined; + } + interface ScriptParsedEventDataType { + /** + * Identifier of the script parsed. + */ + scriptId: Runtime.ScriptId; + /** + * URL or name of the script parsed (if any). + */ + url: string; + /** + * Line offset of the script within the resource with given URL (for script tags). + */ + startLine: number; + /** + * Column offset of the script within the resource with given URL. + */ + startColumn: number; + /** + * Last line of the script. + */ + endLine: number; + /** + * Length of the last line of the script. + */ + endColumn: number; + /** + * Specifies script creation context. + */ + executionContextId: Runtime.ExecutionContextId; + /** + * Content hash of the script. + */ + hash: string; + /** + * Embedder-specific auxiliary data. + */ + executionContextAuxData?: {} | undefined; + /** + * True, if this script is generated as a result of the live edit operation. + * @experimental + */ + isLiveEdit?: boolean | undefined; + /** + * URL of source map associated with script (if any). + */ + sourceMapURL?: string | undefined; + /** + * True, if this script has sourceURL. + */ + hasSourceURL?: boolean | undefined; + /** + * True, if this script is ES6 module. + */ + isModule?: boolean | undefined; + /** + * This script length. + */ + length?: number | undefined; + /** + * JavaScript top stack frame of where the script parsed event was triggered if available. + * @experimental + */ + stackTrace?: Runtime.StackTrace | undefined; + } + interface ScriptFailedToParseEventDataType { + /** + * Identifier of the script parsed. + */ + scriptId: Runtime.ScriptId; + /** + * URL or name of the script parsed (if any). + */ + url: string; + /** + * Line offset of the script within the resource with given URL (for script tags). + */ + startLine: number; + /** + * Column offset of the script within the resource with given URL. + */ + startColumn: number; + /** + * Last line of the script. + */ + endLine: number; + /** + * Length of the last line of the script. + */ + endColumn: number; + /** + * Specifies script creation context. + */ + executionContextId: Runtime.ExecutionContextId; + /** + * Content hash of the script. + */ + hash: string; + /** + * Embedder-specific auxiliary data. + */ + executionContextAuxData?: {} | undefined; + /** + * URL of source map associated with script (if any). + */ + sourceMapURL?: string | undefined; + /** + * True, if this script has sourceURL. + */ + hasSourceURL?: boolean | undefined; + /** + * True, if this script is ES6 module. + */ + isModule?: boolean | undefined; + /** + * This script length. + */ + length?: number | undefined; + /** + * JavaScript top stack frame of where the script parsed event was triggered if available. + * @experimental + */ + stackTrace?: Runtime.StackTrace | undefined; + } + interface BreakpointResolvedEventDataType { + /** + * Breakpoint unique identifier. + */ + breakpointId: BreakpointId; + /** + * Actual breakpoint location. + */ + location: Location; + } + interface PausedEventDataType { + /** + * Call stack the virtual machine stopped on. + */ + callFrames: CallFrame[]; + /** + * Pause reason. + */ + reason: string; + /** + * Object containing break-specific auxiliary properties. + */ + data?: {} | undefined; + /** + * Hit breakpoints IDs + */ + hitBreakpoints?: string[] | undefined; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace | undefined; + /** + * Async stack trace, if any. + * @experimental + */ + asyncStackTraceId?: Runtime.StackTraceId | undefined; + /** + * Just scheduled async call will have this stack trace as parent stack during async execution. This field is available only after Debugger.stepInto call with breakOnAsynCall flag. + * @experimental + */ + asyncCallStackTraceId?: Runtime.StackTraceId | undefined; + } + } + namespace Console { + /** + * Console message. + */ + interface ConsoleMessage { + /** + * Message source. + */ + source: string; + /** + * Message severity. + */ + level: string; + /** + * Message text. + */ + text: string; + /** + * URL of the message origin. + */ + url?: string | undefined; + /** + * Line number in the resource that generated this message (1-based). + */ + line?: number | undefined; + /** + * Column number in the resource that generated this message (1-based). + */ + column?: number | undefined; + } + interface MessageAddedEventDataType { + /** + * Console message that has been added. + */ + message: ConsoleMessage; + } + } + namespace Profiler { + /** + * Profile node. Holds callsite information, execution statistics and child nodes. + */ + interface ProfileNode { + /** + * Unique id of the node. + */ + id: number; + /** + * Function location. + */ + callFrame: Runtime.CallFrame; + /** + * Number of samples where this node was on top of the call stack. + */ + hitCount?: number | undefined; + /** + * Child node ids. + */ + children?: number[] | undefined; + /** + * The reason of being not optimized. The function may be deoptimized or marked as don't optimize. + */ + deoptReason?: string | undefined; + /** + * An array of source position ticks. + */ + positionTicks?: PositionTickInfo[] | undefined; + } + /** + * Profile. + */ + interface Profile { + /** + * The list of profile nodes. First item is the root node. + */ + nodes: ProfileNode[]; + /** + * Profiling start timestamp in microseconds. + */ + startTime: number; + /** + * Profiling end timestamp in microseconds. + */ + endTime: number; + /** + * Ids of samples top nodes. + */ + samples?: number[] | undefined; + /** + * Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime. + */ + timeDeltas?: number[] | undefined; + } + /** + * Specifies a number of samples attributed to a certain source position. + */ + interface PositionTickInfo { + /** + * Source line number (1-based). + */ + line: number; + /** + * Number of samples attributed to the source line. + */ + ticks: number; + } + /** + * Coverage data for a source range. + */ + interface CoverageRange { + /** + * JavaScript script source offset for the range start. + */ + startOffset: number; + /** + * JavaScript script source offset for the range end. + */ + endOffset: number; + /** + * Collected execution count of the source range. + */ + count: number; + } + /** + * Coverage data for a JavaScript function. + */ + interface FunctionCoverage { + /** + * JavaScript function name. + */ + functionName: string; + /** + * Source ranges inside the function with coverage data. + */ + ranges: CoverageRange[]; + /** + * Whether coverage data for this function has block granularity. + */ + isBlockCoverage: boolean; + } + /** + * Coverage data for a JavaScript script. + */ + interface ScriptCoverage { + /** + * JavaScript script id. + */ + scriptId: Runtime.ScriptId; + /** + * JavaScript script name or url. + */ + url: string; + /** + * Functions contained in the script that has coverage data. + */ + functions: FunctionCoverage[]; + } + /** + * Describes a type collected during runtime. + * @experimental + */ + interface TypeObject { + /** + * Name of a type collected with type profiling. + */ + name: string; + } + /** + * Source offset and types for a parameter or return value. + * @experimental + */ + interface TypeProfileEntry { + /** + * Source offset of the parameter or end of function for return values. + */ + offset: number; + /** + * The types for this parameter or return value. + */ + types: TypeObject[]; + } + /** + * Type profile data collected during runtime for a JavaScript script. + * @experimental + */ + interface ScriptTypeProfile { + /** + * JavaScript script id. + */ + scriptId: Runtime.ScriptId; + /** + * JavaScript script name or url. + */ + url: string; + /** + * Type profile entries for parameters and return values of the functions in the script. + */ + entries: TypeProfileEntry[]; + } + interface SetSamplingIntervalParameterType { + /** + * New sampling interval in microseconds. + */ + interval: number; + } + interface StartPreciseCoverageParameterType { + /** + * Collect accurate call counts beyond simple 'covered' or 'not covered'. + */ + callCount?: boolean | undefined; + /** + * Collect block-based coverage. + */ + detailed?: boolean | undefined; + } + interface StopReturnType { + /** + * Recorded profile. + */ + profile: Profile; + } + interface TakePreciseCoverageReturnType { + /** + * Coverage data for the current isolate. + */ + result: ScriptCoverage[]; + } + interface GetBestEffortCoverageReturnType { + /** + * Coverage data for the current isolate. + */ + result: ScriptCoverage[]; + } + interface TakeTypeProfileReturnType { + /** + * Type profile for all scripts since startTypeProfile() was turned on. + */ + result: ScriptTypeProfile[]; + } + interface ConsoleProfileStartedEventDataType { + id: string; + /** + * Location of console.profile(). + */ + location: Debugger.Location; + /** + * Profile title passed as an argument to console.profile(). + */ + title?: string | undefined; + } + interface ConsoleProfileFinishedEventDataType { + id: string; + /** + * Location of console.profileEnd(). + */ + location: Debugger.Location; + profile: Profile; + /** + * Profile title passed as an argument to console.profile(). + */ + title?: string | undefined; + } + } + namespace HeapProfiler { + /** + * Heap snapshot object id. + */ + type HeapSnapshotObjectId = string; + /** + * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes. + */ + interface SamplingHeapProfileNode { + /** + * Function location. + */ + callFrame: Runtime.CallFrame; + /** + * Allocations size in bytes for the node excluding children. + */ + selfSize: number; + /** + * Child nodes. + */ + children: SamplingHeapProfileNode[]; + } + /** + * Profile. + */ + interface SamplingHeapProfile { + head: SamplingHeapProfileNode; + } + interface StartTrackingHeapObjectsParameterType { + trackAllocations?: boolean | undefined; + } + interface StopTrackingHeapObjectsParameterType { + /** + * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped. + */ + reportProgress?: boolean | undefined; + } + interface TakeHeapSnapshotParameterType { + /** + * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. + */ + reportProgress?: boolean | undefined; + } + interface GetObjectByHeapObjectIdParameterType { + objectId: HeapSnapshotObjectId; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string | undefined; + } + interface AddInspectedHeapObjectParameterType { + /** + * Heap snapshot object id to be accessible by means of $x command line API. + */ + heapObjectId: HeapSnapshotObjectId; + } + interface GetHeapObjectIdParameterType { + /** + * Identifier of the object to get heap object id for. + */ + objectId: Runtime.RemoteObjectId; + } + interface StartSamplingParameterType { + /** + * Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes. + */ + samplingInterval?: number | undefined; + } + interface GetObjectByHeapObjectIdReturnType { + /** + * Evaluation result. + */ + result: Runtime.RemoteObject; + } + interface GetHeapObjectIdReturnType { + /** + * Id of the heap snapshot object corresponding to the passed remote object id. + */ + heapSnapshotObjectId: HeapSnapshotObjectId; + } + interface StopSamplingReturnType { + /** + * Recorded sampling heap profile. + */ + profile: SamplingHeapProfile; + } + interface GetSamplingProfileReturnType { + /** + * Return the sampling profile being collected. + */ + profile: SamplingHeapProfile; + } + interface AddHeapSnapshotChunkEventDataType { + chunk: string; + } + interface ReportHeapSnapshotProgressEventDataType { + done: number; + total: number; + finished?: boolean | undefined; + } + interface LastSeenObjectIdEventDataType { + lastSeenObjectId: number; + timestamp: number; + } + interface HeapStatsUpdateEventDataType { + /** + * An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment. + */ + statsUpdate: number[]; + } + } + namespace NodeTracing { + interface TraceConfig { + /** + * Controls how the trace buffer stores data. + */ + recordMode?: string; + /** + * Included category filters. + */ + includedCategories: string[]; + } + interface StartParameterType { + traceConfig: TraceConfig; + } + interface GetCategoriesReturnType { + /** + * A list of supported tracing categories. + */ + categories: string[]; + } + interface DataCollectedEventDataType { + value: Array<{}>; + } + } + namespace NodeWorker { + type WorkerID = string; + /** + * Unique identifier of attached debugging session. + */ + type SessionID = string; + interface WorkerInfo { + workerId: WorkerID; + type: string; + title: string; + url: string; + } + interface SendMessageToWorkerParameterType { + message: string; + /** + * Identifier of the session. + */ + sessionId: SessionID; + } + interface EnableParameterType { + /** + * Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger` + * message to run them. + */ + waitForDebuggerOnStart: boolean; + } + interface DetachParameterType { + sessionId: SessionID; + } + interface AttachedToWorkerEventDataType { + /** + * Identifier assigned to the session used to send/receive messages. + */ + sessionId: SessionID; + workerInfo: WorkerInfo; + waitingForDebugger: boolean; + } + interface DetachedFromWorkerEventDataType { + /** + * Detached session identifier. + */ + sessionId: SessionID; + } + interface ReceivedMessageFromWorkerEventDataType { + /** + * Identifier of a session which sends a message. + */ + sessionId: SessionID; + message: string; + } + } + namespace NodeRuntime { + interface NotifyWhenWaitingForDisconnectParameterType { + enabled: boolean; + } + } + /** + * The `inspector.Session` is used for dispatching messages to the V8 inspector + * back-end and receiving message responses and notifications. + */ + class Session extends EventEmitter { + /** + * Create a new instance of the inspector.Session class. + * The inspector session needs to be connected through session.connect() before the messages can be dispatched to the inspector backend. + */ + constructor(); + /** + * Connects a session to the inspector back-end. + * @since v8.0.0 + */ + connect(): void; + /** + * Connects a session to the main thread inspector back-end. + * An exception will be thrown if this API was not called on a Worker + * thread. + * @since 12.11.0 + */ + connectToMainThread(): void; + /** + * Immediately close the session. All pending message callbacks will be called + * with an error. `session.connect()` will need to be called to be able to send + * messages again. Reconnected session will lose all inspector state, such as + * enabled agents or configured breakpoints. + * @since v8.0.0 + */ + disconnect(): void; + /** + * Posts a message to the inspector back-end. `callback` will be notified when + * a response is received. `callback` is a function that accepts two optional + * arguments: error and message-specific result. + * + * ```js + * session.post('Runtime.evaluate', { expression: '2 + 2' }, + * (error, { result }) => console.log(result)); + * // Output: { type: 'number', value: 4, description: '4' } + * ``` + * + * The latest version of the V8 inspector protocol is published on the [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/). + * + * Node.js inspector supports all the Chrome DevTools Protocol domains declared + * by V8\. Chrome DevTools Protocol domain provides an interface for interacting + * with one of the runtime agents used to inspect the application state and listen + * to the run-time events. + * + * ## Example usage + * + * Apart from the debugger, various V8 Profilers are available through the DevTools + * protocol. + * @since v8.0.0 + */ + post(method: string, params?: {}, callback?: (err: Error | null, params?: {}) => void): void; + post(method: string, callback?: (err: Error | null, params?: {}) => void): void; + /** + * Returns supported domains. + */ + post(method: 'Schema.getDomains', callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void; + /** + * Evaluates expression on global object. + */ + post(method: 'Runtime.evaluate', params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; + post(method: 'Runtime.evaluate', callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; + /** + * Add handler to promise with given promise object id. + */ + post(method: 'Runtime.awaitPromise', params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; + post(method: 'Runtime.awaitPromise', callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; + /** + * Calls function with given declaration on the given object. Object group of the result is inherited from the target object. + */ + post(method: 'Runtime.callFunctionOn', params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; + post(method: 'Runtime.callFunctionOn', callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; + /** + * Returns properties of a given object. Object group of the result is inherited from the target object. + */ + post(method: 'Runtime.getProperties', params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; + post(method: 'Runtime.getProperties', callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; + /** + * Releases remote object with given id. + */ + post(method: 'Runtime.releaseObject', params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Runtime.releaseObject', callback?: (err: Error | null) => void): void; + /** + * Releases all remote objects that belong to a given group. + */ + post(method: 'Runtime.releaseObjectGroup', params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Runtime.releaseObjectGroup', callback?: (err: Error | null) => void): void; + /** + * Tells inspected instance to run if it was waiting for debugger to attach. + */ + post(method: 'Runtime.runIfWaitingForDebugger', callback?: (err: Error | null) => void): void; + /** + * Enables reporting of execution contexts creation by means of executionContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing execution context. + */ + post(method: 'Runtime.enable', callback?: (err: Error | null) => void): void; + /** + * Disables reporting of execution contexts creation. + */ + post(method: 'Runtime.disable', callback?: (err: Error | null) => void): void; + /** + * Discards collected exceptions and console API calls. + */ + post(method: 'Runtime.discardConsoleEntries', callback?: (err: Error | null) => void): void; + /** + * @experimental + */ + post(method: 'Runtime.setCustomObjectFormatterEnabled', params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Runtime.setCustomObjectFormatterEnabled', callback?: (err: Error | null) => void): void; + /** + * Compiles expression. + */ + post(method: 'Runtime.compileScript', params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; + post(method: 'Runtime.compileScript', callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; + /** + * Runs script with given id in a given context. + */ + post(method: 'Runtime.runScript', params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; + post(method: 'Runtime.runScript', callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; + post(method: 'Runtime.queryObjects', params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; + post(method: 'Runtime.queryObjects', callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; + /** + * Returns all let, const and class variables from global scope. + */ + post( + method: 'Runtime.globalLexicalScopeNames', + params?: Runtime.GlobalLexicalScopeNamesParameterType, + callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void + ): void; + post(method: 'Runtime.globalLexicalScopeNames', callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void): void; + /** + * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received. + */ + post(method: 'Debugger.enable', callback?: (err: Error | null, params: Debugger.EnableReturnType) => void): void; + /** + * Disables debugger for given page. + */ + post(method: 'Debugger.disable', callback?: (err: Error | null) => void): void; + /** + * Activates / deactivates all breakpoints on the page. + */ + post(method: 'Debugger.setBreakpointsActive', params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setBreakpointsActive', callback?: (err: Error | null) => void): void; + /** + * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). + */ + post(method: 'Debugger.setSkipAllPauses', params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setSkipAllPauses', callback?: (err: Error | null) => void): void; + /** + * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in locations property. Further matching script parsing will result in subsequent breakpointResolved events issued. This logical breakpoint will survive page reloads. + */ + post(method: 'Debugger.setBreakpointByUrl', params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; + post(method: 'Debugger.setBreakpointByUrl', callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; + /** + * Sets JavaScript breakpoint at a given location. + */ + post(method: 'Debugger.setBreakpoint', params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; + post(method: 'Debugger.setBreakpoint', callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; + /** + * Removes JavaScript breakpoint. + */ + post(method: 'Debugger.removeBreakpoint', params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.removeBreakpoint', callback?: (err: Error | null) => void): void; + /** + * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. + */ + post( + method: 'Debugger.getPossibleBreakpoints', + params?: Debugger.GetPossibleBreakpointsParameterType, + callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void + ): void; + post(method: 'Debugger.getPossibleBreakpoints', callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void; + /** + * Continues execution until specific location is reached. + */ + post(method: 'Debugger.continueToLocation', params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.continueToLocation', callback?: (err: Error | null) => void): void; + /** + * @experimental + */ + post(method: 'Debugger.pauseOnAsyncCall', params?: Debugger.PauseOnAsyncCallParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.pauseOnAsyncCall', callback?: (err: Error | null) => void): void; + /** + * Steps over the statement. + */ + post(method: 'Debugger.stepOver', callback?: (err: Error | null) => void): void; + /** + * Steps into the function call. + */ + post(method: 'Debugger.stepInto', params?: Debugger.StepIntoParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.stepInto', callback?: (err: Error | null) => void): void; + /** + * Steps out of the function call. + */ + post(method: 'Debugger.stepOut', callback?: (err: Error | null) => void): void; + /** + * Stops on the next JavaScript statement. + */ + post(method: 'Debugger.pause', callback?: (err: Error | null) => void): void; + /** + * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called. + * @experimental + */ + post(method: 'Debugger.scheduleStepIntoAsync', callback?: (err: Error | null) => void): void; + /** + * Resumes JavaScript execution. + */ + post(method: 'Debugger.resume', callback?: (err: Error | null) => void): void; + /** + * Returns stack trace with given stackTraceId. + * @experimental + */ + post(method: 'Debugger.getStackTrace', params?: Debugger.GetStackTraceParameterType, callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; + post(method: 'Debugger.getStackTrace', callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; + /** + * Searches for given string in script content. + */ + post(method: 'Debugger.searchInContent', params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; + post(method: 'Debugger.searchInContent', callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; + /** + * Edits JavaScript source live. + */ + post(method: 'Debugger.setScriptSource', params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; + post(method: 'Debugger.setScriptSource', callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; + /** + * Restarts particular call frame from the beginning. + */ + post(method: 'Debugger.restartFrame', params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; + post(method: 'Debugger.restartFrame', callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; + /** + * Returns source for the script with given id. + */ + post(method: 'Debugger.getScriptSource', params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; + post(method: 'Debugger.getScriptSource', callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; + /** + * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is none. + */ + post(method: 'Debugger.setPauseOnExceptions', params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setPauseOnExceptions', callback?: (err: Error | null) => void): void; + /** + * Evaluates expression on a given call frame. + */ + post(method: 'Debugger.evaluateOnCallFrame', params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; + post(method: 'Debugger.evaluateOnCallFrame', callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; + /** + * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. + */ + post(method: 'Debugger.setVariableValue', params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setVariableValue', callback?: (err: Error | null) => void): void; + /** + * Changes return value in top frame. Available only at return break position. + * @experimental + */ + post(method: 'Debugger.setReturnValue', params?: Debugger.SetReturnValueParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setReturnValue', callback?: (err: Error | null) => void): void; + /** + * Enables or disables async call stacks tracking. + */ + post(method: 'Debugger.setAsyncCallStackDepth', params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setAsyncCallStackDepth', callback?: (err: Error | null) => void): void; + /** + * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. + * @experimental + */ + post(method: 'Debugger.setBlackboxPatterns', params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setBlackboxPatterns', callback?: (err: Error | null) => void): void; + /** + * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted. + * @experimental + */ + post(method: 'Debugger.setBlackboxedRanges', params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setBlackboxedRanges', callback?: (err: Error | null) => void): void; + /** + * Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification. + */ + post(method: 'Console.enable', callback?: (err: Error | null) => void): void; + /** + * Disables console domain, prevents further console messages from being reported to the client. + */ + post(method: 'Console.disable', callback?: (err: Error | null) => void): void; + /** + * Does nothing. + */ + post(method: 'Console.clearMessages', callback?: (err: Error | null) => void): void; + post(method: 'Profiler.enable', callback?: (err: Error | null) => void): void; + post(method: 'Profiler.disable', callback?: (err: Error | null) => void): void; + /** + * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. + */ + post(method: 'Profiler.setSamplingInterval', params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Profiler.setSamplingInterval', callback?: (err: Error | null) => void): void; + post(method: 'Profiler.start', callback?: (err: Error | null) => void): void; + post(method: 'Profiler.stop', callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void; + /** + * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters. + */ + post(method: 'Profiler.startPreciseCoverage', params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Profiler.startPreciseCoverage', callback?: (err: Error | null) => void): void; + /** + * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code. + */ + post(method: 'Profiler.stopPreciseCoverage', callback?: (err: Error | null) => void): void; + /** + * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started. + */ + post(method: 'Profiler.takePreciseCoverage', callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void; + /** + * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection. + */ + post(method: 'Profiler.getBestEffortCoverage', callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void; + /** + * Enable type profile. + * @experimental + */ + post(method: 'Profiler.startTypeProfile', callback?: (err: Error | null) => void): void; + /** + * Disable type profile. Disabling releases type profile data collected so far. + * @experimental + */ + post(method: 'Profiler.stopTypeProfile', callback?: (err: Error | null) => void): void; + /** + * Collect type profile. + * @experimental + */ + post(method: 'Profiler.takeTypeProfile', callback?: (err: Error | null, params: Profiler.TakeTypeProfileReturnType) => void): void; + post(method: 'HeapProfiler.enable', callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.disable', callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.startTrackingHeapObjects', params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.startTrackingHeapObjects', callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.stopTrackingHeapObjects', params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.stopTrackingHeapObjects', callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.takeHeapSnapshot', params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.takeHeapSnapshot', callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.collectGarbage', callback?: (err: Error | null) => void): void; + post( + method: 'HeapProfiler.getObjectByHeapObjectId', + params?: HeapProfiler.GetObjectByHeapObjectIdParameterType, + callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void + ): void; + post(method: 'HeapProfiler.getObjectByHeapObjectId', callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void; + /** + * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). + */ + post(method: 'HeapProfiler.addInspectedHeapObject', params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.addInspectedHeapObject', callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.getHeapObjectId', params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; + post(method: 'HeapProfiler.getHeapObjectId', callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; + post(method: 'HeapProfiler.startSampling', params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.startSampling', callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.stopSampling', callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void; + post(method: 'HeapProfiler.getSamplingProfile', callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void; + /** + * Gets supported tracing categories. + */ + post(method: 'NodeTracing.getCategories', callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void; + /** + * Start trace events collection. + */ + post(method: 'NodeTracing.start', params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void; + post(method: 'NodeTracing.start', callback?: (err: Error | null) => void): void; + /** + * Stop trace events collection. Remaining collected events will be sent as a sequence of + * dataCollected events followed by tracingComplete event. + */ + post(method: 'NodeTracing.stop', callback?: (err: Error | null) => void): void; + /** + * Sends protocol message over session with given id. + */ + post(method: 'NodeWorker.sendMessageToWorker', params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void; + post(method: 'NodeWorker.sendMessageToWorker', callback?: (err: Error | null) => void): void; + /** + * Instructs the inspector to attach to running workers. Will also attach to new workers + * as they start + */ + post(method: 'NodeWorker.enable', params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void; + post(method: 'NodeWorker.enable', callback?: (err: Error | null) => void): void; + /** + * Detaches from all running workers and disables attaching to new workers as they are started. + */ + post(method: 'NodeWorker.disable', callback?: (err: Error | null) => void): void; + /** + * Detached from the worker with given sessionId. + */ + post(method: 'NodeWorker.detach', params?: NodeWorker.DetachParameterType, callback?: (err: Error | null) => void): void; + post(method: 'NodeWorker.detach', callback?: (err: Error | null) => void): void; + /** + * Enable the `NodeRuntime.waitingForDisconnect`. + */ + post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType, callback?: (err: Error | null) => void): void; + post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', callback?: (err: Error | null) => void): void; + // Events + addListener(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + addListener(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this; + /** + * Issued when new execution context is created. + */ + addListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + addListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + addListener(event: 'Runtime.executionContextsCleared', listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + addListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + addListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + addListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + addListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + addListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + addListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + addListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + addListener(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + addListener(event: 'Debugger.resumed', listener: () => void): this; + /** + * Issued when new console message is added. + */ + addListener(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + addListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; + addListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; + addListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; + addListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this; + addListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + addListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + addListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; + /** + * Contains an bucket of collected trace events. + */ + addListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + addListener(event: 'NodeTracing.tracingComplete', listener: () => void): this; + /** + * Issued when attached to a worker. + */ + addListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + addListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + addListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + addListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: 'inspectorNotification', message: InspectorNotification<{}>): boolean; + emit(event: 'Runtime.executionContextCreated', message: InspectorNotification): boolean; + emit(event: 'Runtime.executionContextDestroyed', message: InspectorNotification): boolean; + emit(event: 'Runtime.executionContextsCleared'): boolean; + emit(event: 'Runtime.exceptionThrown', message: InspectorNotification): boolean; + emit(event: 'Runtime.exceptionRevoked', message: InspectorNotification): boolean; + emit(event: 'Runtime.consoleAPICalled', message: InspectorNotification): boolean; + emit(event: 'Runtime.inspectRequested', message: InspectorNotification): boolean; + emit(event: 'Debugger.scriptParsed', message: InspectorNotification): boolean; + emit(event: 'Debugger.scriptFailedToParse', message: InspectorNotification): boolean; + emit(event: 'Debugger.breakpointResolved', message: InspectorNotification): boolean; + emit(event: 'Debugger.paused', message: InspectorNotification): boolean; + emit(event: 'Debugger.resumed'): boolean; + emit(event: 'Console.messageAdded', message: InspectorNotification): boolean; + emit(event: 'Profiler.consoleProfileStarted', message: InspectorNotification): boolean; + emit(event: 'Profiler.consoleProfileFinished', message: InspectorNotification): boolean; + emit(event: 'HeapProfiler.addHeapSnapshotChunk', message: InspectorNotification): boolean; + emit(event: 'HeapProfiler.resetProfiles'): boolean; + emit(event: 'HeapProfiler.reportHeapSnapshotProgress', message: InspectorNotification): boolean; + emit(event: 'HeapProfiler.lastSeenObjectId', message: InspectorNotification): boolean; + emit(event: 'HeapProfiler.heapStatsUpdate', message: InspectorNotification): boolean; + emit(event: 'NodeTracing.dataCollected', message: InspectorNotification): boolean; + emit(event: 'NodeTracing.tracingComplete'): boolean; + emit(event: 'NodeWorker.attachedToWorker', message: InspectorNotification): boolean; + emit(event: 'NodeWorker.detachedFromWorker', message: InspectorNotification): boolean; + emit(event: 'NodeWorker.receivedMessageFromWorker', message: InspectorNotification): boolean; + emit(event: 'NodeRuntime.waitingForDisconnect'): boolean; + on(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + on(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this; + /** + * Issued when new execution context is created. + */ + on(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + on(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + on(event: 'Runtime.executionContextsCleared', listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + on(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + on(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + on(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + on(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + on(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + on(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + on(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + on(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + on(event: 'Debugger.resumed', listener: () => void): this; + /** + * Issued when new console message is added. + */ + on(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + on(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; + on(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; + on(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; + on(event: 'HeapProfiler.resetProfiles', listener: () => void): this; + on(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + on(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + on(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; + /** + * Contains an bucket of collected trace events. + */ + on(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + on(event: 'NodeTracing.tracingComplete', listener: () => void): this; + /** + * Issued when attached to a worker. + */ + on(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + on(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + on(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + on(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; + once(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + once(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this; + /** + * Issued when new execution context is created. + */ + once(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + once(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + once(event: 'Runtime.executionContextsCleared', listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + once(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + once(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + once(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + once(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + once(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + once(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + once(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + once(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + once(event: 'Debugger.resumed', listener: () => void): this; + /** + * Issued when new console message is added. + */ + once(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + once(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; + once(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; + once(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; + once(event: 'HeapProfiler.resetProfiles', listener: () => void): this; + once(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + once(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + once(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; + /** + * Contains an bucket of collected trace events. + */ + once(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + once(event: 'NodeTracing.tracingComplete', listener: () => void): this; + /** + * Issued when attached to a worker. + */ + once(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + once(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + once(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + once(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependListener(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this; + /** + * Issued when new execution context is created. + */ + prependListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + prependListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + prependListener(event: 'Runtime.executionContextsCleared', listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + prependListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + prependListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + prependListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + prependListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + prependListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + prependListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependListener(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + prependListener(event: 'Debugger.resumed', listener: () => void): this; + /** + * Issued when new console message is added. + */ + prependListener(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; + prependListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; + prependListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; + prependListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this; + prependListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; + /** + * Contains an bucket of collected trace events. + */ + prependListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + prependListener(event: 'NodeTracing.tracingComplete', listener: () => void): this; + /** + * Issued when attached to a worker. + */ + prependListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + prependListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + prependListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + prependListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependOnceListener(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this; + /** + * Issued when new execution context is created. + */ + prependOnceListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + prependOnceListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + prependOnceListener(event: 'Runtime.executionContextsCleared', listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + prependOnceListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + prependOnceListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + prependOnceListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + prependOnceListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + prependOnceListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + prependOnceListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependOnceListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependOnceListener(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + prependOnceListener(event: 'Debugger.resumed', listener: () => void): this; + /** + * Issued when new console message is added. + */ + prependOnceListener(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependOnceListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this; + prependOnceListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependOnceListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependOnceListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; + /** + * Contains an bucket of collected trace events. + */ + prependOnceListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + prependOnceListener(event: 'NodeTracing.tracingComplete', listener: () => void): this; + /** + * Issued when attached to a worker. + */ + prependOnceListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + prependOnceListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + prependOnceListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + prependOnceListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; + } + /** + * Activate inspector on host and port. Equivalent to `node --inspect=[[host:]port]`, but can be done programmatically after node has + * started. + * + * If wait is `true`, will block until a client has connected to the inspect port + * and flow control has been passed to the debugger client. + * + * See the `security warning` regarding the `host`parameter usage. + * @param [port='what was specified on the CLI'] Port to listen on for inspector connections. Optional. + * @param [host='what was specified on the CLI'] Host to listen on for inspector connections. Optional. + * @param [wait=false] Block until a client has connected. Optional. + */ + function open(port?: number, host?: string, wait?: boolean): void; + /** + * Deactivate the inspector. Blocks until there are no active connections. + */ + function close(): void; + /** + * Return the URL of the active inspector, or `undefined` if there is none. + * + * ```console + * $ node --inspect -p 'inspector.url()' + * Debugger listening on ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34 + * For help see https://nodejs.org/en/docs/inspector + * ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34 + * + * $ node --inspect=localhost:3000 -p 'inspector.url()' + * Debugger listening on ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a + * For help see https://nodejs.org/en/docs/inspector + * ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a + * + * $ node -p 'inspector.url()' + * undefined + * ``` + */ + function url(): string | undefined; + /** + * Blocks until a client (existing or connected later) has sent`Runtime.runIfWaitingForDebugger` command. + * + * An exception will be thrown if there is no active inspector. + * @since v12.7.0 + */ + function waitForDebugger(): void; +} +declare module 'node:inspector' { + import EventEmitter = require('inspector'); + export = EventEmitter; +} diff --git a/frontend/node_modules/@types/node/module.d.ts b/frontend/node_modules/@types/node/module.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d83aec94aae2df96e4028c6fdb09bf61051e5a38 --- /dev/null +++ b/frontend/node_modules/@types/node/module.d.ts @@ -0,0 +1,114 @@ +/** + * @since v0.3.7 + */ +declare module 'module' { + import { URL } from 'node:url'; + namespace Module { + /** + * The `module.syncBuiltinESMExports()` method updates all the live bindings for + * builtin `ES Modules` to match the properties of the `CommonJS` exports. It + * does not add or remove exported names from the `ES Modules`. + * + * ```js + * const fs = require('fs'); + * const assert = require('assert'); + * const { syncBuiltinESMExports } = require('module'); + * + * fs.readFile = newAPI; + * + * delete fs.readFileSync; + * + * function newAPI() { + * // ... + * } + * + * fs.newAPI = newAPI; + * + * syncBuiltinESMExports(); + * + * import('fs').then((esmFS) => { + * // It syncs the existing readFile property with the new value + * assert.strictEqual(esmFS.readFile, newAPI); + * // readFileSync has been deleted from the required fs + * assert.strictEqual('readFileSync' in fs, false); + * // syncBuiltinESMExports() does not remove readFileSync from esmFS + * assert.strictEqual('readFileSync' in esmFS, true); + * // syncBuiltinESMExports() does not add names + * assert.strictEqual(esmFS.newAPI, undefined); + * }); + * ``` + * @since v12.12.0 + */ + function syncBuiltinESMExports(): void; + /** + * `path` is the resolved path for the file for which a corresponding source map + * should be fetched. + * @since v13.7.0, v12.17.0 + */ + function findSourceMap(path: string, error?: Error): SourceMap; + interface SourceMapPayload { + file: string; + version: number; + sources: string[]; + sourcesContent: string[]; + names: string[]; + mappings: string; + sourceRoot: string; + } + interface SourceMapping { + generatedLine: number; + generatedColumn: number; + originalSource: string; + originalLine: number; + originalColumn: number; + } + /** + * @since v13.7.0, v12.17.0 + */ + class SourceMap { + /** + * Getter for the payload used to construct the `SourceMap` instance. + */ + readonly payload: SourceMapPayload; + constructor(payload: SourceMapPayload); + /** + * Given a line number and column number in the generated source file, returns + * an object representing the position in the original file. The object returned + * consists of the following keys: + */ + findEntry(line: number, column: number): SourceMapping; + } + } + interface Module extends NodeModule {} + class Module { + static runMain(): void; + static wrap(code: string): string; + static createRequire(path: string | URL): NodeRequire; + static builtinModules: string[]; + static Module: typeof Module; + constructor(id: string, parent?: Module); + } + global { + interface ImportMeta { + url: string; + /** + * @experimental + * This feature is only available with the `--experimental-import-meta-resolve` + * command flag enabled. + * + * Provides a module-relative resolution function scoped to each module, returning + * the URL string. + * + * @param specified The module specifier to resolve relative to `parent`. + * @param parent The absolute parent module URL to resolve from. If none + * is specified, the value of `import.meta.url` is used as the default. + */ + resolve?(specified: string, parent?: string | URL): Promise; + } + } + export = Module; +} +declare module 'node:module' { + import module = require('module'); + export = module; +} diff --git a/frontend/node_modules/@types/node/net.d.ts b/frontend/node_modules/@types/node/net.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8706493487c79f5a3cd58832afcf34cafa8b69ec --- /dev/null +++ b/frontend/node_modules/@types/node/net.d.ts @@ -0,0 +1,783 @@ +/** + * > Stability: 2 - Stable + * + * The `net` module provides an asynchronous network API for creating stream-based + * TCP or `IPC` servers ({@link createServer}) and clients + * ({@link createConnection}). + * + * It can be accessed using: + * + * ```js + * const net = require('net'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/net.js) + */ +declare module 'net' { + import * as stream from 'node:stream'; + import { Abortable, EventEmitter } from 'node:events'; + import * as dns from 'node:dns'; + type LookupFunction = (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void; + interface AddressInfo { + address: string; + family: string; + port: number; + } + interface SocketConstructorOpts { + fd?: number | undefined; + allowHalfOpen?: boolean | undefined; + readable?: boolean | undefined; + writable?: boolean | undefined; + } + interface OnReadOpts { + buffer: Uint8Array | (() => Uint8Array); + /** + * This function is called for every chunk of incoming data. + * Two arguments are passed to it: the number of bytes written to buffer and a reference to buffer. + * Return false from this function to implicitly pause() the socket. + */ + callback(bytesWritten: number, buf: Uint8Array): boolean; + } + interface ConnectOpts { + /** + * If specified, incoming data is stored in a single buffer and passed to the supplied callback when data arrives on the socket. + * Note: this will cause the streaming functionality to not provide any data, however events like 'error', 'end', and 'close' will + * still be emitted as normal and methods like pause() and resume() will also behave as expected. + */ + onread?: OnReadOpts | undefined; + } + interface TcpSocketConnectOpts extends ConnectOpts { + port: number; + host?: string | undefined; + localAddress?: string | undefined; + localPort?: number | undefined; + hints?: number | undefined; + family?: number | undefined; + lookup?: LookupFunction | undefined; + } + interface IpcSocketConnectOpts extends ConnectOpts { + path: string; + } + type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts; + /** + * This class is an abstraction of a TCP socket or a streaming `IPC` endpoint + * (uses named pipes on Windows, and Unix domain sockets otherwise). It is also + * an `EventEmitter`. + * + * A `net.Socket` can be created by the user and used directly to interact with + * a server. For example, it is returned by {@link createConnection}, + * so the user can use it to talk to the server. + * + * It can also be created by Node.js and passed to the user when a connection + * is received. For example, it is passed to the listeners of a `'connection'` event emitted on a {@link Server}, so the user can use + * it to interact with the client. + * @since v0.3.4 + */ + class Socket extends stream.Duplex { + constructor(options?: SocketConstructorOpts); + /** + * Sends data on the socket. The second parameter specifies the encoding in the + * case of a string. It defaults to UTF8 encoding. + * + * Returns `true` if the entire data was flushed successfully to the kernel + * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is again free. + * + * The optional `callback` parameter will be executed when the data is finally + * written out, which may not be immediately. + * + * See `Writable` stream `write()` method for more + * information. + * @since v0.1.90 + * @param [encoding='utf8'] Only used when data is `string`. + */ + write(buffer: Uint8Array | string, cb?: (err?: Error) => void): boolean; + write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error) => void): boolean; + /** + * Initiate a connection on a given socket. + * + * Possible signatures: + * + * * `socket.connect(options[, connectListener])` + * * `socket.connect(path[, connectListener])` for `IPC` connections. + * * `socket.connect(port[, host][, connectListener])` for TCP connections. + * * Returns: `net.Socket` The socket itself. + * + * This function is asynchronous. When the connection is established, the `'connect'` event will be emitted. If there is a problem connecting, + * instead of a `'connect'` event, an `'error'` event will be emitted with + * the error passed to the `'error'` listener. + * The last parameter `connectListener`, if supplied, will be added as a listener + * for the `'connect'` event **once**. + * + * This function should only be used for reconnecting a socket after`'close'` has been emitted or otherwise it may lead to undefined + * behavior. + */ + connect(options: SocketConnectOpts, connectionListener?: () => void): this; + connect(port: number, host: string, connectionListener?: () => void): this; + connect(port: number, connectionListener?: () => void): this; + connect(path: string, connectionListener?: () => void): this; + /** + * Set the encoding for the socket as a `Readable Stream`. See `readable.setEncoding()` for more information. + * @since v0.1.90 + * @return The socket itself. + */ + setEncoding(encoding?: BufferEncoding): this; + /** + * Pauses the reading of data. That is, `'data'` events will not be emitted. + * Useful to throttle back an upload. + * @return The socket itself. + */ + pause(): this; + /** + * Resumes reading after a call to `socket.pause()`. + * @return The socket itself. + */ + resume(): this; + /** + * Sets the socket to timeout after `timeout` milliseconds of inactivity on + * the socket. By default `net.Socket` do not have a timeout. + * + * When an idle timeout is triggered the socket will receive a `'timeout'` event but the connection will not be severed. The user must manually call `socket.end()` or `socket.destroy()` to + * end the connection. + * + * ```js + * socket.setTimeout(3000); + * socket.on('timeout', () => { + * console.log('socket timeout'); + * socket.end(); + * }); + * ``` + * + * If `timeout` is 0, then the existing idle timeout is disabled. + * + * The optional `callback` parameter will be added as a one-time listener for the `'timeout'` event. + * @since v0.1.90 + * @return The socket itself. + */ + setTimeout(timeout: number, callback?: () => void): this; + /** + * Enable/disable the use of Nagle's algorithm. + * + * When a TCP connection is created, it will have Nagle's algorithm enabled. + * + * Nagle's algorithm delays data before it is sent via the network. It attempts + * to optimize throughput at the expense of latency. + * + * Passing `true` for `noDelay` or not passing an argument will disable Nagle's + * algorithm for the socket. Passing `false` for `noDelay` will enable Nagle's + * algorithm. + * @since v0.1.90 + * @param [noDelay=true] + * @return The socket itself. + */ + setNoDelay(noDelay?: boolean): this; + /** + * Enable/disable keep-alive functionality, and optionally set the initial + * delay before the first keepalive probe is sent on an idle socket. + * + * Set `initialDelay` (in milliseconds) to set the delay between the last + * data packet received and the first keepalive probe. Setting `0` for`initialDelay` will leave the value unchanged from the default + * (or previous) setting. + * + * Enabling the keep-alive functionality will set the following socket options: + * + * * `SO_KEEPALIVE=1` + * * `TCP_KEEPIDLE=initialDelay` + * * `TCP_KEEPCNT=10` + * * `TCP_KEEPINTVL=1` + * @since v0.1.92 + * @param [enable=false] + * @param [initialDelay=0] + * @return The socket itself. + */ + setKeepAlive(enable?: boolean, initialDelay?: number): this; + /** + * Returns the bound `address`, the address `family` name and `port` of the + * socket as reported by the operating system:`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }` + * @since v0.1.90 + */ + address(): AddressInfo | {}; + /** + * Calling `unref()` on a socket will allow the program to exit if this is the only + * active socket in the event system. If the socket is already `unref`ed calling`unref()` again will have no effect. + * @since v0.9.1 + * @return The socket itself. + */ + unref(): this; + /** + * Opposite of `unref()`, calling `ref()` on a previously `unref`ed socket will_not_ let the program exit if it's the only socket left (the default behavior). + * If the socket is `ref`ed calling `ref` again will have no effect. + * @since v0.9.1 + * @return The socket itself. + */ + ref(): this; + /** + * This property shows the number of characters buffered for writing. The buffer + * may contain strings whose length after encoding is not yet known. So this number + * is only an approximation of the number of bytes in the buffer. + * + * `net.Socket` has the property that `socket.write()` always works. This is to + * help users get up and running quickly. The computer cannot always keep up + * with the amount of data that is written to a socket. The network connection + * simply might be too slow. Node.js will internally queue up the data written to a + * socket and send it out over the wire when it is possible. + * + * The consequence of this internal buffering is that memory may grow. + * Users who experience large or growing `bufferSize` should attempt to + * "throttle" the data flows in their program with `socket.pause()` and `socket.resume()`. + * @since v0.3.8 + * @deprecated Since v14.6.0 - Use `writableLength` instead. + */ + readonly bufferSize: number; + /** + * The amount of received bytes. + * @since v0.5.3 + */ + readonly bytesRead: number; + /** + * The amount of bytes sent. + * @since v0.5.3 + */ + readonly bytesWritten: number; + /** + * If `true`,`socket.connect(options[, connectListener])` was + * called and has not yet finished. It will stay `true` until the socket becomes + * connected, then it is set to `false` and the `'connect'` event is emitted. Note + * that the `socket.connect(options[, connectListener])` callback is a listener for the `'connect'` event. + * @since v6.1.0 + */ + readonly connecting: boolean; + /** + * See `writable.destroyed` for further details. + */ + readonly destroyed: boolean; + /** + * The string representation of the local IP address the remote client is + * connecting on. For example, in a server listening on `'0.0.0.0'`, if a client + * connects on `'192.168.1.1'`, the value of `socket.localAddress` would be`'192.168.1.1'`. + * @since v0.9.6 + */ + readonly localAddress?: string; + /** + * The numeric representation of the local port. For example, `80` or `21`. + * @since v0.9.6 + */ + readonly localPort?: number; + /** + * The string representation of the remote IP address. For example,`'74.125.127.100'` or `'2001:4860:a005::68'`. Value may be `undefined` if + * the socket is destroyed (for example, if the client disconnected). + * @since v0.5.10 + */ + readonly remoteAddress?: string | undefined; + /** + * The string representation of the remote IP family. `'IPv4'` or `'IPv6'`. + * @since v0.11.14 + */ + readonly remoteFamily?: string | undefined; + /** + * The numeric representation of the remote port. For example, `80` or `21`. + * @since v0.5.10 + */ + readonly remotePort?: number | undefined; + /** + * Half-closes the socket. i.e., it sends a FIN packet. It is possible the + * server will still send some data. + * + * See `writable.end()` for further details. + * @since v0.1.90 + * @param [encoding='utf8'] Only used when data is `string`. + * @param callback Optional callback for when the socket is finished. + * @return The socket itself. + */ + end(callback?: () => void): void; + end(buffer: Uint8Array | string, callback?: () => void): void; + end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): void; + /** + * events.EventEmitter + * 1. close + * 2. connect + * 3. data + * 4. drain + * 5. end + * 6. error + * 7. lookup + * 8. timeout + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'close', listener: (hadError: boolean) => void): this; + addListener(event: 'connect', listener: () => void): this; + addListener(event: 'data', listener: (data: Buffer) => void): this; + addListener(event: 'drain', listener: () => void): this; + addListener(event: 'end', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this; + addListener(event: 'ready', listener: () => void): this; + addListener(event: 'timeout', listener: () => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: 'close', hadError: boolean): boolean; + emit(event: 'connect'): boolean; + emit(event: 'data', data: Buffer): boolean; + emit(event: 'drain'): boolean; + emit(event: 'end'): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'lookup', err: Error, address: string, family: string | number, host: string): boolean; + emit(event: 'ready'): boolean; + emit(event: 'timeout'): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'close', listener: (hadError: boolean) => void): this; + on(event: 'connect', listener: () => void): this; + on(event: 'data', listener: (data: Buffer) => void): this; + on(event: 'drain', listener: () => void): this; + on(event: 'end', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this; + on(event: 'ready', listener: () => void): this; + on(event: 'timeout', listener: () => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'close', listener: (hadError: boolean) => void): this; + once(event: 'connect', listener: () => void): this; + once(event: 'data', listener: (data: Buffer) => void): this; + once(event: 'drain', listener: () => void): this; + once(event: 'end', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this; + once(event: 'ready', listener: () => void): this; + once(event: 'timeout', listener: () => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'close', listener: (hadError: boolean) => void): this; + prependListener(event: 'connect', listener: () => void): this; + prependListener(event: 'data', listener: (data: Buffer) => void): this; + prependListener(event: 'drain', listener: () => void): this; + prependListener(event: 'end', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this; + prependListener(event: 'ready', listener: () => void): this; + prependListener(event: 'timeout', listener: () => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'close', listener: (hadError: boolean) => void): this; + prependOnceListener(event: 'connect', listener: () => void): this; + prependOnceListener(event: 'data', listener: (data: Buffer) => void): this; + prependOnceListener(event: 'drain', listener: () => void): this; + prependOnceListener(event: 'end', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this; + prependOnceListener(event: 'ready', listener: () => void): this; + prependOnceListener(event: 'timeout', listener: () => void): this; + } + interface ListenOptions extends Abortable { + port?: number | undefined; + host?: string | undefined; + backlog?: number | undefined; + path?: string | undefined; + exclusive?: boolean | undefined; + readableAll?: boolean | undefined; + writableAll?: boolean | undefined; + /** + * @default false + */ + ipv6Only?: boolean | undefined; + } + interface ServerOpts { + /** + * Indicates whether half-opened TCP connections are allowed. + * @default false + */ + allowHalfOpen?: boolean | undefined; + /** + * Indicates whether the socket should be paused on incoming connections. + * @default false + */ + pauseOnConnect?: boolean | undefined; + } + /** + * This class is used to create a TCP or `IPC` server. + * @since v0.1.90 + */ + class Server extends EventEmitter { + constructor(connectionListener?: (socket: Socket) => void); + constructor(options?: ServerOpts, connectionListener?: (socket: Socket) => void); + /** + * Start a server listening for connections. A `net.Server` can be a TCP or + * an `IPC` server depending on what it listens to. + * + * Possible signatures: + * + * * `server.listen(handle[, backlog][, callback])` + * * `server.listen(options[, callback])` + * * `server.listen(path[, backlog][, callback])` for `IPC` servers + * * `server.listen([port[, host[, backlog]]][, callback])` for TCP servers + * + * This function is asynchronous. When the server starts listening, the `'listening'` event will be emitted. The last parameter `callback`will be added as a listener for the `'listening'` + * event. + * + * All `listen()` methods can take a `backlog` parameter to specify the maximum + * length of the queue of pending connections. The actual length will be determined + * by the OS through sysctl settings such as `tcp_max_syn_backlog` and `somaxconn`on Linux. The default value of this parameter is 511 (not 512). + * + * All {@link Socket} are set to `SO_REUSEADDR` (see [`socket(7)`](https://man7.org/linux/man-pages/man7/socket.7.html) for + * details). + * + * The `server.listen()` method can be called again if and only if there was an + * error during the first `server.listen()` call or `server.close()` has been + * called. Otherwise, an `ERR_SERVER_ALREADY_LISTEN` error will be thrown. + * + * One of the most common errors raised when listening is `EADDRINUSE`. + * This happens when another server is already listening on the requested`port`/`path`/`handle`. One way to handle this would be to retry + * after a certain amount of time: + * + * ```js + * server.on('error', (e) => { + * if (e.code === 'EADDRINUSE') { + * console.log('Address in use, retrying...'); + * setTimeout(() => { + * server.close(); + * server.listen(PORT, HOST); + * }, 1000); + * } + * }); + * ``` + */ + listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this; + listen(port?: number, hostname?: string, listeningListener?: () => void): this; + listen(port?: number, backlog?: number, listeningListener?: () => void): this; + listen(port?: number, listeningListener?: () => void): this; + listen(path: string, backlog?: number, listeningListener?: () => void): this; + listen(path: string, listeningListener?: () => void): this; + listen(options: ListenOptions, listeningListener?: () => void): this; + listen(handle: any, backlog?: number, listeningListener?: () => void): this; + listen(handle: any, listeningListener?: () => void): this; + /** + * Stops the server from accepting new connections and keeps existing + * connections. This function is asynchronous, the server is finally closed + * when all connections are ended and the server emits a `'close'` event. + * The optional `callback` will be called once the `'close'` event occurs. Unlike + * that event, it will be called with an `Error` as its only argument if the server + * was not open when it was closed. + * @since v0.1.90 + * @param callback Called when the server is closed. + */ + close(callback?: (err?: Error) => void): this; + /** + * Returns the bound `address`, the address `family` name, and `port` of the server + * as reported by the operating system if listening on an IP socket + * (useful to find which port was assigned when getting an OS-assigned address):`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`. + * + * For a server listening on a pipe or Unix domain socket, the name is returned + * as a string. + * + * ```js + * const server = net.createServer((socket) => { + * socket.end('goodbye\n'); + * }).on('error', (err) => { + * // Handle errors here. + * throw err; + * }); + * + * // Grab an arbitrary unused port. + * server.listen(() => { + * console.log('opened server on', server.address()); + * }); + * ``` + * + * `server.address()` returns `null` before the `'listening'` event has been + * emitted or after calling `server.close()`. + * @since v0.1.90 + */ + address(): AddressInfo | string | null; + /** + * Asynchronously get the number of concurrent connections on the server. Works + * when sockets were sent to forks. + * + * Callback should take two arguments `err` and `count`. + * @since v0.9.7 + */ + getConnections(cb: (error: Error | null, count: number) => void): void; + /** + * Opposite of `unref()`, calling `ref()` on a previously `unref`ed server will_not_ let the program exit if it's the only server left (the default behavior). + * If the server is `ref`ed calling `ref()` again will have no effect. + * @since v0.9.1 + */ + ref(): this; + /** + * Calling `unref()` on a server will allow the program to exit if this is the only + * active server in the event system. If the server is already `unref`ed calling`unref()` again will have no effect. + * @since v0.9.1 + */ + unref(): this; + /** + * Set this property to reject connections when the server's connection count gets + * high. + * + * It is not recommended to use this option once a socket has been sent to a child + * with `child_process.fork()`. + * @since v0.2.0 + */ + maxConnections: number; + connections: number; + /** + * Indicates whether or not the server is listening for connections. + * @since v5.7.0 + */ + listening: boolean; + /** + * events.EventEmitter + * 1. close + * 2. connection + * 3. error + * 4. listening + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'connection', listener: (socket: Socket) => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'listening', listener: () => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: 'close'): boolean; + emit(event: 'connection', socket: Socket): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'listening'): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'connection', listener: (socket: Socket) => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'listening', listener: () => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'connection', listener: (socket: Socket) => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'listening', listener: () => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'connection', listener: (socket: Socket) => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'listening', listener: () => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'connection', listener: (socket: Socket) => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'listening', listener: () => void): this; + } + type IPVersion = 'ipv4' | 'ipv6'; + /** + * The `BlockList` object can be used with some network APIs to specify rules for + * disabling inbound or outbound access to specific IP addresses, IP ranges, or + * IP subnets. + * @since v15.0.0 + */ + class BlockList { + /** + * Adds a rule to block the given IP address. + * @since v15.0.0 + * @param address An IPv4 or IPv6 address. + * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. + */ + addAddress(address: string, type?: IPVersion): void; + addAddress(address: SocketAddress): void; + /** + * Adds a rule to block a range of IP addresses from `start` (inclusive) to`end` (inclusive). + * @since v15.0.0 + * @param start The starting IPv4 or IPv6 address in the range. + * @param end The ending IPv4 or IPv6 address in the range. + * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. + */ + addRange(start: string, end: string, type?: IPVersion): void; + addRange(start: SocketAddress, end: SocketAddress): void; + /** + * Adds a rule to block a range of IP addresses specified as a subnet mask. + * @since v15.0.0 + * @param net The network IPv4 or IPv6 address. + * @param prefix The number of CIDR prefix bits. For IPv4, this must be a value between `0` and `32`. For IPv6, this must be between `0` and `128`. + * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. + */ + addSubnet(net: SocketAddress, prefix: number): void; + addSubnet(net: string, prefix: number, type?: IPVersion): void; + /** + * Returns `true` if the given IP address matches any of the rules added to the`BlockList`. + * + * ```js + * const blockList = new net.BlockList(); + * blockList.addAddress('123.123.123.123'); + * blockList.addRange('10.0.0.1', '10.0.0.10'); + * blockList.addSubnet('8592:757c:efae:4e45::', 64, 'ipv6'); + * + * console.log(blockList.check('123.123.123.123')); // Prints: true + * console.log(blockList.check('10.0.0.3')); // Prints: true + * console.log(blockList.check('222.111.111.222')); // Prints: false + * + * // IPv6 notation for IPv4 addresses works: + * console.log(blockList.check('::ffff:7b7b:7b7b', 'ipv6')); // Prints: true + * console.log(blockList.check('::ffff:123.123.123.123', 'ipv6')); // Prints: true + * ``` + * @since v15.0.0 + * @param address The IP address to check + * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. + */ + check(address: SocketAddress): boolean; + check(address: string, type?: IPVersion): boolean; + } + interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts { + timeout?: number | undefined; + } + interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts { + timeout?: number | undefined; + } + type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts; + /** + * Creates a new TCP or `IPC` server. + * + * If `allowHalfOpen` is set to `true`, when the other end of the socket + * signals the end of transmission, the server will only send back the end of + * transmission when `socket.end()` is explicitly called. For example, in the + * context of TCP, when a FIN packed is received, a FIN packed is sent + * back only when `socket.end()` is explicitly called. Until then the + * connection is half-closed (non-readable but still writable). See `'end'` event and [RFC 1122](https://tools.ietf.org/html/rfc1122) (section 4.2.2.13) for more information. + * + * If `pauseOnConnect` is set to `true`, then the socket associated with each + * incoming connection will be paused, and no data will be read from its handle. + * This allows connections to be passed between processes without any data being + * read by the original process. To begin reading data from a paused socket, call `socket.resume()`. + * + * The server can be a TCP server or an `IPC` server, depending on what it `listen()` to. + * + * Here is an example of an TCP echo server which listens for connections + * on port 8124: + * + * ```js + * const net = require('net'); + * const server = net.createServer((c) => { + * // 'connection' listener. + * console.log('client connected'); + * c.on('end', () => { + * console.log('client disconnected'); + * }); + * c.write('hello\r\n'); + * c.pipe(c); + * }); + * server.on('error', (err) => { + * throw err; + * }); + * server.listen(8124, () => { + * console.log('server bound'); + * }); + * ``` + * + * Test this by using `telnet`: + * + * ```console + * $ telnet localhost 8124 + * ``` + * + * To listen on the socket `/tmp/echo.sock`: + * + * ```js + * server.listen('/tmp/echo.sock', () => { + * console.log('server bound'); + * }); + * ``` + * + * Use `nc` to connect to a Unix domain socket server: + * + * ```console + * $ nc -U /tmp/echo.sock + * ``` + * @since v0.5.0 + * @param connectionListener Automatically set as a listener for the {@link 'connection'} event. + */ + function createServer(connectionListener?: (socket: Socket) => void): Server; + function createServer(options?: ServerOpts, connectionListener?: (socket: Socket) => void): Server; + /** + * Aliases to {@link createConnection}. + * + * Possible signatures: + * + * * {@link connect} + * * {@link connect} for `IPC` connections. + * * {@link connect} for TCP connections. + */ + function connect(options: NetConnectOpts, connectionListener?: () => void): Socket; + function connect(port: number, host?: string, connectionListener?: () => void): Socket; + function connect(path: string, connectionListener?: () => void): Socket; + /** + * A factory function, which creates a new {@link Socket}, + * immediately initiates connection with `socket.connect()`, + * then returns the `net.Socket` that starts the connection. + * + * When the connection is established, a `'connect'` event will be emitted + * on the returned socket. The last parameter `connectListener`, if supplied, + * will be added as a listener for the `'connect'` event **once**. + * + * Possible signatures: + * + * * {@link createConnection} + * * {@link createConnection} for `IPC` connections. + * * {@link createConnection} for TCP connections. + * + * The {@link connect} function is an alias to this function. + */ + function createConnection(options: NetConnectOpts, connectionListener?: () => void): Socket; + function createConnection(port: number, host?: string, connectionListener?: () => void): Socket; + function createConnection(path: string, connectionListener?: () => void): Socket; + /** + * Tests if input is an IP address. Returns `0` for invalid strings, + * returns `4` for IP version 4 addresses, and returns `6` for IP version 6 + * addresses. + * @since v0.3.0 + */ + function isIP(input: string): number; + /** + * Returns `true` if input is a version 4 IP address, otherwise returns `false`. + * @since v0.3.0 + */ + function isIPv4(input: string): boolean; + /** + * Returns `true` if input is a version 6 IP address, otherwise returns `false`. + * @since v0.3.0 + */ + function isIPv6(input: string): boolean; + interface SocketAddressInitOptions { + /** + * The network address as either an IPv4 or IPv6 string. + * @default 127.0.0.1 + */ + address?: string | undefined; + /** + * @default `'ipv4'` + */ + family?: IPVersion | undefined; + /** + * An IPv6 flow-label used only if `family` is `'ipv6'`. + * @default 0 + */ + flowlabel?: number | undefined; + /** + * An IP port. + * @default 0 + */ + port?: number | undefined; + } + /** + * @since v15.14.0 + */ + class SocketAddress { + constructor(options: SocketAddressInitOptions); + /** + * Either \`'ipv4'\` or \`'ipv6'\`. + * @since v15.14.0 + */ + readonly address: string; + /** + * Either \`'ipv4'\` or \`'ipv6'\`. + * @since v15.14.0 + */ + readonly family: IPVersion; + /** + * @since v15.14.0 + */ + readonly port: number; + /** + * @since v15.14.0 + */ + readonly flowlabel: number; + } +} +declare module 'node:net' { + export * from 'net'; +} diff --git a/frontend/node_modules/@types/node/os.d.ts b/frontend/node_modules/@types/node/os.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f9cd24249419dd7ad0df2864ab15a14daadc7bc4 --- /dev/null +++ b/frontend/node_modules/@types/node/os.d.ts @@ -0,0 +1,455 @@ +/** + * The `os` module provides operating system-related utility methods and + * properties. It can be accessed using: + * + * ```js + * const os = require('os'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/os.js) + */ +declare module 'os' { + interface CpuInfo { + model: string; + speed: number; + times: { + user: number; + nice: number; + sys: number; + idle: number; + irq: number; + }; + } + interface NetworkInterfaceBase { + address: string; + netmask: string; + mac: string; + internal: boolean; + cidr: string | null; + } + interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase { + family: 'IPv4'; + } + interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase { + family: 'IPv6'; + scopeid: number; + } + interface UserInfo { + username: T; + uid: number; + gid: number; + shell: T; + homedir: T; + } + type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6; + /** + * Returns the host name of the operating system as a string. + * @since v0.3.3 + */ + function hostname(): string; + /** + * Returns an array containing the 1, 5, and 15 minute load averages. + * + * The load average is a measure of system activity calculated by the operating + * system and expressed as a fractional number. + * + * The load average is a Unix-specific concept. On Windows, the return value is + * always `[0, 0, 0]`. + * @since v0.3.3 + */ + function loadavg(): number[]; + /** + * Returns the system uptime in number of seconds. + * @since v0.3.3 + */ + function uptime(): number; + /** + * Returns the amount of free system memory in bytes as an integer. + * @since v0.3.3 + */ + function freemem(): number; + /** + * Returns the total amount of system memory in bytes as an integer. + * @since v0.3.3 + */ + function totalmem(): number; + /** + * Returns an array of objects containing information about each logical CPU core. + * + * The properties included on each object include: + * + * ```js + * [ + * { + * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', + * speed: 2926, + * times: { + * user: 252020, + * nice: 0, + * sys: 30340, + * idle: 1070356870, + * irq: 0 + * } + * }, + * { + * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', + * speed: 2926, + * times: { + * user: 306960, + * nice: 0, + * sys: 26980, + * idle: 1071569080, + * irq: 0 + * } + * }, + * { + * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', + * speed: 2926, + * times: { + * user: 248450, + * nice: 0, + * sys: 21750, + * idle: 1070919370, + * irq: 0 + * } + * }, + * { + * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', + * speed: 2926, + * times: { + * user: 256880, + * nice: 0, + * sys: 19430, + * idle: 1070905480, + * irq: 20 + * } + * }, + * ] + * ``` + * + * `nice` values are POSIX-only. On Windows, the `nice` values of all processors + * are always 0. + * @since v0.3.3 + */ + function cpus(): CpuInfo[]; + /** + * Returns the operating system name as returned by [`uname(3)`](https://linux.die.net/man/3/uname). For example, it + * returns `'Linux'` on Linux, `'Darwin'` on macOS, and `'Windows_NT'` on Windows. + * + * See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for additional information + * about the output of running [`uname(3)`](https://linux.die.net/man/3/uname) on various operating systems. + * @since v0.3.3 + */ + function type(): string; + /** + * Returns the operating system as a string. + * + * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `GetVersionExW()` is used. See + * [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. + * @since v0.3.3 + */ + function release(): string; + /** + * Returns an object containing network interfaces that have been assigned a + * network address. + * + * Each key on the returned object identifies a network interface. The associated + * value is an array of objects that each describe an assigned network address. + * + * The properties available on the assigned network address object include: + * + * ```js + * { + * lo: [ + * { + * address: '127.0.0.1', + * netmask: '255.0.0.0', + * family: 'IPv4', + * mac: '00:00:00:00:00:00', + * internal: true, + * cidr: '127.0.0.1/8' + * }, + * { + * address: '::1', + * netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff', + * family: 'IPv6', + * mac: '00:00:00:00:00:00', + * scopeid: 0, + * internal: true, + * cidr: '::1/128' + * } + * ], + * eth0: [ + * { + * address: '192.168.1.108', + * netmask: '255.255.255.0', + * family: 'IPv4', + * mac: '01:02:03:0a:0b:0c', + * internal: false, + * cidr: '192.168.1.108/24' + * }, + * { + * address: 'fe80::a00:27ff:fe4e:66a1', + * netmask: 'ffff:ffff:ffff:ffff::', + * family: 'IPv6', + * mac: '01:02:03:0a:0b:0c', + * scopeid: 1, + * internal: false, + * cidr: 'fe80::a00:27ff:fe4e:66a1/64' + * } + * ] + * } + * ``` + * @since v0.6.0 + */ + function networkInterfaces(): NodeJS.Dict; + /** + * Returns the string path of the current user's home directory. + * + * On POSIX, it uses the `$HOME` environment variable if defined. Otherwise it + * uses the [effective UID](https://en.wikipedia.org/wiki/User_identifier#Effective_user_ID) to look up the user's home directory. + * + * On Windows, it uses the `USERPROFILE` environment variable if defined. + * Otherwise it uses the path to the profile directory of the current user. + * @since v2.3.0 + */ + function homedir(): string; + /** + * Returns information about the currently effective user. On POSIX platforms, + * this is typically a subset of the password file. The returned object includes + * the `username`, `uid`, `gid`, `shell`, and `homedir`. On Windows, the `uid` and`gid` fields are `-1`, and `shell` is `null`. + * + * The value of `homedir` returned by `os.userInfo()` is provided by the operating + * system. This differs from the result of `os.homedir()`, which queries + * environment variables for the home directory before falling back to the + * operating system response. + * + * Throws a `SystemError` if a user has no `username` or `homedir`. + * @since v6.0.0 + */ + function userInfo(options: { encoding: 'buffer' }): UserInfo; + function userInfo(options?: { encoding: BufferEncoding }): UserInfo; + type SignalConstants = { + [key in NodeJS.Signals]: number; + }; + namespace constants { + const UV_UDP_REUSEADDR: number; + namespace signals {} + const signals: SignalConstants; + namespace errno { + const E2BIG: number; + const EACCES: number; + const EADDRINUSE: number; + const EADDRNOTAVAIL: number; + const EAFNOSUPPORT: number; + const EAGAIN: number; + const EALREADY: number; + const EBADF: number; + const EBADMSG: number; + const EBUSY: number; + const ECANCELED: number; + const ECHILD: number; + const ECONNABORTED: number; + const ECONNREFUSED: number; + const ECONNRESET: number; + const EDEADLK: number; + const EDESTADDRREQ: number; + const EDOM: number; + const EDQUOT: number; + const EEXIST: number; + const EFAULT: number; + const EFBIG: number; + const EHOSTUNREACH: number; + const EIDRM: number; + const EILSEQ: number; + const EINPROGRESS: number; + const EINTR: number; + const EINVAL: number; + const EIO: number; + const EISCONN: number; + const EISDIR: number; + const ELOOP: number; + const EMFILE: number; + const EMLINK: number; + const EMSGSIZE: number; + const EMULTIHOP: number; + const ENAMETOOLONG: number; + const ENETDOWN: number; + const ENETRESET: number; + const ENETUNREACH: number; + const ENFILE: number; + const ENOBUFS: number; + const ENODATA: number; + const ENODEV: number; + const ENOENT: number; + const ENOEXEC: number; + const ENOLCK: number; + const ENOLINK: number; + const ENOMEM: number; + const ENOMSG: number; + const ENOPROTOOPT: number; + const ENOSPC: number; + const ENOSR: number; + const ENOSTR: number; + const ENOSYS: number; + const ENOTCONN: number; + const ENOTDIR: number; + const ENOTEMPTY: number; + const ENOTSOCK: number; + const ENOTSUP: number; + const ENOTTY: number; + const ENXIO: number; + const EOPNOTSUPP: number; + const EOVERFLOW: number; + const EPERM: number; + const EPIPE: number; + const EPROTO: number; + const EPROTONOSUPPORT: number; + const EPROTOTYPE: number; + const ERANGE: number; + const EROFS: number; + const ESPIPE: number; + const ESRCH: number; + const ESTALE: number; + const ETIME: number; + const ETIMEDOUT: number; + const ETXTBSY: number; + const EWOULDBLOCK: number; + const EXDEV: number; + const WSAEINTR: number; + const WSAEBADF: number; + const WSAEACCES: number; + const WSAEFAULT: number; + const WSAEINVAL: number; + const WSAEMFILE: number; + const WSAEWOULDBLOCK: number; + const WSAEINPROGRESS: number; + const WSAEALREADY: number; + const WSAENOTSOCK: number; + const WSAEDESTADDRREQ: number; + const WSAEMSGSIZE: number; + const WSAEPROTOTYPE: number; + const WSAENOPROTOOPT: number; + const WSAEPROTONOSUPPORT: number; + const WSAESOCKTNOSUPPORT: number; + const WSAEOPNOTSUPP: number; + const WSAEPFNOSUPPORT: number; + const WSAEAFNOSUPPORT: number; + const WSAEADDRINUSE: number; + const WSAEADDRNOTAVAIL: number; + const WSAENETDOWN: number; + const WSAENETUNREACH: number; + const WSAENETRESET: number; + const WSAECONNABORTED: number; + const WSAECONNRESET: number; + const WSAENOBUFS: number; + const WSAEISCONN: number; + const WSAENOTCONN: number; + const WSAESHUTDOWN: number; + const WSAETOOMANYREFS: number; + const WSAETIMEDOUT: number; + const WSAECONNREFUSED: number; + const WSAELOOP: number; + const WSAENAMETOOLONG: number; + const WSAEHOSTDOWN: number; + const WSAEHOSTUNREACH: number; + const WSAENOTEMPTY: number; + const WSAEPROCLIM: number; + const WSAEUSERS: number; + const WSAEDQUOT: number; + const WSAESTALE: number; + const WSAEREMOTE: number; + const WSASYSNOTREADY: number; + const WSAVERNOTSUPPORTED: number; + const WSANOTINITIALISED: number; + const WSAEDISCON: number; + const WSAENOMORE: number; + const WSAECANCELLED: number; + const WSAEINVALIDPROCTABLE: number; + const WSAEINVALIDPROVIDER: number; + const WSAEPROVIDERFAILEDINIT: number; + const WSASYSCALLFAILURE: number; + const WSASERVICE_NOT_FOUND: number; + const WSATYPE_NOT_FOUND: number; + const WSA_E_NO_MORE: number; + const WSA_E_CANCELLED: number; + const WSAEREFUSED: number; + } + namespace priority { + const PRIORITY_LOW: number; + const PRIORITY_BELOW_NORMAL: number; + const PRIORITY_NORMAL: number; + const PRIORITY_ABOVE_NORMAL: number; + const PRIORITY_HIGH: number; + const PRIORITY_HIGHEST: number; + } + } + const devNull: string; + const EOL: string; + /** + * Returns the operating system CPU architecture for which the Node.js binary was + * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`, `'ppc64'`, `'s390'`, `'s390x'`, `'x32'`, and `'x64'`. + * + * The return value is equivalent to `process.arch`. + * @since v0.5.0 + */ + function arch(): string; + /** + * Returns a string identifying the kernel version. + * + * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not + * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. + * @since v13.11.0, v12.17.0 + */ + function version(): string; + /** + * Returns a string identifying the operating system platform. The value is set + * at compile time. Possible values are `'aix'`, `'darwin'`, `'freebsd'`,`'linux'`, `'openbsd'`, `'sunos'`, and `'win32'`. + * + * The return value is equivalent to `process.platform`. + * + * The value `'android'` may also be returned if Node.js is built on the Android + * operating system. [Android support is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os). + * @since v0.5.0 + */ + function platform(): NodeJS.Platform; + /** + * Returns the operating system's default directory for temporary files as a + * string. + * @since v0.9.9 + */ + function tmpdir(): string; + /** + * Returns a string identifying the endianness of the CPU for which the Node.js + * binary was compiled. + * + * Possible values are `'BE'` for big endian and `'LE'` for little endian. + * @since v0.9.4 + */ + function endianness(): 'BE' | 'LE'; + /** + * Returns the scheduling priority for the process specified by `pid`. If `pid` is + * not provided or is `0`, the priority of the current process is returned. + * @since v10.10.0 + * @param [pid=0] The process ID to retrieve scheduling priority for. + */ + function getPriority(pid?: number): number; + /** + * Attempts to set the scheduling priority for the process specified by `pid`. If`pid` is not provided or is `0`, the process ID of the current process is used. + * + * The `priority` input must be an integer between `-20` (high priority) and `19`(low priority). Due to differences between Unix priority levels and Windows + * priority classes, `priority` is mapped to one of six priority constants in`os.constants.priority`. When retrieving a process priority level, this range + * mapping may cause the return value to be slightly different on Windows. To avoid + * confusion, set `priority` to one of the priority constants. + * + * On Windows, setting priority to `PRIORITY_HIGHEST` requires elevated user + * privileges. Otherwise the set priority will be silently reduced to`PRIORITY_HIGH`. + * @since v10.10.0 + * @param [pid=0] The process ID to set scheduling priority for. + * @param priority The scheduling priority to assign to the process. + */ + function setPriority(priority: number): void; + function setPriority(pid: number, priority: number): void; +} +declare module 'node:os' { + export * from 'os'; +} diff --git a/frontend/node_modules/@types/node/package.json b/frontend/node_modules/@types/node/package.json new file mode 100644 index 0000000000000000000000000000000000000000..4bd8f7d75bb507d6731cc855346c026adac7b124 --- /dev/null +++ b/frontend/node_modules/@types/node/package.json @@ -0,0 +1,225 @@ +{ + "name": "@types/node", + "version": "16.11.6", + "description": "TypeScript definitions for Node.js", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node", + "license": "MIT", + "contributors": [ + { + "name": "Microsoft TypeScript", + "url": "https://github.com/Microsoft", + "githubUsername": "Microsoft" + }, + { + "name": "DefinitelyTyped", + "url": "https://github.com/DefinitelyTyped", + "githubUsername": "DefinitelyTyped" + }, + { + "name": "Alberto Schiabel", + "url": "https://github.com/jkomyno", + "githubUsername": "jkomyno" + }, + { + "name": "Alvis HT Tang", + "url": "https://github.com/alvis", + "githubUsername": "alvis" + }, + { + "name": "Andrew Makarov", + "url": "https://github.com/r3nya", + "githubUsername": "r3nya" + }, + { + "name": "Benjamin Toueg", + "url": "https://github.com/btoueg", + "githubUsername": "btoueg" + }, + { + "name": "Chigozirim C.", + "url": "https://github.com/smac89", + "githubUsername": "smac89" + }, + { + "name": "David Junger", + "url": "https://github.com/touffy", + "githubUsername": "touffy" + }, + { + "name": "Deividas Bakanas", + "url": "https://github.com/DeividasBakanas", + "githubUsername": "DeividasBakanas" + }, + { + "name": "Eugene Y. Q. Shen", + "url": "https://github.com/eyqs", + "githubUsername": "eyqs" + }, + { + "name": "Hannes Magnusson", + "url": "https://github.com/Hannes-Magnusson-CK", + "githubUsername": "Hannes-Magnusson-CK" + }, + { + "name": "Huw", + "url": "https://github.com/hoo29", + "githubUsername": "hoo29" + }, + { + "name": "Kelvin Jin", + "url": "https://github.com/kjin", + "githubUsername": "kjin" + }, + { + "name": "Klaus Meinhardt", + "url": "https://github.com/ajafff", + "githubUsername": "ajafff" + }, + { + "name": "Lishude", + "url": "https://github.com/islishude", + "githubUsername": "islishude" + }, + { + "name": "Mariusz Wiktorczyk", + "url": "https://github.com/mwiktorczyk", + "githubUsername": "mwiktorczyk" + }, + { + "name": "Mohsen Azimi", + "url": "https://github.com/mohsen1", + "githubUsername": "mohsen1" + }, + { + "name": "Nicolas Even", + "url": "https://github.com/n-e", + "githubUsername": "n-e" + }, + { + "name": "Nikita Galkin", + "url": "https://github.com/galkin", + "githubUsername": "galkin" + }, + { + "name": "Parambir Singh", + "url": "https://github.com/parambirs", + "githubUsername": "parambirs" + }, + { + "name": "Sebastian Silbermann", + "url": "https://github.com/eps1lon", + "githubUsername": "eps1lon" + }, + { + "name": "Simon Schick", + "url": "https://github.com/SimonSchick", + "githubUsername": "SimonSchick" + }, + { + "name": "Thomas den Hollander", + "url": "https://github.com/ThomasdenH", + "githubUsername": "ThomasdenH" + }, + { + "name": "Wilco Bakker", + "url": "https://github.com/WilcoBakker", + "githubUsername": "WilcoBakker" + }, + { + "name": "wwwy3y3", + "url": "https://github.com/wwwy3y3", + "githubUsername": "wwwy3y3" + }, + { + "name": "Samuel Ainsworth", + "url": "https://github.com/samuela", + "githubUsername": "samuela" + }, + { + "name": "Kyle Uehlein", + "url": "https://github.com/kuehlein", + "githubUsername": "kuehlein" + }, + { + "name": "Thanik Bhongbhibhat", + "url": "https://github.com/bhongy", + "githubUsername": "bhongy" + }, + { + "name": "Marcin Kopacz", + "url": "https://github.com/chyzwar", + "githubUsername": "chyzwar" + }, + { + "name": "Trivikram Kamat", + "url": "https://github.com/trivikr", + "githubUsername": "trivikr" + }, + { + "name": "Junxiao Shi", + "url": "https://github.com/yoursunny", + "githubUsername": "yoursunny" + }, + { + "name": "Ilia Baryshnikov", + "url": "https://github.com/qwelias", + "githubUsername": "qwelias" + }, + { + "name": "ExE Boss", + "url": "https://github.com/ExE-Boss", + "githubUsername": "ExE-Boss" + }, + { + "name": "Surasak Chaisurin", + "url": "https://github.com/Ryan-Willpower", + "githubUsername": "Ryan-Willpower" + }, + { + "name": "Piotr Błażejewicz", + "url": "https://github.com/peterblazejewicz", + "githubUsername": "peterblazejewicz" + }, + { + "name": "Anna Henningsen", + "url": "https://github.com/addaleax", + "githubUsername": "addaleax" + }, + { + "name": "Victor Perin", + "url": "https://github.com/victorperin", + "githubUsername": "victorperin" + }, + { + "name": "Yongsheng Zhang", + "url": "https://github.com/ZYSzys", + "githubUsername": "ZYSzys" + }, + { + "name": "NodeJS Contributors", + "url": "https://github.com/NodeJS", + "githubUsername": "NodeJS" + }, + { + "name": "Linus Unnebäck", + "url": "https://github.com/LinusU", + "githubUsername": "LinusU" + }, + { + "name": "wafuwafu13", + "url": "https://github.com/wafuwafu13", + "githubUsername": "wafuwafu13" + } + ], + "main": "", + "types": "index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/node" + }, + "scripts": {}, + "dependencies": {}, + "typesPublisherContentHash": "dbff504adec131930153b9496f1f65d18b3738aeebe19506de47e07fc16110ef", + "typeScriptVersion": "3.7" +} \ No newline at end of file diff --git a/frontend/node_modules/@types/node/path.d.ts b/frontend/node_modules/@types/node/path.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a58c0aab92729224d806000a794b0b6867ed1008 --- /dev/null +++ b/frontend/node_modules/@types/node/path.d.ts @@ -0,0 +1,172 @@ +declare module 'path/posix' { + import path = require('path'); + export = path; +} +declare module 'path/win32' { + import path = require('path'); + export = path; +} +/** + * The `path` module provides utilities for working with file and directory paths. + * It can be accessed using: + * + * ```js + * const path = require('path'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/path.js) + */ +declare module 'path' { + namespace path { + /** + * A parsed path object generated by path.parse() or consumed by path.format(). + */ + interface ParsedPath { + /** + * The root of the path such as '/' or 'c:\' + */ + root: string; + /** + * The full directory path such as '/home/user/dir' or 'c:\path\dir' + */ + dir: string; + /** + * The file name including extension (if any) such as 'index.html' + */ + base: string; + /** + * The file extension (if any) such as '.html' + */ + ext: string; + /** + * The file name without extension (if any) such as 'index' + */ + name: string; + } + interface FormatInputPathObject { + /** + * The root of the path such as '/' or 'c:\' + */ + root?: string | undefined; + /** + * The full directory path such as '/home/user/dir' or 'c:\path\dir' + */ + dir?: string | undefined; + /** + * The file name including extension (if any) such as 'index.html' + */ + base?: string | undefined; + /** + * The file extension (if any) such as '.html' + */ + ext?: string | undefined; + /** + * The file name without extension (if any) such as 'index' + */ + name?: string | undefined; + } + interface PlatformPath { + /** + * Normalize a string path, reducing '..' and '.' parts. + * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. + * + * @param p string path to normalize. + */ + normalize(p: string): string; + /** + * Join all arguments together and normalize the resulting path. + * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown. + * + * @param paths paths to join. + */ + join(...paths: string[]): string; + /** + * The right-most parameter is considered {to}. Other parameters are considered an array of {from}. + * + * Starting from leftmost {from} parameter, resolves {to} to an absolute path. + * + * If {to} isn't already absolute, {from} arguments are prepended in right to left order, + * until an absolute path is found. If after using all {from} paths still no absolute path is found, + * the current working directory is used as well. The resulting path is normalized, + * and trailing slashes are removed unless the path gets resolved to the root directory. + * + * @param pathSegments string paths to join. Non-string arguments are ignored. + */ + resolve(...pathSegments: string[]): string; + /** + * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory. + * + * @param path path to test. + */ + isAbsolute(p: string): boolean; + /** + * Solve the relative path from {from} to {to}. + * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve. + */ + relative(from: string, to: string): string; + /** + * Return the directory name of a path. Similar to the Unix dirname command. + * + * @param p the path to evaluate. + */ + dirname(p: string): string; + /** + * Return the last portion of a path. Similar to the Unix basename command. + * Often used to extract the file name from a fully qualified path. + * + * @param p the path to evaluate. + * @param ext optionally, an extension to remove from the result. + */ + basename(p: string, ext?: string): string; + /** + * Return the extension of the path, from the last '.' to end of string in the last portion of the path. + * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string + * + * @param p the path to evaluate. + */ + extname(p: string): string; + /** + * The platform-specific file separator. '\\' or '/'. + */ + readonly sep: string; + /** + * The platform-specific file delimiter. ';' or ':'. + */ + readonly delimiter: string; + /** + * Returns an object from a path string - the opposite of format(). + * + * @param pathString path to evaluate. + */ + parse(p: string): ParsedPath; + /** + * Returns a path string from an object - the opposite of parse(). + * + * @param pathString path to evaluate. + */ + format(pP: FormatInputPathObject): string; + /** + * On Windows systems only, returns an equivalent namespace-prefixed path for the given path. + * If path is not a string, path will be returned without modifications. + * This method is meaningful only on Windows system. + * On POSIX systems, the method is non-operational and always returns path without modifications. + */ + toNamespacedPath(path: string): string; + /** + * Posix specific pathing. + * Same as parent object on posix. + */ + readonly posix: PlatformPath; + /** + * Windows specific pathing. + * Same as parent object on windows + */ + readonly win32: PlatformPath; + } + } + const path: path.PlatformPath; + export = path; +} +declare module 'node:path' { + import path = require('path'); + export = path; +} diff --git a/frontend/node_modules/@types/node/perf_hooks.d.ts b/frontend/node_modules/@types/node/perf_hooks.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0e4b48f939a24abf4ec7d31646a3ce7a2e5da584 --- /dev/null +++ b/frontend/node_modules/@types/node/perf_hooks.d.ts @@ -0,0 +1,555 @@ +/** + * This module provides an implementation of a subset of the W3C [Web Performance APIs](https://w3c.github.io/perf-timing-primer/) as well as additional APIs for + * Node.js-specific performance measurements. + * + * Node.js supports the following [Web Performance APIs](https://w3c.github.io/perf-timing-primer/): + * + * * [High Resolution Time](https://www.w3.org/TR/hr-time-2) + * * [Performance Timeline](https://w3c.github.io/performance-timeline/) + * * [User Timing](https://www.w3.org/TR/user-timing/) + * + * ```js + * const { PerformanceObserver, performance } = require('perf_hooks'); + * + * const obs = new PerformanceObserver((items) => { + * console.log(items.getEntries()[0].duration); + * performance.clearMarks(); + * }); + * obs.observe({ type: 'measure' }); + * performance.measure('Start to Now'); + * + * performance.mark('A'); + * doSomeLongRunningProcess(() => { + * performance.measure('A to Now', 'A'); + * + * performance.mark('B'); + * performance.measure('A to B', 'A', 'B'); + * }); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/perf_hooks.js) + */ +declare module 'perf_hooks' { + import { AsyncResource } from 'node:async_hooks'; + type EntryType = 'node' | 'mark' | 'measure' | 'gc' | 'function' | 'http2' | 'http'; + interface NodeGCPerformanceDetail { + /** + * When `performanceEntry.entryType` is equal to 'gc', `the performance.kind` property identifies + * the type of garbage collection operation that occurred. + * See perf_hooks.constants for valid values. + */ + readonly kind?: number | undefined; + /** + * When `performanceEntry.entryType` is equal to 'gc', the `performance.flags` + * property contains additional information about garbage collection operation. + * See perf_hooks.constants for valid values. + */ + readonly flags?: number | undefined; + } + /** + * @since v8.5.0 + */ + class PerformanceEntry { + protected constructor(); + /** + * The total number of milliseconds elapsed for this entry. This value will not + * be meaningful for all Performance Entry types. + * @since v8.5.0 + */ + readonly duration: number; + /** + * The name of the performance entry. + * @since v8.5.0 + */ + readonly name: string; + /** + * The high resolution millisecond timestamp marking the starting time of the + * Performance Entry. + * @since v8.5.0 + */ + readonly startTime: number; + /** + * The type of the performance entry. It may be one of: + * + * * `'node'` (Node.js only) + * * `'mark'` (available on the Web) + * * `'measure'` (available on the Web) + * * `'gc'` (Node.js only) + * * `'function'` (Node.js only) + * * `'http2'` (Node.js only) + * * `'http'` (Node.js only) + * @since v8.5.0 + */ + readonly entryType: EntryType; + /** + * Additional detail specific to the `entryType`. + * @since v16.0.0 + */ + readonly detail?: NodeGCPerformanceDetail | unknown | undefined; // TODO: Narrow this based on entry type. + } + /** + * _This property is an extension by Node.js. It is not available in Web browsers._ + * + * Provides timing details for Node.js itself. The constructor of this class + * is not exposed to users. + * @since v8.5.0 + */ + class PerformanceNodeTiming extends PerformanceEntry { + /** + * The high resolution millisecond timestamp at which the Node.js process + * completed bootstrapping. If bootstrapping has not yet finished, the property + * has the value of -1. + * @since v8.5.0 + */ + readonly bootstrapComplete: number; + /** + * The high resolution millisecond timestamp at which the Node.js environment was + * initialized. + * @since v8.5.0 + */ + readonly environment: number; + /** + * The high resolution millisecond timestamp of the amount of time the event loop + * has been idle within the event loop's event provider (e.g. `epoll_wait`). This + * does not take CPU usage into consideration. If the event loop has not yet + * started (e.g., in the first tick of the main script), the property has the + * value of 0. + * @since v14.10.0, v12.19.0 + */ + readonly idleTime: number; + /** + * The high resolution millisecond timestamp at which the Node.js event loop + * exited. If the event loop has not yet exited, the property has the value of -1\. + * It can only have a value of not -1 in a handler of the `'exit'` event. + * @since v8.5.0 + */ + readonly loopExit: number; + /** + * The high resolution millisecond timestamp at which the Node.js event loop + * started. If the event loop has not yet started (e.g., in the first tick of the + * main script), the property has the value of -1. + * @since v8.5.0 + */ + readonly loopStart: number; + /** + * The high resolution millisecond timestamp at which the V8 platform was + * initialized. + * @since v8.5.0 + */ + readonly v8Start: number; + } + interface EventLoopUtilization { + idle: number; + active: number; + utilization: number; + } + /** + * @param util1 The result of a previous call to eventLoopUtilization() + * @param util2 The result of a previous call to eventLoopUtilization() prior to util1 + */ + type EventLoopUtilityFunction = (util1?: EventLoopUtilization, util2?: EventLoopUtilization) => EventLoopUtilization; + interface MarkOptions { + /** + * Additional optional detail to include with the mark. + */ + detail?: unknown | undefined; + /** + * An optional timestamp to be used as the mark time. + * @default `performance.now()`. + */ + startTime?: number | undefined; + } + interface MeasureOptions { + /** + * Additional optional detail to include with the mark. + */ + detail?: unknown | undefined; + /** + * Duration between start and end times. + */ + duration?: number | undefined; + /** + * Timestamp to be used as the end time, or a string identifying a previously recorded mark. + */ + end?: number | string | undefined; + /** + * Timestamp to be used as the start time, or a string identifying a previously recorded mark. + */ + start?: number | string | undefined; + } + interface TimerifyOptions { + /** + * A histogram object created using + * `perf_hooks.createHistogram()` that will record runtime durations in + * nanoseconds. + */ + histogram?: RecordableHistogram | undefined; + } + interface Performance { + /** + * If name is not provided, removes all PerformanceMark objects from the Performance Timeline. + * If name is provided, removes only the named mark. + * @param name + */ + clearMarks(name?: string): void; + /** + * Creates a new PerformanceMark entry in the Performance Timeline. + * A PerformanceMark is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'mark', + * and whose performanceEntry.duration is always 0. + * Performance marks are used to mark specific significant moments in the Performance Timeline. + * @param name + */ + mark(name?: string, options?: MarkOptions): void; + /** + * Creates a new PerformanceMeasure entry in the Performance Timeline. + * A PerformanceMeasure is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'measure', + * and whose performanceEntry.duration measures the number of milliseconds elapsed since startMark and endMark. + * + * The startMark argument may identify any existing PerformanceMark in the the Performance Timeline, or may identify + * any of the timestamp properties provided by the PerformanceNodeTiming class. If the named startMark does not exist, + * then startMark is set to timeOrigin by default. + * + * The endMark argument must identify any existing PerformanceMark in the the Performance Timeline or any of the timestamp + * properties provided by the PerformanceNodeTiming class. If the named endMark does not exist, an error will be thrown. + * @param name + * @param startMark + * @param endMark + */ + measure(name: string, startMark?: string, endMark?: string): void; + measure(name: string, options: MeasureOptions): void; + /** + * An instance of the PerformanceNodeTiming class that provides performance metrics for specific Node.js operational milestones. + */ + readonly nodeTiming: PerformanceNodeTiming; + /** + * @return the current high resolution millisecond timestamp + */ + now(): number; + /** + * The timeOrigin specifies the high resolution millisecond timestamp from which all performance metric durations are measured. + */ + readonly timeOrigin: number; + /** + * Wraps a function within a new function that measures the running time of the wrapped function. + * A PerformanceObserver must be subscribed to the 'function' event type in order for the timing details to be accessed. + * @param fn + */ + timerify any>(fn: T, options?: TimerifyOptions): T; + /** + * eventLoopUtilization is similar to CPU utilization except that it is calculated using high precision wall-clock time. + * It represents the percentage of time the event loop has spent outside the event loop's event provider (e.g. epoll_wait). + * No other CPU idle time is taken into consideration. + */ + eventLoopUtilization: EventLoopUtilityFunction; + } + interface PerformanceObserverEntryList { + /** + * Returns a list of `PerformanceEntry` objects in chronological order + * with respect to `performanceEntry.startTime`. + * + * ```js + * const { + * performance, + * PerformanceObserver + * } = require('perf_hooks'); + * + * const obs = new PerformanceObserver((perfObserverList, observer) => { + * console.log(perfObserverList.getEntries()); + * + * * [ + * * PerformanceEntry { + * * name: 'test', + * * entryType: 'mark', + * * startTime: 81.465639, + * * duration: 0 + * * }, + * * PerformanceEntry { + * * name: 'meow', + * * entryType: 'mark', + * * startTime: 81.860064, + * * duration: 0 + * * } + * * ] + * + * observer.disconnect(); + * }); + * obs.observe({ type: 'mark' }); + * + * performance.mark('test'); + * performance.mark('meow'); + * ``` + * @since v8.5.0 + */ + getEntries(): PerformanceEntry[]; + /** + * Returns a list of `PerformanceEntry` objects in chronological order + * with respect to `performanceEntry.startTime` whose `performanceEntry.name` is + * equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to`type`. + * + * ```js + * const { + * performance, + * PerformanceObserver + * } = require('perf_hooks'); + * + * const obs = new PerformanceObserver((perfObserverList, observer) => { + * console.log(perfObserverList.getEntriesByName('meow')); + * + * * [ + * * PerformanceEntry { + * * name: 'meow', + * * entryType: 'mark', + * * startTime: 98.545991, + * * duration: 0 + * * } + * * ] + * + * console.log(perfObserverList.getEntriesByName('nope')); // [] + * + * console.log(perfObserverList.getEntriesByName('test', 'mark')); + * + * * [ + * * PerformanceEntry { + * * name: 'test', + * * entryType: 'mark', + * * startTime: 63.518931, + * * duration: 0 + * * } + * * ] + * + * console.log(perfObserverList.getEntriesByName('test', 'measure')); // [] + * observer.disconnect(); + * }); + * obs.observe({ entryTypes: ['mark', 'measure'] }); + * + * performance.mark('test'); + * performance.mark('meow'); + * ``` + * @since v8.5.0 + */ + getEntriesByName(name: string, type?: EntryType): PerformanceEntry[]; + /** + * Returns a list of `PerformanceEntry` objects in chronological order + * with respect to `performanceEntry.startTime` whose `performanceEntry.entryType`is equal to `type`. + * + * ```js + * const { + * performance, + * PerformanceObserver + * } = require('perf_hooks'); + * + * const obs = new PerformanceObserver((perfObserverList, observer) => { + * console.log(perfObserverList.getEntriesByType('mark')); + * + * * [ + * * PerformanceEntry { + * * name: 'test', + * * entryType: 'mark', + * * startTime: 55.897834, + * * duration: 0 + * * }, + * * PerformanceEntry { + * * name: 'meow', + * * entryType: 'mark', + * * startTime: 56.350146, + * * duration: 0 + * * } + * * ] + * + * observer.disconnect(); + * }); + * obs.observe({ type: 'mark' }); + * + * performance.mark('test'); + * performance.mark('meow'); + * ``` + * @since v8.5.0 + */ + getEntriesByType(type: EntryType): PerformanceEntry[]; + } + type PerformanceObserverCallback = (list: PerformanceObserverEntryList, observer: PerformanceObserver) => void; + class PerformanceObserver extends AsyncResource { + constructor(callback: PerformanceObserverCallback); + /** + * Disconnects the `PerformanceObserver` instance from all notifications. + * @since v8.5.0 + */ + disconnect(): void; + /** + * Subscribes the `PerformanceObserver` instance to notifications of new `PerformanceEntry` instances identified either by `options.entryTypes`or `options.type`: + * + * ```js + * const { + * performance, + * PerformanceObserver + * } = require('perf_hooks'); + * + * const obs = new PerformanceObserver((list, observer) => { + * // Called three times synchronously. `list` contains one item. + * }); + * obs.observe({ type: 'mark' }); + * + * for (let n = 0; n < 3; n++) + * performance.mark(`test${n}`); + * ``` + * @since v8.5.0 + */ + observe( + options: + | { + entryTypes: ReadonlyArray; + } + | { + type: EntryType; + } + ): void; + } + namespace constants { + const NODE_PERFORMANCE_GC_MAJOR: number; + const NODE_PERFORMANCE_GC_MINOR: number; + const NODE_PERFORMANCE_GC_INCREMENTAL: number; + const NODE_PERFORMANCE_GC_WEAKCB: number; + const NODE_PERFORMANCE_GC_FLAGS_NO: number; + const NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: number; + const NODE_PERFORMANCE_GC_FLAGS_FORCED: number; + const NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: number; + const NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: number; + const NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: number; + const NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: number; + } + const performance: Performance; + interface EventLoopMonitorOptions { + /** + * The sampling rate in milliseconds. + * Must be greater than zero. + * @default 10 + */ + resolution?: number | undefined; + } + interface Histogram { + /** + * Returns a `Map` object detailing the accumulated percentile distribution. + * @since v11.10.0 + */ + readonly percentiles: Map; + /** + * The number of times the event loop delay exceeded the maximum 1 hour event + * loop delay threshold. + * @since v11.10.0 + */ + readonly exceeds: number; + /** + * The minimum recorded event loop delay. + * @since v11.10.0 + */ + readonly min: number; + /** + * The maximum recorded event loop delay. + * @since v11.10.0 + */ + readonly max: number; + /** + * The mean of the recorded event loop delays. + * @since v11.10.0 + */ + readonly mean: number; + /** + * The standard deviation of the recorded event loop delays. + * @since v11.10.0 + */ + readonly stddev: number; + /** + * Resets the collected histogram data. + * @since v11.10.0 + */ + reset(): void; + /** + * Returns the value at the given percentile. + * @since v11.10.0 + * @param percentile A percentile value in the range (0, 100]. + */ + percentile(percentile: number): number; + } + interface IntervalHistogram extends Histogram { + /** + * Enables the update interval timer. Returns `true` if the timer was + * started, `false` if it was already started. + * @since v11.10.0 + */ + enable(): boolean; + /** + * Disables the update interval timer. Returns `true` if the timer was + * stopped, `false` if it was already stopped. + * @since v11.10.0 + */ + disable(): boolean; + } + interface RecordableHistogram extends Histogram { + /** + * @since v15.9.0 + * @param val The amount to record in the histogram. + */ + record(val: number | bigint): void; + /** + * Calculates the amount of time (in nanoseconds) that has passed since the + * previous call to `recordDelta()` and records that amount in the histogram. + * + * ## Examples + * @since v15.9.0 + */ + recordDelta(): void; + } + /** + * _This property is an extension by Node.js. It is not available in Web browsers._ + * + * Creates an `IntervalHistogram` object that samples and reports the event loop + * delay over time. The delays will be reported in nanoseconds. + * + * Using a timer to detect approximate event loop delay works because the + * execution of timers is tied specifically to the lifecycle of the libuv + * event loop. That is, a delay in the loop will cause a delay in the execution + * of the timer, and those delays are specifically what this API is intended to + * detect. + * + * ```js + * const { monitorEventLoopDelay } = require('perf_hooks'); + * const h = monitorEventLoopDelay({ resolution: 20 }); + * h.enable(); + * // Do something. + * h.disable(); + * console.log(h.min); + * console.log(h.max); + * console.log(h.mean); + * console.log(h.stddev); + * console.log(h.percentiles); + * console.log(h.percentile(50)); + * console.log(h.percentile(99)); + * ``` + * @since v11.10.0 + */ + function monitorEventLoopDelay(options?: EventLoopMonitorOptions): IntervalHistogram; + interface CreateHistogramOptions { + /** + * The minimum recordable value. Must be an integer value greater than 0. + * @default 1 + */ + min?: number | bigint | undefined; + /** + * The maximum recordable value. Must be an integer value greater than min. + * @default Number.MAX_SAFE_INTEGER + */ + max?: number | bigint | undefined; + /** + * The number of accuracy digits. Must be a number between 1 and 5. + * @default 3 + */ + figures?: number | undefined; + } + /** + * Returns a `RecordableHistogram`. + * @since v15.9.0 + */ + function createHistogram(options?: CreateHistogramOptions): RecordableHistogram; +} +declare module 'node:perf_hooks' { + export * from 'perf_hooks'; +} diff --git a/frontend/node_modules/@types/node/process.d.ts b/frontend/node_modules/@types/node/process.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..46458f4a0bcf215371b542adf54c4372bcb6d46a --- /dev/null +++ b/frontend/node_modules/@types/node/process.d.ts @@ -0,0 +1,1477 @@ +declare module 'process' { + import * as tty from 'node:tty'; + import { Worker } from 'node:worker_threads'; + global { + var process: NodeJS.Process; + namespace NodeJS { + // this namespace merge is here because these are specifically used + // as the type for process.stdin, process.stdout, and process.stderr. + // they can't live in tty.d.ts because we need to disambiguate the imported name. + interface ReadStream extends tty.ReadStream {} + interface WriteStream extends tty.WriteStream {} + interface MemoryUsageFn { + /** + * The `process.memoryUsage()` method iterate over each page to gather informations about memory + * usage which can be slow depending on the program memory allocations. + */ + (): MemoryUsage; + /** + * method returns an integer representing the Resident Set Size (RSS) in bytes. + */ + rss(): number; + } + interface MemoryUsage { + rss: number; + heapTotal: number; + heapUsed: number; + external: number; + arrayBuffers: number; + } + interface CpuUsage { + user: number; + system: number; + } + interface ProcessRelease { + name: string; + sourceUrl?: string | undefined; + headersUrl?: string | undefined; + libUrl?: string | undefined; + lts?: string | undefined; + } + interface ProcessVersions extends Dict { + http_parser: string; + node: string; + v8: string; + ares: string; + uv: string; + zlib: string; + modules: string; + openssl: string; + } + type Platform = 'aix' | 'android' | 'darwin' | 'freebsd' | 'haiku' | 'linux' | 'openbsd' | 'sunos' | 'win32' | 'cygwin' | 'netbsd'; + type Signals = + | 'SIGABRT' + | 'SIGALRM' + | 'SIGBUS' + | 'SIGCHLD' + | 'SIGCONT' + | 'SIGFPE' + | 'SIGHUP' + | 'SIGILL' + | 'SIGINT' + | 'SIGIO' + | 'SIGIOT' + | 'SIGKILL' + | 'SIGPIPE' + | 'SIGPOLL' + | 'SIGPROF' + | 'SIGPWR' + | 'SIGQUIT' + | 'SIGSEGV' + | 'SIGSTKFLT' + | 'SIGSTOP' + | 'SIGSYS' + | 'SIGTERM' + | 'SIGTRAP' + | 'SIGTSTP' + | 'SIGTTIN' + | 'SIGTTOU' + | 'SIGUNUSED' + | 'SIGURG' + | 'SIGUSR1' + | 'SIGUSR2' + | 'SIGVTALRM' + | 'SIGWINCH' + | 'SIGXCPU' + | 'SIGXFSZ' + | 'SIGBREAK' + | 'SIGLOST' + | 'SIGINFO'; + type UncaughtExceptionOrigin = 'uncaughtException' | 'unhandledRejection'; + type MultipleResolveType = 'resolve' | 'reject'; + type BeforeExitListener = (code: number) => void; + type DisconnectListener = () => void; + type ExitListener = (code: number) => void; + type RejectionHandledListener = (promise: Promise) => void; + type UncaughtExceptionListener = (error: Error, origin: UncaughtExceptionOrigin) => void; + type UnhandledRejectionListener = (reason: {} | null | undefined, promise: Promise) => void; + type WarningListener = (warning: Error) => void; + type MessageListener = (message: unknown, sendHandle: unknown) => void; + type SignalsListener = (signal: Signals) => void; + type MultipleResolveListener = (type: MultipleResolveType, promise: Promise, value: unknown) => void; + type WorkerListener = (worker: Worker) => void; + interface Socket extends ReadWriteStream { + isTTY?: true | undefined; + } + // Alias for compatibility + interface ProcessEnv extends Dict { + /** + * Can be used to change the default timezone at runtime + */ + TZ?: string; + } + interface HRTime { + (time?: [number, number]): [number, number]; + bigint(): bigint; + } + interface ProcessReport { + /** + * Directory where the report is written. + * working directory of the Node.js process. + * @default '' indicating that reports are written to the current + */ + directory: string; + /** + * Filename where the report is written. + * The default value is the empty string. + * @default '' the output filename will be comprised of a timestamp, + * PID, and sequence number. + */ + filename: string; + /** + * Returns a JSON-formatted diagnostic report for the running process. + * The report's JavaScript stack trace is taken from err, if present. + */ + getReport(err?: Error): string; + /** + * If true, a diagnostic report is generated on fatal errors, + * such as out of memory errors or failed C++ assertions. + * @default false + */ + reportOnFatalError: boolean; + /** + * If true, a diagnostic report is generated when the process + * receives the signal specified by process.report.signal. + * @defaul false + */ + reportOnSignal: boolean; + /** + * If true, a diagnostic report is generated on uncaught exception. + * @default false + */ + reportOnUncaughtException: boolean; + /** + * The signal used to trigger the creation of a diagnostic report. + * @default 'SIGUSR2' + */ + signal: Signals; + /** + * Writes a diagnostic report to a file. If filename is not provided, the default filename + * includes the date, time, PID, and a sequence number. + * The report's JavaScript stack trace is taken from err, if present. + * + * @param fileName Name of the file where the report is written. + * This should be a relative path, that will be appended to the directory specified in + * `process.report.directory`, or the current working directory of the Node.js process, + * if unspecified. + * @param error A custom error used for reporting the JavaScript stack. + * @return Filename of the generated report. + */ + writeReport(fileName?: string): string; + writeReport(error?: Error): string; + writeReport(fileName?: string, err?: Error): string; + } + interface ResourceUsage { + fsRead: number; + fsWrite: number; + involuntaryContextSwitches: number; + ipcReceived: number; + ipcSent: number; + majorPageFault: number; + maxRSS: number; + minorPageFault: number; + sharedMemorySize: number; + signalsCount: number; + swappedOut: number; + systemCPUTime: number; + unsharedDataSize: number; + unsharedStackSize: number; + userCPUTime: number; + voluntaryContextSwitches: number; + } + interface EmitWarningOptions { + /** + * When `warning` is a `string`, `type` is the name to use for the _type_ of warning being emitted. + * + * @default 'Warning' + */ + type?: string | undefined; + /** + * A unique identifier for the warning instance being emitted. + */ + code?: string | undefined; + /** + * When `warning` is a `string`, `ctor` is an optional function used to limit the generated stack trace. + * + * @default process.emitWarning + */ + ctor?: Function | undefined; + /** + * Additional text to include with the error. + */ + detail?: string | undefined; + } + interface ProcessConfig { + readonly target_defaults: { + readonly cflags: any[]; + readonly default_configuration: string; + readonly defines: string[]; + readonly include_dirs: string[]; + readonly libraries: string[]; + }; + readonly variables: { + readonly clang: number; + readonly host_arch: string; + readonly node_install_npm: boolean; + readonly node_install_waf: boolean; + readonly node_prefix: string; + readonly node_shared_openssl: boolean; + readonly node_shared_v8: boolean; + readonly node_shared_zlib: boolean; + readonly node_use_dtrace: boolean; + readonly node_use_etw: boolean; + readonly node_use_openssl: boolean; + readonly target_arch: string; + readonly v8_no_strict_aliasing: number; + readonly v8_use_snapshot: boolean; + readonly visibility: string; + }; + } + interface Process extends EventEmitter { + /** + * The `process.stdout` property returns a stream connected to`stdout` (fd `1`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `1` refers to a file, in which case it is + * a `Writable` stream. + * + * For example, to copy `process.stdin` to `process.stdout`: + * + * ```js + * import { stdin, stdout } from 'process'; + * + * stdin.pipe(stdout); + * ``` + * + * `process.stdout` differs from other Node.js streams in important ways. See `note on process I/O` for more information. + */ + stdout: WriteStream & { + fd: 1; + }; + /** + * The `process.stderr` property returns a stream connected to`stderr` (fd `2`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `2` refers to a file, in which case it is + * a `Writable` stream. + * + * `process.stderr` differs from other Node.js streams in important ways. See `note on process I/O` for more information. + */ + stderr: WriteStream & { + fd: 2; + }; + /** + * The `process.stdin` property returns a stream connected to`stdin` (fd `0`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `0` refers to a file, in which case it is + * a `Readable` stream. + * + * For details of how to read from `stdin` see `readable.read()`. + * + * As a `Duplex` stream, `process.stdin` can also be used in "old" mode that + * is compatible with scripts written for Node.js prior to v0.10\. + * For more information see `Stream compatibility`. + * + * In "old" streams mode the `stdin` stream is paused by default, so one + * must call `process.stdin.resume()` to read from it. Note also that calling`process.stdin.resume()` itself would switch stream to "old" mode. + */ + stdin: ReadStream & { + fd: 0; + }; + openStdin(): Socket; + /** + * The `process.argv` property returns an array containing the command-line + * arguments passed when the Node.js process was launched. The first element will + * be {@link execPath}. See `process.argv0` if access to the original value + * of `argv[0]` is needed. The second element will be the path to the JavaScript + * file being executed. The remaining elements will be any additional command-line + * arguments. + * + * For example, assuming the following script for `process-args.js`: + * + * ```js + * import { argv } from 'process'; + * + * // print process.argv + * argv.forEach((val, index) => { + * console.log(`${index}: ${val}`); + * }); + * ``` + * + * Launching the Node.js process as: + * + * ```console + * $ node process-args.js one two=three four + * ``` + * + * Would generate the output: + * + * ```text + * 0: /usr/local/bin/node + * 1: /Users/mjr/work/node/process-args.js + * 2: one + * 3: two=three + * 4: four + * ``` + * @since v0.1.27 + */ + argv: string[]; + /** + * The `process.argv0` property stores a read-only copy of the original value of`argv[0]` passed when Node.js starts. + * + * ```console + * $ bash -c 'exec -a customArgv0 ./node' + * > process.argv[0] + * '/Volumes/code/external/node/out/Release/node' + * > process.argv0 + * 'customArgv0' + * ``` + * @since v6.4.0 + */ + argv0: string; + /** + * The `process.execArgv` property returns the set of Node.js-specific command-line + * options passed when the Node.js process was launched. These options do not + * appear in the array returned by the {@link argv} property, and do not + * include the Node.js executable, the name of the script, or any options following + * the script name. These options are useful in order to spawn child processes with + * the same execution environment as the parent. + * + * ```console + * $ node --harmony script.js --version + * ``` + * + * Results in `process.execArgv`: + * + * ```js + * ['--harmony'] + * ``` + * + * And `process.argv`: + * + * ```js + * ['/usr/local/bin/node', 'script.js', '--version'] + * ``` + * + * Refer to `Worker constructor` for the detailed behavior of worker + * threads with this property. + * @since v0.7.7 + */ + execArgv: string[]; + /** + * The `process.execPath` property returns the absolute pathname of the executable + * that started the Node.js process. Symbolic links, if any, are resolved. + * + * ```js + * '/usr/local/bin/node' + * ``` + * @since v0.1.100 + */ + execPath: string; + /** + * The `process.abort()` method causes the Node.js process to exit immediately and + * generate a core file. + * + * This feature is not available in `Worker` threads. + * @since v0.7.0 + */ + abort(): never; + /** + * The `process.chdir()` method changes the current working directory of the + * Node.js process or throws an exception if doing so fails (for instance, if + * the specified `directory` does not exist). + * + * ```js + * import { chdir, cwd } from 'process'; + * + * console.log(`Starting directory: ${cwd()}`); + * try { + * chdir('/tmp'); + * console.log(`New directory: ${cwd()}`); + * } catch (err) { + * console.error(`chdir: ${err}`); + * } + * ``` + * + * This feature is not available in `Worker` threads. + * @since v0.1.17 + */ + chdir(directory: string): void; + /** + * The `process.cwd()` method returns the current working directory of the Node.js + * process. + * + * ```js + * import { cwd } from 'process'; + * + * console.log(`Current directory: ${cwd()}`); + * ``` + * @since v0.1.8 + */ + cwd(): string; + /** + * The port used by the Node.js debugger when enabled. + * + * ```js + * import process from 'process'; + * + * process.debugPort = 5858; + * ``` + * @since v0.7.2 + */ + debugPort: number; + /** + * The `process.emitWarning()` method can be used to emit custom or application + * specific process warnings. These can be listened for by adding a handler to the `'warning'` event. + * + * ```js + * import { emitWarning } from 'process'; + * + * // Emit a warning with a code and additional detail. + * emitWarning('Something happened!', { + * code: 'MY_WARNING', + * detail: 'This is some additional information' + * }); + * // Emits: + * // (node:56338) [MY_WARNING] Warning: Something happened! + * // This is some additional information + * ``` + * + * In this example, an `Error` object is generated internally by`process.emitWarning()` and passed through to the `'warning'` handler. + * + * ```js + * import process from 'process'; + * + * process.on('warning', (warning) => { + * console.warn(warning.name); // 'Warning' + * console.warn(warning.message); // 'Something happened!' + * console.warn(warning.code); // 'MY_WARNING' + * console.warn(warning.stack); // Stack trace + * console.warn(warning.detail); // 'This is some additional information' + * }); + * ``` + * + * If `warning` is passed as an `Error` object, the `options` argument is ignored. + * @since v8.0.0 + * @param warning The warning to emit. + */ + emitWarning(warning: string | Error, ctor?: Function): void; + emitWarning(warning: string | Error, type?: string, ctor?: Function): void; + emitWarning(warning: string | Error, type?: string, code?: string, ctor?: Function): void; + emitWarning(warning: string | Error, options?: EmitWarningOptions): void; + /** + * The `process.env` property returns an object containing the user environment. + * See [`environ(7)`](http://man7.org/linux/man-pages/man7/environ.7.html). + * + * An example of this object looks like: + * + * ```js + * { + * TERM: 'xterm-256color', + * SHELL: '/usr/local/bin/bash', + * USER: 'maciej', + * PATH: '~/.bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin', + * PWD: '/Users/maciej', + * EDITOR: 'vim', + * SHLVL: '1', + * HOME: '/Users/maciej', + * LOGNAME: 'maciej', + * _: '/usr/local/bin/node' + * } + * ``` + * + * It is possible to modify this object, but such modifications will not be + * reflected outside the Node.js process, or (unless explicitly requested) + * to other `Worker` threads. + * In other words, the following example would not work: + * + * ```console + * $ node -e 'process.env.foo = "bar"' && echo $foo + * ``` + * + * While the following will: + * + * ```js + * import { env } from 'process'; + * + * env.foo = 'bar'; + * console.log(env.foo); + * ``` + * + * Assigning a property on `process.env` will implicitly convert the value + * to a string. **This behavior is deprecated.** Future versions of Node.js may + * throw an error when the value is not a string, number, or boolean. + * + * ```js + * import { env } from 'process'; + * + * env.test = null; + * console.log(env.test); + * // => 'null' + * env.test = undefined; + * console.log(env.test); + * // => 'undefined' + * ``` + * + * Use `delete` to delete a property from `process.env`. + * + * ```js + * import { env } from 'process'; + * + * env.TEST = 1; + * delete env.TEST; + * console.log(env.TEST); + * // => undefined + * ``` + * + * On Windows operating systems, environment variables are case-insensitive. + * + * ```js + * import { env } from 'process'; + * + * env.TEST = 1; + * console.log(env.test); + * // => 1 + * ``` + * + * Unless explicitly specified when creating a `Worker` instance, + * each `Worker` thread has its own copy of `process.env`, based on its + * parent thread’s `process.env`, or whatever was specified as the `env` option + * to the `Worker` constructor. Changes to `process.env` will not be visible + * across `Worker` threads, and only the main thread can make changes that + * are visible to the operating system or to native add-ons. + * @since v0.1.27 + */ + env: ProcessEnv; + /** + * The `process.exit()` method instructs Node.js to terminate the process + * synchronously with an exit status of `code`. If `code` is omitted, exit uses + * either the 'success' code `0` or the value of `process.exitCode` if it has been + * set. Node.js will not terminate until all the `'exit'` event listeners are + * called. + * + * To exit with a 'failure' code: + * + * ```js + * import { exit } from 'process'; + * + * exit(1); + * ``` + * + * The shell that executed Node.js should see the exit code as `1`. + * + * Calling `process.exit()` will force the process to exit as quickly as possible + * even if there are still asynchronous operations pending that have not yet + * completed fully, including I/O operations to `process.stdout` and`process.stderr`. + * + * In most situations, it is not actually necessary to call `process.exit()`explicitly. The Node.js process will exit on its own _if there is no additional_ + * _work pending_ in the event loop. The `process.exitCode` property can be set to + * tell the process which exit code to use when the process exits gracefully. + * + * For instance, the following example illustrates a _misuse_ of the`process.exit()` method that could lead to data printed to stdout being + * truncated and lost: + * + * ```js + * import { exit } from 'process'; + * + * // This is an example of what *not* to do: + * if (someConditionNotMet()) { + * printUsageToStdout(); + * exit(1); + * } + * ``` + * + * The reason this is problematic is because writes to `process.stdout` in Node.js + * are sometimes _asynchronous_ and may occur over multiple ticks of the Node.js + * event loop. Calling `process.exit()`, however, forces the process to exit_before_ those additional writes to `stdout` can be performed. + * + * Rather than calling `process.exit()` directly, the code _should_ set the`process.exitCode` and allow the process to exit naturally by avoiding + * scheduling any additional work for the event loop: + * + * ```js + * import process from 'process'; + * + * // How to properly set the exit code while letting + * // the process exit gracefully. + * if (someConditionNotMet()) { + * printUsageToStdout(); + * process.exitCode = 1; + * } + * ``` + * + * If it is necessary to terminate the Node.js process due to an error condition, + * throwing an _uncaught_ error and allowing the process to terminate accordingly + * is safer than calling `process.exit()`. + * + * In `Worker` threads, this function stops the current thread rather + * than the current process. + * @since v0.1.13 + * @param [code=0] The exit code. + */ + exit(code?: number): never; + /** + * A number which will be the process exit code, when the process either + * exits gracefully, or is exited via {@link exit} without specifying + * a code. + * + * Specifying a code to {@link exit} will override any + * previous setting of `process.exitCode`. + * @since v0.11.8 + */ + exitCode?: number | undefined; + /** + * The `process.getgid()` method returns the numerical group identity of the + * process. (See [`getgid(2)`](http://man7.org/linux/man-pages/man2/getgid.2.html).) + * + * ```js + * import process from 'process'; + * + * if (process.getgid) { + * console.log(`Current gid: ${process.getgid()}`); + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v0.1.31 + */ + getgid(): number; + /** + * The `process.setgid()` method sets the group identity of the process. (See [`setgid(2)`](http://man7.org/linux/man-pages/man2/setgid.2.html).) The `id` can be passed as either a + * numeric ID or a group name + * string. If a group name is specified, this method blocks while resolving the + * associated numeric ID. + * + * ```js + * import process from 'process'; + * + * if (process.getgid && process.setgid) { + * console.log(`Current gid: ${process.getgid()}`); + * try { + * process.setgid(501); + * console.log(`New gid: ${process.getgid()}`); + * } catch (err) { + * console.log(`Failed to set gid: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v0.1.31 + * @param id The group name or ID + */ + setgid(id: number | string): void; + /** + * The `process.getuid()` method returns the numeric user identity of the process. + * (See [`getuid(2)`](http://man7.org/linux/man-pages/man2/getuid.2.html).) + * + * ```js + * import process from 'process'; + * + * if (process.getuid) { + * console.log(`Current uid: ${process.getuid()}`); + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v0.1.28 + */ + getuid(): number; + /** + * The `process.setuid(id)` method sets the user identity of the process. (See [`setuid(2)`](http://man7.org/linux/man-pages/man2/setuid.2.html).) The `id` can be passed as either a + * numeric ID or a username string. + * If a username is specified, the method blocks while resolving the associated + * numeric ID. + * + * ```js + * import process from 'process'; + * + * if (process.getuid && process.setuid) { + * console.log(`Current uid: ${process.getuid()}`); + * try { + * process.setuid(501); + * console.log(`New uid: ${process.getuid()}`); + * } catch (err) { + * console.log(`Failed to set uid: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v0.1.28 + */ + setuid(id: number | string): void; + /** + * The `process.geteuid()` method returns the numerical effective user identity of + * the process. (See [`geteuid(2)`](http://man7.org/linux/man-pages/man2/geteuid.2.html).) + * + * ```js + * import process from 'process'; + * + * if (process.geteuid) { + * console.log(`Current uid: ${process.geteuid()}`); + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v2.0.0 + */ + geteuid(): number; + /** + * The `process.seteuid()` method sets the effective user identity of the process. + * (See [`seteuid(2)`](http://man7.org/linux/man-pages/man2/seteuid.2.html).) The `id` can be passed as either a numeric ID or a username + * string. If a username is specified, the method blocks while resolving the + * associated numeric ID. + * + * ```js + * import process from 'process'; + * + * if (process.geteuid && process.seteuid) { + * console.log(`Current uid: ${process.geteuid()}`); + * try { + * process.seteuid(501); + * console.log(`New uid: ${process.geteuid()}`); + * } catch (err) { + * console.log(`Failed to set uid: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v2.0.0 + * @param id A user name or ID + */ + seteuid(id: number | string): void; + /** + * The `process.getegid()` method returns the numerical effective group identity + * of the Node.js process. (See [`getegid(2)`](http://man7.org/linux/man-pages/man2/getegid.2.html).) + * + * ```js + * import process from 'process'; + * + * if (process.getegid) { + * console.log(`Current gid: ${process.getegid()}`); + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v2.0.0 + */ + getegid(): number; + /** + * The `process.setegid()` method sets the effective group identity of the process. + * (See [`setegid(2)`](http://man7.org/linux/man-pages/man2/setegid.2.html).) The `id` can be passed as either a numeric ID or a group + * name string. If a group name is specified, this method blocks while resolving + * the associated a numeric ID. + * + * ```js + * import process from 'process'; + * + * if (process.getegid && process.setegid) { + * console.log(`Current gid: ${process.getegid()}`); + * try { + * process.setegid(501); + * console.log(`New gid: ${process.getegid()}`); + * } catch (err) { + * console.log(`Failed to set gid: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v2.0.0 + * @param id A group name or ID + */ + setegid(id: number | string): void; + /** + * The `process.getgroups()` method returns an array with the supplementary group + * IDs. POSIX leaves it unspecified if the effective group ID is included but + * Node.js ensures it always is. + * + * ```js + * import process from 'process'; + * + * if (process.getgroups) { + * console.log(process.getgroups()); // [ 16, 21, 297 ] + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v0.9.4 + */ + getgroups(): number[]; + /** + * The `process.setgroups()` method sets the supplementary group IDs for the + * Node.js process. This is a privileged operation that requires the Node.js + * process to have `root` or the `CAP_SETGID` capability. + * + * The `groups` array can contain numeric group IDs, group names, or both. + * + * ```js + * import process from 'process'; + * + * if (process.getgroups && process.setgroups) { + * try { + * process.setgroups([501]); + * console.log(process.getgroups()); // new groups + * } catch (err) { + * console.log(`Failed to set groups: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v0.9.4 + */ + setgroups(groups: ReadonlyArray): void; + /** + * The `process.setUncaughtExceptionCaptureCallback()` function sets a function + * that will be invoked when an uncaught exception occurs, which will receive the + * exception value itself as its first argument. + * + * If such a function is set, the `'uncaughtException'` event will + * not be emitted. If `--abort-on-uncaught-exception` was passed from the + * command line or set through `v8.setFlagsFromString()`, the process will + * not abort. Actions configured to take place on exceptions such as report + * generations will be affected too + * + * To unset the capture function,`process.setUncaughtExceptionCaptureCallback(null)` may be used. Calling this + * method with a non-`null` argument while another capture function is set will + * throw an error. + * + * Using this function is mutually exclusive with using the deprecated `domain` built-in module. + * @since v9.3.0 + */ + setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void; + /** + * Indicates whether a callback has been set using {@link setUncaughtExceptionCaptureCallback}. + * @since v9.3.0 + */ + hasUncaughtExceptionCaptureCallback(): boolean; + /** + * The `process.version` property contains the Node.js version string. + * + * ```js + * import { version } from 'process'; + * + * console.log(`Version: ${version}`); + * // Version: v14.8.0 + * ``` + * + * To get the version string without the prepended _v_, use`process.versions.node`. + * @since v0.1.3 + */ + readonly version: string; + /** + * The `process.versions` property returns an object listing the version strings of + * Node.js and its dependencies. `process.versions.modules` indicates the current + * ABI version, which is increased whenever a C++ API changes. Node.js will refuse + * to load modules that were compiled against a different module ABI version. + * + * ```js + * import { versions } from 'process'; + * + * console.log(versions); + * ``` + * + * Will generate an object similar to: + * + * ```console + * { node: '11.13.0', + * v8: '7.0.276.38-node.18', + * uv: '1.27.0', + * zlib: '1.2.11', + * brotli: '1.0.7', + * ares: '1.15.0', + * modules: '67', + * nghttp2: '1.34.0', + * napi: '4', + * llhttp: '1.1.1', + * openssl: '1.1.1b', + * cldr: '34.0', + * icu: '63.1', + * tz: '2018e', + * unicode: '11.0' } + * ``` + * @since v0.2.0 + */ + readonly versions: ProcessVersions; + /** + * The `process.config` property returns an `Object` containing the JavaScript + * representation of the configure options used to compile the current Node.js + * executable. This is the same as the `config.gypi` file that was produced when + * running the `./configure` script. + * + * An example of the possible output looks like: + * + * ```js + * { + * target_defaults: + * { cflags: [], + * default_configuration: 'Release', + * defines: [], + * include_dirs: [], + * libraries: [] }, + * variables: + * { + * host_arch: 'x64', + * napi_build_version: 5, + * node_install_npm: 'true', + * node_prefix: '', + * node_shared_cares: 'false', + * node_shared_http_parser: 'false', + * node_shared_libuv: 'false', + * node_shared_zlib: 'false', + * node_use_dtrace: 'false', + * node_use_openssl: 'true', + * node_shared_openssl: 'false', + * strict_aliasing: 'true', + * target_arch: 'x64', + * v8_use_snapshot: 1 + * } + * } + * ``` + * + * The `process.config` property is **not** read-only and there are existing + * modules in the ecosystem that are known to extend, modify, or entirely replace + * the value of `process.config`. + * + * Modifying the `process.config` property, or any child-property of the`process.config` object has been deprecated. The `process.config` will be made + * read-only in a future release. + * @since v0.7.7 + */ + readonly config: ProcessConfig; + /** + * The `process.kill()` method sends the `signal` to the process identified by`pid`. + * + * Signal names are strings such as `'SIGINT'` or `'SIGHUP'`. See `Signal Events` and [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for more information. + * + * This method will throw an error if the target `pid` does not exist. As a special + * case, a signal of `0` can be used to test for the existence of a process. + * Windows platforms will throw an error if the `pid` is used to kill a process + * group. + * + * Even though the name of this function is `process.kill()`, it is really just a + * signal sender, like the `kill` system call. The signal sent may do something + * other than kill the target process. + * + * ```js + * import process, { kill } from 'process'; + * + * process.on('SIGHUP', () => { + * console.log('Got SIGHUP signal.'); + * }); + * + * setTimeout(() => { + * console.log('Exiting.'); + * process.exit(0); + * }, 100); + * + * kill(process.pid, 'SIGHUP'); + * ``` + * + * When `SIGUSR1` is received by a Node.js process, Node.js will start the + * debugger. See `Signal Events`. + * @since v0.0.6 + * @param pid A process ID + * @param [signal='SIGTERM'] The signal to send, either as a string or number. + */ + kill(pid: number, signal?: string | number): true; + /** + * The `process.pid` property returns the PID of the process. + * + * ```js + * import { pid } from 'process'; + * + * console.log(`This process is pid ${pid}`); + * ``` + * @since v0.1.15 + */ + readonly pid: number; + /** + * The `process.ppid` property returns the PID of the parent of the + * current process. + * + * ```js + * import { ppid } from 'process'; + * + * console.log(`The parent process is pid ${ppid}`); + * ``` + * @since v9.2.0, v8.10.0, v6.13.0 + */ + readonly ppid: number; + /** + * The `process.title` property returns the current process title (i.e. returns + * the current value of `ps`). Assigning a new value to `process.title` modifies + * the current value of `ps`. + * + * When a new value is assigned, different platforms will impose different maximum + * length restrictions on the title. Usually such restrictions are quite limited. + * For instance, on Linux and macOS, `process.title` is limited to the size of the + * binary name plus the length of the command-line arguments because setting the`process.title` overwrites the `argv` memory of the process. Node.js v0.8 + * allowed for longer process title strings by also overwriting the `environ`memory but that was potentially insecure and confusing in some (rather obscure) + * cases. + * + * Assigning a value to `process.title` might not result in an accurate label + * within process manager applications such as macOS Activity Monitor or Windows + * Services Manager. + * @since v0.1.104 + */ + title: string; + /** + * The operating system CPU architecture for which the Node.js binary was compiled. + * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`,`'ppc64'`, `'s390'`, `'s390x'`, `'x32'`, and `'x64'`. + * + * ```js + * import { arch } from 'process'; + * + * console.log(`This processor architecture is ${arch}`); + * ``` + * @since v0.5.0 + */ + readonly arch: string; + /** + * The `process.platform` property returns a string identifying the operating + * system platform on which the Node.js process is running. + * + * Currently possible values are: + * + * * `'aix'` + * * `'darwin'` + * * `'freebsd'` + * * `'linux'` + * * `'openbsd'` + * * `'sunos'` + * * `'win32'` + * + * ```js + * import { platform } from 'process'; + * + * console.log(`This platform is ${platform}`); + * ``` + * + * The value `'android'` may also be returned if the Node.js is built on the + * Android operating system. However, Android support in Node.js [is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os). + * @since v0.1.16 + */ + readonly platform: Platform; + /** + * The `process.mainModule` property provides an alternative way of retrieving `require.main`. The difference is that if the main module changes at + * runtime, `require.main` may still refer to the original main module in + * modules that were required before the change occurred. Generally, it's + * safe to assume that the two refer to the same module. + * + * As with `require.main`, `process.mainModule` will be `undefined` if there + * is no entry script. + * @since v0.1.17 + * @deprecated Since v14.0.0 - Use `main` instead. + */ + mainModule?: Module | undefined; + memoryUsage: MemoryUsageFn; + /** + * The `process.cpuUsage()` method returns the user and system CPU time usage of + * the current process, in an object with properties `user` and `system`, whose + * values are microsecond values (millionth of a second). These values measure time + * spent in user and system code respectively, and may end up being greater than + * actual elapsed time if multiple CPU cores are performing work for this process. + * + * The result of a previous call to `process.cpuUsage()` can be passed as the + * argument to the function, to get a diff reading. + * + * ```js + * import { cpuUsage } from 'process'; + * + * const startUsage = cpuUsage(); + * // { user: 38579, system: 6986 } + * + * // spin the CPU for 500 milliseconds + * const now = Date.now(); + * while (Date.now() - now < 500); + * + * console.log(cpuUsage(startUsage)); + * // { user: 514883, system: 11226 } + * ``` + * @since v6.1.0 + * @param previousValue A previous return value from calling `process.cpuUsage()` + */ + cpuUsage(previousValue?: CpuUsage): CpuUsage; + /** + * `process.nextTick()` adds `callback` to the "next tick queue". This queue is + * fully drained after the current operation on the JavaScript stack runs to + * completion and before the event loop is allowed to continue. It's possible to + * create an infinite loop if one were to recursively call `process.nextTick()`. + * See the [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#process-nexttick) guide for more background. + * + * ```js + * import { nextTick } from 'process'; + * + * console.log('start'); + * nextTick(() => { + * console.log('nextTick callback'); + * }); + * console.log('scheduled'); + * // Output: + * // start + * // scheduled + * // nextTick callback + * ``` + * + * This is important when developing APIs in order to give users the opportunity + * to assign event handlers _after_ an object has been constructed but before any + * I/O has occurred: + * + * ```js + * import { nextTick } from 'process'; + * + * function MyThing(options) { + * this.setupOptions(options); + * + * nextTick(() => { + * this.startDoingStuff(); + * }); + * } + * + * const thing = new MyThing(); + * thing.getReadyForStuff(); + * + * // thing.startDoingStuff() gets called now, not before. + * ``` + * + * It is very important for APIs to be either 100% synchronous or 100% + * asynchronous. Consider this example: + * + * ```js + * // WARNING! DO NOT USE! BAD UNSAFE HAZARD! + * function maybeSync(arg, cb) { + * if (arg) { + * cb(); + * return; + * } + * + * fs.stat('file', cb); + * } + * ``` + * + * This API is hazardous because in the following case: + * + * ```js + * const maybeTrue = Math.random() > 0.5; + * + * maybeSync(maybeTrue, () => { + * foo(); + * }); + * + * bar(); + * ``` + * + * It is not clear whether `foo()` or `bar()` will be called first. + * + * The following approach is much better: + * + * ```js + * import { nextTick } from 'process'; + * + * function definitelyAsync(arg, cb) { + * if (arg) { + * nextTick(cb); + * return; + * } + * + * fs.stat('file', cb); + * } + * ``` + * @since v0.1.26 + * @param args Additional arguments to pass when invoking the `callback` + */ + nextTick(callback: Function, ...args: any[]): void; + /** + * The `process.release` property returns an `Object` containing metadata related + * to the current release, including URLs for the source tarball and headers-only + * tarball. + * + * `process.release` contains the following properties: + * + * ```js + * { + * name: 'node', + * lts: 'Erbium', + * sourceUrl: 'https://nodejs.org/download/release/v12.18.1/node-v12.18.1.tar.gz', + * headersUrl: 'https://nodejs.org/download/release/v12.18.1/node-v12.18.1-headers.tar.gz', + * libUrl: 'https://nodejs.org/download/release/v12.18.1/win-x64/node.lib' + * } + * ``` + * + * In custom builds from non-release versions of the source tree, only the`name` property may be present. The additional properties should not be + * relied upon to exist. + * @since v3.0.0 + */ + readonly release: ProcessRelease; + features: { + inspector: boolean; + debug: boolean; + uv: boolean; + ipv6: boolean; + tls_alpn: boolean; + tls_sni: boolean; + tls_ocsp: boolean; + tls: boolean; + }; + /** + * `process.umask()` returns the Node.js process's file mode creation mask. Child + * processes inherit the mask from the parent process. + * @since v0.1.19 + * @deprecated Calling `process.umask()` with no argument causes the process-wide umask to be written twice. This introduces a race condition between threads, and is a potential * + * security vulnerability. There is no safe, cross-platform alternative API. + */ + umask(): number; + /** + * Can only be set if not in worker thread. + */ + umask(mask: string | number): number; + /** + * The `process.uptime()` method returns the number of seconds the current Node.js + * process has been running. + * + * The return value includes fractions of a second. Use `Math.floor()` to get whole + * seconds. + * @since v0.5.0 + */ + uptime(): number; + hrtime: HRTime; + /** + * If Node.js is spawned with an IPC channel, the `process.send()` method can be + * used to send messages to the parent process. Messages will be received as a `'message'` event on the parent's `ChildProcess` object. + * + * If Node.js was not spawned with an IPC channel, `process.send` will be`undefined`. + * + * The message goes through serialization and parsing. The resulting message might + * not be the same as what is originally sent. + * @since v0.5.9 + * @param options used to parameterize the sending of certain types of handles.`options` supports the following properties: + */ + send?( + message: any, + sendHandle?: any, + options?: { + swallowErrors?: boolean | undefined; + }, + callback?: (error: Error | null) => void + ): boolean; + /** + * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.disconnect()` method will close the + * IPC channel to the parent process, allowing the child process to exit gracefully + * once there are no other connections keeping it alive. + * + * The effect of calling `process.disconnect()` is the same as calling `ChildProcess.disconnect()` from the parent process. + * + * If the Node.js process was not spawned with an IPC channel,`process.disconnect()` will be `undefined`. + * @since v0.7.2 + */ + disconnect(): void; + /** + * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.connected` property will return`true` so long as the IPC + * channel is connected and will return `false` after`process.disconnect()` is called. + * + * Once `process.connected` is `false`, it is no longer possible to send messages + * over the IPC channel using `process.send()`. + * @since v0.7.2 + */ + connected: boolean; + /** + * The `process.allowedNodeEnvironmentFlags` property is a special, + * read-only `Set` of flags allowable within the `NODE_OPTIONS` environment variable. + * + * `process.allowedNodeEnvironmentFlags` extends `Set`, but overrides`Set.prototype.has` to recognize several different possible flag + * representations. `process.allowedNodeEnvironmentFlags.has()` will + * return `true` in the following cases: + * + * * Flags may omit leading single (`-`) or double (`--`) dashes; e.g.,`inspect-brk` for `--inspect-brk`, or `r` for `-r`. + * * Flags passed through to V8 (as listed in `--v8-options`) may replace + * one or more _non-leading_ dashes for an underscore, or vice-versa; + * e.g., `--perf_basic_prof`, `--perf-basic-prof`, `--perf_basic-prof`, + * etc. + * * Flags may contain one or more equals (`=`) characters; all + * characters after and including the first equals will be ignored; + * e.g., `--stack-trace-limit=100`. + * * Flags _must_ be allowable within `NODE_OPTIONS`. + * + * When iterating over `process.allowedNodeEnvironmentFlags`, flags will + * appear only _once_; each will begin with one or more dashes. Flags + * passed through to V8 will contain underscores instead of non-leading + * dashes: + * + * ```js + * import { allowedNodeEnvironmentFlags } from 'process'; + * + * allowedNodeEnvironmentFlags.forEach((flag) => { + * // -r + * // --inspect-brk + * // --abort_on_uncaught_exception + * // ... + * }); + * ``` + * + * The methods `add()`, `clear()`, and `delete()` of`process.allowedNodeEnvironmentFlags` do nothing, and will fail + * silently. + * + * If Node.js was compiled _without_ `NODE_OPTIONS` support (shown in {@link config}), `process.allowedNodeEnvironmentFlags` will + * contain what _would have_ been allowable. + * @since v10.10.0 + */ + allowedNodeEnvironmentFlags: ReadonlySet; + /** + * `process.report` is an object whose methods are used to generate diagnostic + * reports for the current process. Additional documentation is available in the `report documentation`. + * @since v11.8.0 + */ + report?: ProcessReport | undefined; + /** + * ```js + * import { resourceUsage } from 'process'; + * + * console.log(resourceUsage()); + * /* + * Will output: + * { + * userCPUTime: 82872, + * systemCPUTime: 4143, + * maxRSS: 33164, + * sharedMemorySize: 0, + * unsharedDataSize: 0, + * unsharedStackSize: 0, + * minorPageFault: 2469, + * majorPageFault: 0, + * swappedOut: 0, + * fsRead: 0, + * fsWrite: 8, + * ipcSent: 0, + * ipcReceived: 0, + * signalsCount: 0, + * voluntaryContextSwitches: 79, + * involuntaryContextSwitches: 1 + * } + * + * ``` + * @since v12.6.0 + * @return the resource usage for the current process. All of these values come from the `uv_getrusage` call which returns a [`uv_rusage_t` struct][uv_rusage_t]. + */ + resourceUsage(): ResourceUsage; + /** + * The `process.traceDeprecation` property indicates whether the`--trace-deprecation` flag is set on the current Node.js process. See the + * documentation for the `'warning' event` and the `emitWarning() method` for more information about this + * flag's behavior. + * @since v0.8.0 + */ + traceDeprecation: boolean; + /* EventEmitter */ + addListener(event: 'beforeExit', listener: BeforeExitListener): this; + addListener(event: 'disconnect', listener: DisconnectListener): this; + addListener(event: 'exit', listener: ExitListener): this; + addListener(event: 'rejectionHandled', listener: RejectionHandledListener): this; + addListener(event: 'uncaughtException', listener: UncaughtExceptionListener): this; + addListener(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this; + addListener(event: 'unhandledRejection', listener: UnhandledRejectionListener): this; + addListener(event: 'warning', listener: WarningListener): this; + addListener(event: 'message', listener: MessageListener): this; + addListener(event: Signals, listener: SignalsListener): this; + addListener(event: 'multipleResolves', listener: MultipleResolveListener): this; + addListener(event: 'worker', listener: WorkerListener): this; + emit(event: 'beforeExit', code: number): boolean; + emit(event: 'disconnect'): boolean; + emit(event: 'exit', code: number): boolean; + emit(event: 'rejectionHandled', promise: Promise): boolean; + emit(event: 'uncaughtException', error: Error): boolean; + emit(event: 'uncaughtExceptionMonitor', error: Error): boolean; + emit(event: 'unhandledRejection', reason: unknown, promise: Promise): boolean; + emit(event: 'warning', warning: Error): boolean; + emit(event: 'message', message: unknown, sendHandle: unknown): this; + emit(event: Signals, signal: Signals): boolean; + emit(event: 'multipleResolves', type: MultipleResolveType, promise: Promise, value: unknown): this; + emit(event: 'worker', listener: WorkerListener): this; + on(event: 'beforeExit', listener: BeforeExitListener): this; + on(event: 'disconnect', listener: DisconnectListener): this; + on(event: 'exit', listener: ExitListener): this; + on(event: 'rejectionHandled', listener: RejectionHandledListener): this; + on(event: 'uncaughtException', listener: UncaughtExceptionListener): this; + on(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this; + on(event: 'unhandledRejection', listener: UnhandledRejectionListener): this; + on(event: 'warning', listener: WarningListener): this; + on(event: 'message', listener: MessageListener): this; + on(event: Signals, listener: SignalsListener): this; + on(event: 'multipleResolves', listener: MultipleResolveListener): this; + on(event: 'worker', listener: WorkerListener): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: 'beforeExit', listener: BeforeExitListener): this; + once(event: 'disconnect', listener: DisconnectListener): this; + once(event: 'exit', listener: ExitListener): this; + once(event: 'rejectionHandled', listener: RejectionHandledListener): this; + once(event: 'uncaughtException', listener: UncaughtExceptionListener): this; + once(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this; + once(event: 'unhandledRejection', listener: UnhandledRejectionListener): this; + once(event: 'warning', listener: WarningListener): this; + once(event: 'message', listener: MessageListener): this; + once(event: Signals, listener: SignalsListener): this; + once(event: 'multipleResolves', listener: MultipleResolveListener): this; + once(event: 'worker', listener: WorkerListener): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'beforeExit', listener: BeforeExitListener): this; + prependListener(event: 'disconnect', listener: DisconnectListener): this; + prependListener(event: 'exit', listener: ExitListener): this; + prependListener(event: 'rejectionHandled', listener: RejectionHandledListener): this; + prependListener(event: 'uncaughtException', listener: UncaughtExceptionListener): this; + prependListener(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this; + prependListener(event: 'unhandledRejection', listener: UnhandledRejectionListener): this; + prependListener(event: 'warning', listener: WarningListener): this; + prependListener(event: 'message', listener: MessageListener): this; + prependListener(event: Signals, listener: SignalsListener): this; + prependListener(event: 'multipleResolves', listener: MultipleResolveListener): this; + prependListener(event: 'worker', listener: WorkerListener): this; + prependOnceListener(event: 'beforeExit', listener: BeforeExitListener): this; + prependOnceListener(event: 'disconnect', listener: DisconnectListener): this; + prependOnceListener(event: 'exit', listener: ExitListener): this; + prependOnceListener(event: 'rejectionHandled', listener: RejectionHandledListener): this; + prependOnceListener(event: 'uncaughtException', listener: UncaughtExceptionListener): this; + prependOnceListener(event: 'uncaughtExceptionMonitor', listener: UncaughtExceptionListener): this; + prependOnceListener(event: 'unhandledRejection', listener: UnhandledRejectionListener): this; + prependOnceListener(event: 'warning', listener: WarningListener): this; + prependOnceListener(event: 'message', listener: MessageListener): this; + prependOnceListener(event: Signals, listener: SignalsListener): this; + prependOnceListener(event: 'multipleResolves', listener: MultipleResolveListener): this; + prependOnceListener(event: 'worker', listener: WorkerListener): this; + listeners(event: 'beforeExit'): BeforeExitListener[]; + listeners(event: 'disconnect'): DisconnectListener[]; + listeners(event: 'exit'): ExitListener[]; + listeners(event: 'rejectionHandled'): RejectionHandledListener[]; + listeners(event: 'uncaughtException'): UncaughtExceptionListener[]; + listeners(event: 'uncaughtExceptionMonitor'): UncaughtExceptionListener[]; + listeners(event: 'unhandledRejection'): UnhandledRejectionListener[]; + listeners(event: 'warning'): WarningListener[]; + listeners(event: 'message'): MessageListener[]; + listeners(event: Signals): SignalsListener[]; + listeners(event: 'multipleResolves'): MultipleResolveListener[]; + listeners(event: 'worker'): WorkerListener[]; + } + } + } + export = process; +} +declare module 'node:process' { + import process = require('process'); + export = process; +} diff --git a/frontend/node_modules/@types/node/punycode.d.ts b/frontend/node_modules/@types/node/punycode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..345af5313d2137822a33368ab2671d8602dd80e6 --- /dev/null +++ b/frontend/node_modules/@types/node/punycode.d.ts @@ -0,0 +1,117 @@ +/** + * **The version of the punycode module bundled in Node.js is being deprecated.**In a future major version of Node.js this module will be removed. Users + * currently depending on the `punycode` module should switch to using the + * userland-provided [Punycode.js](https://github.com/bestiejs/punycode.js) module instead. For punycode-based URL + * encoding, see `url.domainToASCII` or, more generally, the `WHATWG URL API`. + * + * The `punycode` module is a bundled version of the [Punycode.js](https://github.com/bestiejs/punycode.js) module. It + * can be accessed using: + * + * ```js + * const punycode = require('punycode'); + * ``` + * + * [Punycode](https://tools.ietf.org/html/rfc3492) is a character encoding scheme defined by RFC 3492 that is + * primarily intended for use in Internationalized Domain Names. Because host + * names in URLs are limited to ASCII characters only, Domain Names that contain + * non-ASCII characters must be converted into ASCII using the Punycode scheme. + * For instance, the Japanese character that translates into the English word,`'example'` is `'例'`. The Internationalized Domain Name, `'例.com'` (equivalent + * to `'example.com'`) is represented by Punycode as the ASCII string`'xn--fsq.com'`. + * + * The `punycode` module provides a simple implementation of the Punycode standard. + * + * The `punycode` module is a third-party dependency used by Node.js and + * made available to developers as a convenience. Fixes or other modifications to + * the module must be directed to the [Punycode.js](https://github.com/bestiejs/punycode.js) project. + * @deprecated Since v7.0.0 - Deprecated + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/punycode.js) + */ +declare module 'punycode' { + /** + * The `punycode.decode()` method converts a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only + * characters to the equivalent string of Unicode codepoints. + * + * ```js + * punycode.decode('maana-pta'); // 'mañana' + * punycode.decode('--dqo34k'); // '☃-⌘' + * ``` + * @since v0.5.1 + */ + function decode(string: string): string; + /** + * The `punycode.encode()` method converts a string of Unicode codepoints to a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only characters. + * + * ```js + * punycode.encode('mañana'); // 'maana-pta' + * punycode.encode('☃-⌘'); // '--dqo34k' + * ``` + * @since v0.5.1 + */ + function encode(string: string): string; + /** + * The `punycode.toUnicode()` method converts a string representing a domain name + * containing [Punycode](https://tools.ietf.org/html/rfc3492) encoded characters into Unicode. Only the [Punycode](https://tools.ietf.org/html/rfc3492) encoded parts of the domain name are be + * converted. + * + * ```js + * // decode domain names + * punycode.toUnicode('xn--maana-pta.com'); // 'mañana.com' + * punycode.toUnicode('xn----dqo34k.com'); // '☃-⌘.com' + * punycode.toUnicode('example.com'); // 'example.com' + * ``` + * @since v0.6.1 + */ + function toUnicode(domain: string): string; + /** + * The `punycode.toASCII()` method converts a Unicode string representing an + * Internationalized Domain Name to [Punycode](https://tools.ietf.org/html/rfc3492). Only the non-ASCII parts of the + * domain name will be converted. Calling `punycode.toASCII()` on a string that + * already only contains ASCII characters will have no effect. + * + * ```js + * // encode domain names + * punycode.toASCII('mañana.com'); // 'xn--maana-pta.com' + * punycode.toASCII('☃-⌘.com'); // 'xn----dqo34k.com' + * punycode.toASCII('example.com'); // 'example.com' + * ``` + * @since v0.6.1 + */ + function toASCII(domain: string): string; + /** + * @deprecated since v7.0.0 + * The version of the punycode module bundled in Node.js is being deprecated. + * In a future major version of Node.js this module will be removed. + * Users currently depending on the punycode module should switch to using + * the userland-provided Punycode.js module instead. + */ + const ucs2: ucs2; + interface ucs2 { + /** + * @deprecated since v7.0.0 + * The version of the punycode module bundled in Node.js is being deprecated. + * In a future major version of Node.js this module will be removed. + * Users currently depending on the punycode module should switch to using + * the userland-provided Punycode.js module instead. + */ + decode(string: string): number[]; + /** + * @deprecated since v7.0.0 + * The version of the punycode module bundled in Node.js is being deprecated. + * In a future major version of Node.js this module will be removed. + * Users currently depending on the punycode module should switch to using + * the userland-provided Punycode.js module instead. + */ + encode(codePoints: ReadonlyArray): string; + } + /** + * @deprecated since v7.0.0 + * The version of the punycode module bundled in Node.js is being deprecated. + * In a future major version of Node.js this module will be removed. + * Users currently depending on the punycode module should switch to using + * the userland-provided Punycode.js module instead. + */ + const version: string; +} +declare module 'node:punycode' { + export * from 'punycode'; +} diff --git a/frontend/node_modules/@types/node/querystring.d.ts b/frontend/node_modules/@types/node/querystring.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..892440b78513c36ec3d499c55fe1626c638674b3 --- /dev/null +++ b/frontend/node_modules/@types/node/querystring.d.ts @@ -0,0 +1,131 @@ +/** + * The `querystring` module provides utilities for parsing and formatting URL + * query strings. It can be accessed using: + * + * ```js + * const querystring = require('querystring'); + * ``` + * + * The `querystring` API is considered Legacy. While it is still maintained, + * new code should use the `URLSearchParams` API instead. + * @deprecated Legacy + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/querystring.js) + */ +declare module 'querystring' { + interface StringifyOptions { + encodeURIComponent?: ((str: string) => string) | undefined; + } + interface ParseOptions { + maxKeys?: number | undefined; + decodeURIComponent?: ((str: string) => string) | undefined; + } + interface ParsedUrlQuery extends NodeJS.Dict {} + interface ParsedUrlQueryInput extends NodeJS.Dict | ReadonlyArray | ReadonlyArray | null> {} + /** + * The `querystring.stringify()` method produces a URL query string from a + * given `obj` by iterating through the object's "own properties". + * + * It serializes the following types of values passed in `obj`:[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | + * [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) | + * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) | + * [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) | + * [string\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | + * [number\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) | + * [bigint\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) | + * [boolean\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) The numeric values must be finite. Any other input values will be coerced to + * empty strings. + * + * ```js + * querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' }); + * // Returns 'foo=bar&baz=qux&baz=quux&corge=' + * + * querystring.stringify({ foo: 'bar', baz: 'qux' }, ';', ':'); + * // Returns 'foo:bar;baz:qux' + * ``` + * + * By default, characters requiring percent-encoding within the query string will + * be encoded as UTF-8\. If an alternative encoding is required, then an alternative`encodeURIComponent` option will need to be specified: + * + * ```js + * // Assuming gbkEncodeURIComponent function already exists, + * + * querystring.stringify({ w: '中文', foo: 'bar' }, null, null, + * { encodeURIComponent: gbkEncodeURIComponent }); + * ``` + * @since v0.1.25 + * @param obj The object to serialize into a URL query string + * @param [sep='&'] The substring used to delimit key and value pairs in the query string. + * @param [eq='='] . The substring used to delimit keys and values in the query string. + */ + function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string; + /** + * The `querystring.parse()` method parses a URL query string (`str`) into a + * collection of key and value pairs. + * + * For example, the query string `'foo=bar&abc=xyz&abc=123'` is parsed into: + * + * ```js + * { + * foo: 'bar', + * abc: ['xyz', '123'] + * } + * ``` + * + * The object returned by the `querystring.parse()` method _does not_prototypically inherit from the JavaScript `Object`. This means that typical`Object` methods such as `obj.toString()`, + * `obj.hasOwnProperty()`, and others + * are not defined and _will not work_. + * + * By default, percent-encoded characters within the query string will be assumed + * to use UTF-8 encoding. If an alternative character encoding is used, then an + * alternative `decodeURIComponent` option will need to be specified: + * + * ```js + * // Assuming gbkDecodeURIComponent function already exists... + * + * querystring.parse('w=%D6%D0%CE%C4&foo=bar', null, null, + * { decodeURIComponent: gbkDecodeURIComponent }); + * ``` + * @since v0.1.25 + * @param str The URL query string to parse + * @param [sep='&'] The substring used to delimit key and value pairs in the query string. + * @param [eq='='] . The substring used to delimit keys and values in the query string. + */ + function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery; + /** + * The querystring.encode() function is an alias for querystring.stringify(). + */ + const encode: typeof stringify; + /** + * The querystring.decode() function is an alias for querystring.parse(). + */ + const decode: typeof parse; + /** + * The `querystring.escape()` method performs URL percent-encoding on the given`str` in a manner that is optimized for the specific requirements of URL + * query strings. + * + * The `querystring.escape()` method is used by `querystring.stringify()` and is + * generally not expected to be used directly. It is exported primarily to allow + * application code to provide a replacement percent-encoding implementation if + * necessary by assigning `querystring.escape` to an alternative function. + * @since v0.1.25 + */ + function escape(str: string): string; + /** + * The `querystring.unescape()` method performs decoding of URL percent-encoded + * characters on the given `str`. + * + * The `querystring.unescape()` method is used by `querystring.parse()` and is + * generally not expected to be used directly. It is exported primarily to allow + * application code to provide a replacement decoding implementation if + * necessary by assigning `querystring.unescape` to an alternative function. + * + * By default, the `querystring.unescape()` method will attempt to use the + * JavaScript built-in `decodeURIComponent()` method to decode. If that fails, + * a safer equivalent that does not throw on malformed URLs will be used. + * @since v0.1.25 + */ + function unescape(str: string): string; +} +declare module 'node:querystring' { + export * from 'querystring'; +} diff --git a/frontend/node_modules/@types/node/readline.d.ts b/frontend/node_modules/@types/node/readline.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f1545fab767366b982d9458c27af03c665854e4c --- /dev/null +++ b/frontend/node_modules/@types/node/readline.d.ts @@ -0,0 +1,543 @@ +/** + * The `readline` module provides an interface for reading data from a `Readable` stream (such as `process.stdin`) one line at a time. It can be accessed + * using: + * + * ```js + * const readline = require('readline'); + * ``` + * + * The following simple example illustrates the basic use of the `readline` module. + * + * ```js + * const readline = require('readline'); + * + * const rl = readline.createInterface({ + * input: process.stdin, + * output: process.stdout + * }); + * + * rl.question('What do you think of Node.js? ', (answer) => { + * // TODO: Log the answer in a database + * console.log(`Thank you for your valuable feedback: ${answer}`); + * + * rl.close(); + * }); + * ``` + * + * Once this code is invoked, the Node.js application will not terminate until the`readline.Interface` is closed because the interface waits for data to be + * received on the `input` stream. + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/readline.js) + */ +declare module 'readline' { + import { Abortable, EventEmitter } from 'node:events'; + interface Key { + sequence?: string | undefined; + name?: string | undefined; + ctrl?: boolean | undefined; + meta?: boolean | undefined; + shift?: boolean | undefined; + } + /** + * Instances of the `readline.Interface` class are constructed using the`readline.createInterface()` method. Every instance is associated with a + * single `input` `Readable` stream and a single `output` `Writable` stream. + * The `output` stream is used to print prompts for user input that arrives on, + * and is read from, the `input` stream. + * @since v0.1.104 + */ + class Interface extends EventEmitter { + readonly terminal: boolean; + /** + * The current input data being processed by node. + * + * This can be used when collecting input from a TTY stream to retrieve the + * current value that has been processed thus far, prior to the `line` event + * being emitted. Once the `line` event has been emitted, this property will + * be an empty string. + * + * Be aware that modifying the value during the instance runtime may have + * unintended consequences if `rl.cursor` is not also controlled. + * + * **If not using a TTY stream for input, use the `'line'` event.** + * + * One possible use case would be as follows: + * + * ```js + * const values = ['lorem ipsum', 'dolor sit amet']; + * const rl = readline.createInterface(process.stdin); + * const showResults = debounce(() => { + * console.log( + * '\n', + * values.filter((val) => val.startsWith(rl.line)).join(' ') + * ); + * }, 300); + * process.stdin.on('keypress', (c, k) => { + * showResults(); + * }); + * ``` + * @since v0.1.98 + */ + readonly line: string; + /** + * The cursor position relative to `rl.line`. + * + * This will track where the current cursor lands in the input string, when + * reading input from a TTY stream. The position of cursor determines the + * portion of the input string that will be modified as input is processed, + * as well as the column where the terminal caret will be rendered. + * @since v0.1.98 + */ + readonly cursor: number; + /** + * NOTE: According to the documentation: + * + * > Instances of the `readline.Interface` class are constructed using the + * > `readline.createInterface()` method. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/readline.html#readline_class_interface + */ + protected constructor(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean); + /** + * NOTE: According to the documentation: + * + * > Instances of the `readline.Interface` class are constructed using the + * > `readline.createInterface()` method. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/readline.html#readline_class_interface + */ + protected constructor(options: ReadLineOptions); + /** + * The `rl.getPrompt()` method returns the current prompt used by `rl.prompt()`. + * @since v15.3.0 + * @return the current prompt string + */ + getPrompt(): string; + /** + * The `rl.setPrompt()` method sets the prompt that will be written to `output`whenever `rl.prompt()` is called. + * @since v0.1.98 + */ + setPrompt(prompt: string): void; + /** + * The `rl.prompt()` method writes the `readline.Interface` instances configured`prompt` to a new line in `output` in order to provide a user with a new + * location at which to provide input. + * + * When called, `rl.prompt()` will resume the `input` stream if it has been + * paused. + * + * If the `readline.Interface` was created with `output` set to `null` or`undefined` the prompt is not written. + * @since v0.1.98 + * @param preserveCursor If `true`, prevents the cursor placement from being reset to `0`. + */ + prompt(preserveCursor?: boolean): void; + /** + * The `rl.question()` method displays the `query` by writing it to the `output`, + * waits for user input to be provided on `input`, then invokes the `callback`function passing the provided input as the first argument. + * + * When called, `rl.question()` will resume the `input` stream if it has been + * paused. + * + * If the `readline.Interface` was created with `output` set to `null` or`undefined` the `query` is not written. + * + * The `callback` function passed to `rl.question()` does not follow the typical + * pattern of accepting an `Error` object or `null` as the first argument. + * The `callback` is called with the provided answer as the only argument. + * + * Example usage: + * + * ```js + * rl.question('What is your favorite food? ', (answer) => { + * console.log(`Oh, so your favorite food is ${answer}`); + * }); + * ``` + * + * Using an `AbortController` to cancel a question. + * + * ```js + * const ac = new AbortController(); + * const signal = ac.signal; + * + * rl.question('What is your favorite food? ', { signal }, (answer) => { + * console.log(`Oh, so your favorite food is ${answer}`); + * }); + * + * signal.addEventListener('abort', () => { + * console.log('The food question timed out'); + * }, { once: true }); + * + * setTimeout(() => ac.abort(), 10000); + * ``` + * + * If this method is invoked as it's util.promisify()ed version, it returns a + * Promise that fulfills with the answer. If the question is canceled using + * an `AbortController` it will reject with an `AbortError`. + * + * ```js + * const util = require('util'); + * const question = util.promisify(rl.question).bind(rl); + * + * async function questionExample() { + * try { + * const answer = await question('What is you favorite food? '); + * console.log(`Oh, so your favorite food is ${answer}`); + * } catch (err) { + * console.error('Question rejected', err); + * } + * } + * questionExample(); + * ``` + * @since v0.3.3 + * @param query A statement or query to write to `output`, prepended to the prompt. + * @param callback A callback function that is invoked with the user's input in response to the `query`. + */ + question(query: string, callback: (answer: string) => void): void; + question(query: string, options: Abortable, callback: (answer: string) => void): void; + /** + * The `rl.pause()` method pauses the `input` stream, allowing it to be resumed + * later if necessary. + * + * Calling `rl.pause()` does not immediately pause other events (including`'line'`) from being emitted by the `readline.Interface` instance. + * @since v0.3.4 + */ + pause(): this; + /** + * The `rl.resume()` method resumes the `input` stream if it has been paused. + * @since v0.3.4 + */ + resume(): this; + /** + * The `rl.close()` method closes the `readline.Interface` instance and + * relinquishes control over the `input` and `output` streams. When called, + * the `'close'` event will be emitted. + * + * Calling `rl.close()` does not immediately stop other events (including `'line'`) + * from being emitted by the `readline.Interface` instance. + * @since v0.1.98 + */ + close(): void; + /** + * The `rl.write()` method will write either `data` or a key sequence identified + * by `key` to the `output`. The `key` argument is supported only if `output` is + * a `TTY` text terminal. See `TTY keybindings` for a list of key + * combinations. + * + * If `key` is specified, `data` is ignored. + * + * When called, `rl.write()` will resume the `input` stream if it has been + * paused. + * + * If the `readline.Interface` was created with `output` set to `null` or`undefined` the `data` and `key` are not written. + * + * ```js + * rl.write('Delete this!'); + * // Simulate Ctrl+U to delete the line written previously + * rl.write(null, { ctrl: true, name: 'u' }); + * ``` + * + * The `rl.write()` method will write the data to the `readline` `Interface`'s`input`_as if it were provided by the user_. + * @since v0.1.98 + */ + write(data: string | Buffer, key?: Key): void; + write(data: undefined | null | string | Buffer, key: Key): void; + /** + * Returns the real position of the cursor in relation to the input + * prompt + string. Long input (wrapping) strings, as well as multiple + * line prompts are included in the calculations. + * @since v13.5.0, v12.16.0 + */ + getCursorPos(): CursorPos; + /** + * events.EventEmitter + * 1. close + * 2. line + * 3. pause + * 4. resume + * 5. SIGCONT + * 6. SIGINT + * 7. SIGTSTP + * 8. history + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'line', listener: (input: string) => void): this; + addListener(event: 'pause', listener: () => void): this; + addListener(event: 'resume', listener: () => void): this; + addListener(event: 'SIGCONT', listener: () => void): this; + addListener(event: 'SIGINT', listener: () => void): this; + addListener(event: 'SIGTSTP', listener: () => void): this; + addListener(event: 'history', listener: (history: string[]) => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: 'close'): boolean; + emit(event: 'line', input: string): boolean; + emit(event: 'pause'): boolean; + emit(event: 'resume'): boolean; + emit(event: 'SIGCONT'): boolean; + emit(event: 'SIGINT'): boolean; + emit(event: 'SIGTSTP'): boolean; + emit(event: 'history', history: string[]): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'line', listener: (input: string) => void): this; + on(event: 'pause', listener: () => void): this; + on(event: 'resume', listener: () => void): this; + on(event: 'SIGCONT', listener: () => void): this; + on(event: 'SIGINT', listener: () => void): this; + on(event: 'SIGTSTP', listener: () => void): this; + on(event: 'history', listener: (history: string[]) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'line', listener: (input: string) => void): this; + once(event: 'pause', listener: () => void): this; + once(event: 'resume', listener: () => void): this; + once(event: 'SIGCONT', listener: () => void): this; + once(event: 'SIGINT', listener: () => void): this; + once(event: 'SIGTSTP', listener: () => void): this; + once(event: 'history', listener: (history: string[]) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'line', listener: (input: string) => void): this; + prependListener(event: 'pause', listener: () => void): this; + prependListener(event: 'resume', listener: () => void): this; + prependListener(event: 'SIGCONT', listener: () => void): this; + prependListener(event: 'SIGINT', listener: () => void): this; + prependListener(event: 'SIGTSTP', listener: () => void): this; + prependListener(event: 'history', listener: (history: string[]) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'line', listener: (input: string) => void): this; + prependOnceListener(event: 'pause', listener: () => void): this; + prependOnceListener(event: 'resume', listener: () => void): this; + prependOnceListener(event: 'SIGCONT', listener: () => void): this; + prependOnceListener(event: 'SIGINT', listener: () => void): this; + prependOnceListener(event: 'SIGTSTP', listener: () => void): this; + prependOnceListener(event: 'history', listener: (history: string[]) => void): this; + [Symbol.asyncIterator](): AsyncIterableIterator; + } + type ReadLine = Interface; // type forwarded for backwards compatibility + type Completer = (line: string) => CompleterResult; + type AsyncCompleter = (line: string, callback: (err?: null | Error, result?: CompleterResult) => void) => void; + type CompleterResult = [string[], string]; + interface ReadLineOptions { + input: NodeJS.ReadableStream; + output?: NodeJS.WritableStream | undefined; + completer?: Completer | AsyncCompleter | undefined; + terminal?: boolean | undefined; + /** + * Initial list of history lines. This option makes sense + * only if `terminal` is set to `true` by the user or by an internal `output` + * check, otherwise the history caching mechanism is not initialized at all. + * @default [] + */ + history?: string[] | undefined; + historySize?: number | undefined; + prompt?: string | undefined; + crlfDelay?: number | undefined; + /** + * If `true`, when a new input line added + * to the history list duplicates an older one, this removes the older line + * from the list. + * @default false + */ + removeHistoryDuplicates?: boolean | undefined; + escapeCodeTimeout?: number | undefined; + tabSize?: number | undefined; + } + /** + * The `readline.createInterface()` method creates a new `readline.Interface`instance. + * + * ```js + * const readline = require('readline'); + * const rl = readline.createInterface({ + * input: process.stdin, + * output: process.stdout + * }); + * ``` + * + * Once the `readline.Interface` instance is created, the most common case is to + * listen for the `'line'` event: + * + * ```js + * rl.on('line', (line) => { + * console.log(`Received: ${line}`); + * }); + * ``` + * + * If `terminal` is `true` for this instance then the `output` stream will get + * the best compatibility if it defines an `output.columns` property and emits + * a `'resize'` event on the `output` if or when the columns ever change + * (`process.stdout` does this automatically when it is a TTY). + * + * When creating a `readline.Interface` using `stdin` as input, the program + * will not terminate until it receives `EOF` (Ctrl+D on + * Linux/macOS, Ctrl+Z followed by Return on + * Windows). + * If you want your application to exit without waiting for user input, you can `unref()` the standard input stream: + * + * ```js + * process.stdin.unref(); + * ``` + * @since v0.1.98 + */ + function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface; + function createInterface(options: ReadLineOptions): Interface; + /** + * The `readline.emitKeypressEvents()` method causes the given `Readable` stream to begin emitting `'keypress'` events corresponding to received input. + * + * Optionally, `interface` specifies a `readline.Interface` instance for which + * autocompletion is disabled when copy-pasted input is detected. + * + * If the `stream` is a `TTY`, then it must be in raw mode. + * + * This is automatically called by any readline instance on its `input` if the`input` is a terminal. Closing the `readline` instance does not stop + * the `input` from emitting `'keypress'` events. + * + * ```js + * readline.emitKeypressEvents(process.stdin); + * if (process.stdin.isTTY) + * process.stdin.setRawMode(true); + * ``` + * @since v0.7.7 + */ + function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void; + type Direction = -1 | 0 | 1; + interface CursorPos { + rows: number; + cols: number; + } + /** + * The `readline.clearLine()` method clears current line of given `TTY` stream + * in a specified direction identified by `dir`. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean; + /** + * The `readline.clearScreenDown()` method clears the given `TTY` stream from + * the current position of the cursor down. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean; + /** + * The `readline.cursorTo()` method moves cursor to the specified position in a + * given `TTY` `stream`. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean; + /** + * The `readline.moveCursor()` method moves the cursor _relative_ to its current + * position in a given `TTY` `stream`. + * + * ## Example: Tiny CLI + * + * The following example illustrates the use of `readline.Interface` class to + * implement a small command-line interface: + * + * ```js + * const readline = require('readline'); + * const rl = readline.createInterface({ + * input: process.stdin, + * output: process.stdout, + * prompt: 'OHAI> ' + * }); + * + * rl.prompt(); + * + * rl.on('line', (line) => { + * switch (line.trim()) { + * case 'hello': + * console.log('world!'); + * break; + * default: + * console.log(`Say what? I might have heard '${line.trim()}'`); + * break; + * } + * rl.prompt(); + * }).on('close', () => { + * console.log('Have a great day!'); + * process.exit(0); + * }); + * ``` + * + * ## Example: Read file stream line-by-Line + * + * A common use case for `readline` is to consume an input file one line at a + * time. The easiest way to do so is leveraging the `fs.ReadStream` API as + * well as a `for await...of` loop: + * + * ```js + * const fs = require('fs'); + * const readline = require('readline'); + * + * async function processLineByLine() { + * const fileStream = fs.createReadStream('input.txt'); + * + * const rl = readline.createInterface({ + * input: fileStream, + * crlfDelay: Infinity + * }); + * // Note: we use the crlfDelay option to recognize all instances of CR LF + * // ('\r\n') in input.txt as a single line break. + * + * for await (const line of rl) { + * // Each line in input.txt will be successively available here as `line`. + * console.log(`Line from file: ${line}`); + * } + * } + * + * processLineByLine(); + * ``` + * + * Alternatively, one could use the `'line'` event: + * + * ```js + * const fs = require('fs'); + * const readline = require('readline'); + * + * const rl = readline.createInterface({ + * input: fs.createReadStream('sample.txt'), + * crlfDelay: Infinity + * }); + * + * rl.on('line', (line) => { + * console.log(`Line from file: ${line}`); + * }); + * ``` + * + * Currently, `for await...of` loop can be a bit slower. If `async` / `await`flow and speed are both essential, a mixed approach can be applied: + * + * ```js + * const { once } = require('events'); + * const { createReadStream } = require('fs'); + * const { createInterface } = require('readline'); + * + * (async function processLineByLine() { + * try { + * const rl = createInterface({ + * input: createReadStream('big-file.txt'), + * crlfDelay: Infinity + * }); + * + * rl.on('line', (line) => { + * // Process the line. + * }); + * + * await once(rl, 'close'); + * + * console.log('File processed.'); + * } catch (err) { + * console.error(err); + * } + * })(); + * ``` + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean; +} +declare module 'node:readline' { + export * from 'readline'; +} diff --git a/frontend/node_modules/@types/node/repl.d.ts b/frontend/node_modules/@types/node/repl.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..04f64e183736d7d0f44d0c40c8802eff0c373879 --- /dev/null +++ b/frontend/node_modules/@types/node/repl.d.ts @@ -0,0 +1,424 @@ +/** + * The `repl` module provides a Read-Eval-Print-Loop (REPL) implementation that + * is available both as a standalone program or includible in other applications. + * It can be accessed using: + * + * ```js + * const repl = require('repl'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/repl.js) + */ +declare module 'repl' { + import { Interface, Completer, AsyncCompleter } from 'node:readline'; + import { Context } from 'node:vm'; + import { InspectOptions } from 'node:util'; + interface ReplOptions { + /** + * The input prompt to display. + * @default "> " + */ + prompt?: string | undefined; + /** + * The `Readable` stream from which REPL input will be read. + * @default process.stdin + */ + input?: NodeJS.ReadableStream | undefined; + /** + * The `Writable` stream to which REPL output will be written. + * @default process.stdout + */ + output?: NodeJS.WritableStream | undefined; + /** + * If `true`, specifies that the output should be treated as a TTY terminal, and have + * ANSI/VT100 escape codes written to it. + * Default: checking the value of the `isTTY` property on the output stream upon + * instantiation. + */ + terminal?: boolean | undefined; + /** + * The function to be used when evaluating each given line of input. + * Default: an async wrapper for the JavaScript `eval()` function. An `eval` function can + * error with `repl.Recoverable` to indicate the input was incomplete and prompt for + * additional lines. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_default_evaluation + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_custom_evaluation_functions + */ + eval?: REPLEval | undefined; + /** + * Defines if the repl prints output previews or not. + * @default `true` Always `false` in case `terminal` is falsy. + */ + preview?: boolean | undefined; + /** + * If `true`, specifies that the default `writer` function should include ANSI color + * styling to REPL output. If a custom `writer` function is provided then this has no + * effect. + * Default: the REPL instance's `terminal` value. + */ + useColors?: boolean | undefined; + /** + * If `true`, specifies that the default evaluation function will use the JavaScript + * `global` as the context as opposed to creating a new separate context for the REPL + * instance. The node CLI REPL sets this value to `true`. + * Default: `false`. + */ + useGlobal?: boolean | undefined; + /** + * If `true`, specifies that the default writer will not output the return value of a + * command if it evaluates to `undefined`. + * Default: `false`. + */ + ignoreUndefined?: boolean | undefined; + /** + * The function to invoke to format the output of each command before writing to `output`. + * Default: a wrapper for `util.inspect`. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_customizing_repl_output + */ + writer?: REPLWriter | undefined; + /** + * An optional function used for custom Tab auto completion. + * + * @see https://nodejs.org/dist/latest-v11.x/docs/api/readline.html#readline_use_of_the_completer_function + */ + completer?: Completer | AsyncCompleter | undefined; + /** + * A flag that specifies whether the default evaluator executes all JavaScript commands in + * strict mode or default (sloppy) mode. + * Accepted values are: + * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode. + * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to + * prefacing every repl statement with `'use strict'`. + */ + replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT | undefined; + /** + * Stop evaluating the current piece of code when `SIGINT` is received, i.e. `Ctrl+C` is + * pressed. This cannot be used together with a custom `eval` function. + * Default: `false`. + */ + breakEvalOnSigint?: boolean | undefined; + } + type REPLEval = (this: REPLServer, evalCmd: string, context: Context, file: string, cb: (err: Error | null, result: any) => void) => void; + type REPLWriter = (this: REPLServer, obj: any) => string; + /** + * This is the default "writer" value, if none is passed in the REPL options, + * and it can be overridden by custom print functions. + */ + const writer: REPLWriter & { + options: InspectOptions; + }; + type REPLCommandAction = (this: REPLServer, text: string) => void; + interface REPLCommand { + /** + * Help text to be displayed when `.help` is entered. + */ + help?: string | undefined; + /** + * The function to execute, optionally accepting a single string argument. + */ + action: REPLCommandAction; + } + /** + * Instances of `repl.REPLServer` are created using the {@link start} method + * or directly using the JavaScript `new` keyword. + * + * ```js + * const repl = require('repl'); + * + * const options = { useColors: true }; + * + * const firstInstance = repl.start(options); + * const secondInstance = new repl.REPLServer(options); + * ``` + * @since v0.1.91 + */ + class REPLServer extends Interface { + /** + * The `vm.Context` provided to the `eval` function to be used for JavaScript + * evaluation. + */ + readonly context: Context; + /** + * @deprecated since v14.3.0 - Use `input` instead. + */ + readonly inputStream: NodeJS.ReadableStream; + /** + * @deprecated since v14.3.0 - Use `output` instead. + */ + readonly outputStream: NodeJS.WritableStream; + /** + * The `Readable` stream from which REPL input will be read. + */ + readonly input: NodeJS.ReadableStream; + /** + * The `Writable` stream to which REPL output will be written. + */ + readonly output: NodeJS.WritableStream; + /** + * The commands registered via `replServer.defineCommand()`. + */ + readonly commands: NodeJS.ReadOnlyDict; + /** + * A value indicating whether the REPL is currently in "editor mode". + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_commands_and_special_keys + */ + readonly editorMode: boolean; + /** + * A value indicating whether the `_` variable has been assigned. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly underscoreAssigned: boolean; + /** + * The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL). + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly last: any; + /** + * A value indicating whether the `_error` variable has been assigned. + * + * @since v9.8.0 + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly underscoreErrAssigned: boolean; + /** + * The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL). + * + * @since v9.8.0 + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly lastError: any; + /** + * Specified in the REPL options, this is the function to be used when evaluating each + * given line of input. If not specified in the REPL options, this is an async wrapper + * for the JavaScript `eval()` function. + */ + readonly eval: REPLEval; + /** + * Specified in the REPL options, this is a value indicating whether the default + * `writer` function should include ANSI color styling to REPL output. + */ + readonly useColors: boolean; + /** + * Specified in the REPL options, this is a value indicating whether the default `eval` + * function will use the JavaScript `global` as the context as opposed to creating a new + * separate context for the REPL instance. + */ + readonly useGlobal: boolean; + /** + * Specified in the REPL options, this is a value indicating whether the default `writer` + * function should output the result of a command if it evaluates to `undefined`. + */ + readonly ignoreUndefined: boolean; + /** + * Specified in the REPL options, this is the function to invoke to format the output of + * each command before writing to `outputStream`. If not specified in the REPL options, + * this will be a wrapper for `util.inspect`. + */ + readonly writer: REPLWriter; + /** + * Specified in the REPL options, this is the function to use for custom Tab auto-completion. + */ + readonly completer: Completer | AsyncCompleter; + /** + * Specified in the REPL options, this is a flag that specifies whether the default `eval` + * function should execute all JavaScript commands in strict mode or default (sloppy) mode. + * Possible values are: + * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode. + * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to + * prefacing every repl statement with `'use strict'`. + */ + readonly replMode: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT; + /** + * NOTE: According to the documentation: + * + * > Instances of `repl.REPLServer` are created using the `repl.start()` method and + * > _should not_ be created directly using the JavaScript `new` keyword. + * + * `REPLServer` cannot be subclassed due to implementation specifics in NodeJS. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_class_replserver + */ + private constructor(); + /** + * The `replServer.defineCommand()` method is used to add new `.`\-prefixed commands + * to the REPL instance. Such commands are invoked by typing a `.` followed by the`keyword`. The `cmd` is either a `Function` or an `Object` with the following + * properties: + * + * The following example shows two new commands added to the REPL instance: + * + * ```js + * const repl = require('repl'); + * + * const replServer = repl.start({ prompt: '> ' }); + * replServer.defineCommand('sayhello', { + * help: 'Say hello', + * action(name) { + * this.clearBufferedCommand(); + * console.log(`Hello, ${name}!`); + * this.displayPrompt(); + * } + * }); + * replServer.defineCommand('saybye', function saybye() { + * console.log('Goodbye!'); + * this.close(); + * }); + * ``` + * + * The new commands can then be used from within the REPL instance: + * + * ```console + * > .sayhello Node.js User + * Hello, Node.js User! + * > .saybye + * Goodbye! + * ``` + * @since v0.3.0 + * @param keyword The command keyword (*without* a leading `.` character). + * @param cmd The function to invoke when the command is processed. + */ + defineCommand(keyword: string, cmd: REPLCommandAction | REPLCommand): void; + /** + * The `replServer.displayPrompt()` method readies the REPL instance for input + * from the user, printing the configured `prompt` to a new line in the `output`and resuming the `input` to accept new input. + * + * When multi-line input is being entered, an ellipsis is printed rather than the + * 'prompt'. + * + * When `preserveCursor` is `true`, the cursor placement will not be reset to `0`. + * + * The `replServer.displayPrompt` method is primarily intended to be called from + * within the action function for commands registered using the`replServer.defineCommand()` method. + * @since v0.1.91 + */ + displayPrompt(preserveCursor?: boolean): void; + /** + * The `replServer.clearBufferedCommand()` method clears any command that has been + * buffered but not yet executed. This method is primarily intended to be + * called from within the action function for commands registered using the`replServer.defineCommand()` method. + * @since v9.0.0 + */ + clearBufferedCommand(): void; + /** + * Initializes a history log file for the REPL instance. When executing the + * Node.js binary and using the command-line REPL, a history file is initialized + * by default. However, this is not the case when creating a REPL + * programmatically. Use this method to initialize a history log file when working + * with REPL instances programmatically. + * @since v11.10.0 + * @param historyPath the path to the history file + * @param callback called when history writes are ready or upon error + */ + setupHistory(path: string, callback: (err: Error | null, repl: this) => void): void; + /** + * events.EventEmitter + * 1. close - inherited from `readline.Interface` + * 2. line - inherited from `readline.Interface` + * 3. pause - inherited from `readline.Interface` + * 4. resume - inherited from `readline.Interface` + * 5. SIGCONT - inherited from `readline.Interface` + * 6. SIGINT - inherited from `readline.Interface` + * 7. SIGTSTP - inherited from `readline.Interface` + * 8. exit + * 9. reset + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'close', listener: () => void): this; + addListener(event: 'line', listener: (input: string) => void): this; + addListener(event: 'pause', listener: () => void): this; + addListener(event: 'resume', listener: () => void): this; + addListener(event: 'SIGCONT', listener: () => void): this; + addListener(event: 'SIGINT', listener: () => void): this; + addListener(event: 'SIGTSTP', listener: () => void): this; + addListener(event: 'exit', listener: () => void): this; + addListener(event: 'reset', listener: (context: Context) => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: 'close'): boolean; + emit(event: 'line', input: string): boolean; + emit(event: 'pause'): boolean; + emit(event: 'resume'): boolean; + emit(event: 'SIGCONT'): boolean; + emit(event: 'SIGINT'): boolean; + emit(event: 'SIGTSTP'): boolean; + emit(event: 'exit'): boolean; + emit(event: 'reset', context: Context): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'close', listener: () => void): this; + on(event: 'line', listener: (input: string) => void): this; + on(event: 'pause', listener: () => void): this; + on(event: 'resume', listener: () => void): this; + on(event: 'SIGCONT', listener: () => void): this; + on(event: 'SIGINT', listener: () => void): this; + on(event: 'SIGTSTP', listener: () => void): this; + on(event: 'exit', listener: () => void): this; + on(event: 'reset', listener: (context: Context) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'line', listener: (input: string) => void): this; + once(event: 'pause', listener: () => void): this; + once(event: 'resume', listener: () => void): this; + once(event: 'SIGCONT', listener: () => void): this; + once(event: 'SIGINT', listener: () => void): this; + once(event: 'SIGTSTP', listener: () => void): this; + once(event: 'exit', listener: () => void): this; + once(event: 'reset', listener: (context: Context) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'line', listener: (input: string) => void): this; + prependListener(event: 'pause', listener: () => void): this; + prependListener(event: 'resume', listener: () => void): this; + prependListener(event: 'SIGCONT', listener: () => void): this; + prependListener(event: 'SIGINT', listener: () => void): this; + prependListener(event: 'SIGTSTP', listener: () => void): this; + prependListener(event: 'exit', listener: () => void): this; + prependListener(event: 'reset', listener: (context: Context) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'line', listener: (input: string) => void): this; + prependOnceListener(event: 'pause', listener: () => void): this; + prependOnceListener(event: 'resume', listener: () => void): this; + prependOnceListener(event: 'SIGCONT', listener: () => void): this; + prependOnceListener(event: 'SIGINT', listener: () => void): this; + prependOnceListener(event: 'SIGTSTP', listener: () => void): this; + prependOnceListener(event: 'exit', listener: () => void): this; + prependOnceListener(event: 'reset', listener: (context: Context) => void): this; + } + /** + * A flag passed in the REPL options. Evaluates expressions in sloppy mode. + */ + const REPL_MODE_SLOPPY: unique symbol; + /** + * A flag passed in the REPL options. Evaluates expressions in strict mode. + * This is equivalent to prefacing every repl statement with `'use strict'`. + */ + const REPL_MODE_STRICT: unique symbol; + /** + * The `repl.start()` method creates and starts a {@link REPLServer} instance. + * + * If `options` is a string, then it specifies the input prompt: + * + * ```js + * const repl = require('repl'); + * + * // a Unix style prompt + * repl.start('$ '); + * ``` + * @since v0.1.91 + */ + function start(options?: string | ReplOptions): REPLServer; + /** + * Indicates a recoverable error that a `REPLServer` can use to support multi-line input. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_recoverable_errors + */ + class Recoverable extends SyntaxError { + err: Error; + constructor(err: Error); + } +} +declare module 'node:repl' { + export * from 'repl'; +} diff --git a/frontend/node_modules/@types/node/stream.d.ts b/frontend/node_modules/@types/node/stream.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3927144a83a62ade98e536342a1b276fd5dd2533 --- /dev/null +++ b/frontend/node_modules/@types/node/stream.d.ts @@ -0,0 +1,1249 @@ +/** + * A stream is an abstract interface for working with streaming data in Node.js. + * The `stream` module provides an API for implementing the stream interface. + * + * There are many stream objects provided by Node.js. For instance, a `request to an HTTP server` and `process.stdout` are both stream instances. + * + * Streams can be readable, writable, or both. All streams are instances of `EventEmitter`. + * + * To access the `stream` module: + * + * ```js + * const stream = require('stream'); + * ``` + * + * The `stream` module is useful for creating new types of stream instances. It is + * usually not necessary to use the `stream` module to consume streams. + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/stream.js) + */ +declare module 'stream' { + import { EventEmitter, Abortable } from 'node:events'; + import * as streamPromises from 'node:stream/promises'; + import * as streamConsumers from 'node:stream/consumers'; + class internal extends EventEmitter { + pipe( + destination: T, + options?: { + end?: boolean | undefined; + } + ): T; + } + namespace internal { + class Stream extends internal { + constructor(opts?: ReadableOptions); + } + interface StreamOptions extends Abortable { + emitClose?: boolean | undefined; + highWaterMark?: number | undefined; + objectMode?: boolean | undefined; + construct?(this: T, callback: (error?: Error | null) => void): void; + destroy?(this: T, error: Error | null, callback: (error: Error | null) => void): void; + autoDestroy?: boolean | undefined; + } + interface ReadableOptions extends StreamOptions { + encoding?: BufferEncoding | undefined; + read?(this: Readable, size: number): void; + } + /** + * @since v0.9.4 + */ + class Readable extends Stream implements NodeJS.ReadableStream { + /** + * A utility method for creating Readable Streams out of iterators. + */ + static from(iterable: Iterable | AsyncIterable, options?: ReadableOptions): Readable; + /** + * Returns whether the stream has been read from or cancelled. + * @since v16.8.0 + */ + static isDisturbed(stream: Readable | NodeJS.ReadableStream): boolean; + /** + * Returns whether the stream was destroyed or errored before emitting `'end'`. + * @since v16.8.0 + * @experimental + */ + readonly readableAborted: boolean; + /** + * Is `true` if it is safe to call `readable.read()`, which means + * the stream has not been destroyed or emitted `'error'` or `'end'`. + * @since v11.4.0 + */ + readable: boolean; + /** + * Returns whether `'data'` has been emitted. + * @since v16.7.0 + * @experimental + */ + readonly readableDidRead: boolean; + /** + * Getter for the property `encoding` of a given `Readable` stream. The `encoding`property can be set using the `readable.setEncoding()` method. + * @since v12.7.0 + */ + readonly readableEncoding: BufferEncoding | null; + /** + * Becomes `true` when `'end'` event is emitted. + * @since v12.9.0 + */ + readonly readableEnded: boolean; + /** + * This property reflects the current state of a `Readable` stream as described + * in the `Three states` section. + * @since v9.4.0 + */ + readonly readableFlowing: boolean | null; + /** + * Returns the value of `highWaterMark` passed when creating this `Readable`. + * @since v9.3.0 + */ + readonly readableHighWaterMark: number; + /** + * This property contains the number of bytes (or objects) in the queue + * ready to be read. The value provides introspection data regarding + * the status of the `highWaterMark`. + * @since v9.4.0 + */ + readonly readableLength: number; + /** + * Getter for the property `objectMode` of a given `Readable` stream. + * @since v12.3.0 + */ + readonly readableObjectMode: boolean; + /** + * Is `true` after `readable.destroy()` has been called. + * @since v8.0.0 + */ + destroyed: boolean; + constructor(opts?: ReadableOptions); + _construct?(callback: (error?: Error | null) => void): void; + _read(size: number): void; + /** + * The `readable.read()` method pulls some data out of the internal buffer and + * returns it. If no data available to be read, `null` is returned. By default, + * the data will be returned as a `Buffer` object unless an encoding has been + * specified using the `readable.setEncoding()` method or the stream is operating + * in object mode. + * + * The optional `size` argument specifies a specific number of bytes to read. If`size` bytes are not available to be read, `null` will be returned _unless_the stream has ended, in which + * case all of the data remaining in the internal + * buffer will be returned. + * + * If the `size` argument is not specified, all of the data contained in the + * internal buffer will be returned. + * + * The `size` argument must be less than or equal to 1 GiB. + * + * The `readable.read()` method should only be called on `Readable` streams + * operating in paused mode. In flowing mode, `readable.read()` is called + * automatically until the internal buffer is fully drained. + * + * ```js + * const readable = getReadableStreamSomehow(); + * + * // 'readable' may be triggered multiple times as data is buffered in + * readable.on('readable', () => { + * let chunk; + * console.log('Stream is readable (new data received in buffer)'); + * // Use a loop to make sure we read all currently available data + * while (null !== (chunk = readable.read())) { + * console.log(`Read ${chunk.length} bytes of data...`); + * } + * }); + * + * // 'end' will be triggered once when there is no more data available + * readable.on('end', () => { + * console.log('Reached end of stream.'); + * }); + * ``` + * + * Each call to `readable.read()` returns a chunk of data, or `null`. The chunks + * are not concatenated. A `while` loop is necessary to consume all data + * currently in the buffer. When reading a large file `.read()` may return `null`, + * having consumed all buffered content so far, but there is still more data to + * come not yet buffered. In this case a new `'readable'` event will be emitted + * when there is more data in the buffer. Finally the `'end'` event will be + * emitted when there is no more data to come. + * + * Therefore to read a file's whole contents from a `readable`, it is necessary + * to collect chunks across multiple `'readable'` events: + * + * ```js + * const chunks = []; + * + * readable.on('readable', () => { + * let chunk; + * while (null !== (chunk = readable.read())) { + * chunks.push(chunk); + * } + * }); + * + * readable.on('end', () => { + * const content = chunks.join(''); + * }); + * ``` + * + * A `Readable` stream in object mode will always return a single item from + * a call to `readable.read(size)`, regardless of the value of the`size` argument. + * + * If the `readable.read()` method returns a chunk of data, a `'data'` event will + * also be emitted. + * + * Calling {@link read} after the `'end'` event has + * been emitted will return `null`. No runtime error will be raised. + * @since v0.9.4 + * @param size Optional argument to specify how much data to read. + */ + read(size?: number): any; + /** + * The `readable.setEncoding()` method sets the character encoding for + * data read from the `Readable` stream. + * + * By default, no encoding is assigned and stream data will be returned as`Buffer` objects. Setting an encoding causes the stream data + * to be returned as strings of the specified encoding rather than as `Buffer`objects. For instance, calling `readable.setEncoding('utf8')` will cause the + * output data to be interpreted as UTF-8 data, and passed as strings. Calling`readable.setEncoding('hex')` will cause the data to be encoded in hexadecimal + * string format. + * + * The `Readable` stream will properly handle multi-byte characters delivered + * through the stream that would otherwise become improperly decoded if simply + * pulled from the stream as `Buffer` objects. + * + * ```js + * const readable = getReadableStreamSomehow(); + * readable.setEncoding('utf8'); + * readable.on('data', (chunk) => { + * assert.equal(typeof chunk, 'string'); + * console.log('Got %d characters of string data:', chunk.length); + * }); + * ``` + * @since v0.9.4 + * @param encoding The encoding to use. + */ + setEncoding(encoding: BufferEncoding): this; + /** + * The `readable.pause()` method will cause a stream in flowing mode to stop + * emitting `'data'` events, switching out of flowing mode. Any data that + * becomes available will remain in the internal buffer. + * + * ```js + * const readable = getReadableStreamSomehow(); + * readable.on('data', (chunk) => { + * console.log(`Received ${chunk.length} bytes of data.`); + * readable.pause(); + * console.log('There will be no additional data for 1 second.'); + * setTimeout(() => { + * console.log('Now data will start flowing again.'); + * readable.resume(); + * }, 1000); + * }); + * ``` + * + * The `readable.pause()` method has no effect if there is a `'readable'`event listener. + * @since v0.9.4 + */ + pause(): this; + /** + * The `readable.resume()` method causes an explicitly paused `Readable` stream to + * resume emitting `'data'` events, switching the stream into flowing mode. + * + * The `readable.resume()` method can be used to fully consume the data from a + * stream without actually processing any of that data: + * + * ```js + * getReadableStreamSomehow() + * .resume() + * .on('end', () => { + * console.log('Reached the end, but did not read anything.'); + * }); + * ``` + * + * The `readable.resume()` method has no effect if there is a `'readable'`event listener. + * @since v0.9.4 + */ + resume(): this; + /** + * The `readable.isPaused()` method returns the current operating state of the`Readable`. This is used primarily by the mechanism that underlies the`readable.pipe()` method. In most + * typical cases, there will be no reason to + * use this method directly. + * + * ```js + * const readable = new stream.Readable(); + * + * readable.isPaused(); // === false + * readable.pause(); + * readable.isPaused(); // === true + * readable.resume(); + * readable.isPaused(); // === false + * ``` + * @since v0.11.14 + */ + isPaused(): boolean; + /** + * The `readable.unpipe()` method detaches a `Writable` stream previously attached + * using the {@link pipe} method. + * + * If the `destination` is not specified, then _all_ pipes are detached. + * + * If the `destination` is specified, but no pipe is set up for it, then + * the method does nothing. + * + * ```js + * const fs = require('fs'); + * const readable = getReadableStreamSomehow(); + * const writable = fs.createWriteStream('file.txt'); + * // All the data from readable goes into 'file.txt', + * // but only for the first second. + * readable.pipe(writable); + * setTimeout(() => { + * console.log('Stop writing to file.txt.'); + * readable.unpipe(writable); + * console.log('Manually close the file stream.'); + * writable.end(); + * }, 1000); + * ``` + * @since v0.9.4 + * @param destination Optional specific stream to unpipe + */ + unpipe(destination?: NodeJS.WritableStream): this; + /** + * Passing `chunk` as `null` signals the end of the stream (EOF) and behaves the + * same as `readable.push(null)`, after which no more data can be written. The EOF + * signal is put at the end of the buffer and any buffered data will still be + * flushed. + * + * The `readable.unshift()` method pushes a chunk of data back into the internal + * buffer. This is useful in certain situations where a stream is being consumed by + * code that needs to "un-consume" some amount of data that it has optimistically + * pulled out of the source, so that the data can be passed on to some other party. + * + * The `stream.unshift(chunk)` method cannot be called after the `'end'` event + * has been emitted or a runtime error will be thrown. + * + * Developers using `stream.unshift()` often should consider switching to + * use of a `Transform` stream instead. See the `API for stream implementers` section for more information. + * + * ```js + * // Pull off a header delimited by \n\n. + * // Use unshift() if we get too much. + * // Call the callback with (error, header, stream). + * const { StringDecoder } = require('string_decoder'); + * function parseHeader(stream, callback) { + * stream.on('error', callback); + * stream.on('readable', onReadable); + * const decoder = new StringDecoder('utf8'); + * let header = ''; + * function onReadable() { + * let chunk; + * while (null !== (chunk = stream.read())) { + * const str = decoder.write(chunk); + * if (str.match(/\n\n/)) { + * // Found the header boundary. + * const split = str.split(/\n\n/); + * header += split.shift(); + * const remaining = split.join('\n\n'); + * const buf = Buffer.from(remaining, 'utf8'); + * stream.removeListener('error', callback); + * // Remove the 'readable' listener before unshifting. + * stream.removeListener('readable', onReadable); + * if (buf.length) + * stream.unshift(buf); + * // Now the body of the message can be read from the stream. + * callback(null, header, stream); + * } else { + * // Still reading the header. + * header += str; + * } + * } + * } + * } + * ``` + * + * Unlike {@link push}, `stream.unshift(chunk)` will not + * end the reading process by resetting the internal reading state of the stream. + * This can cause unexpected results if `readable.unshift()` is called during a + * read (i.e. from within a {@link _read} implementation on a + * custom stream). Following the call to `readable.unshift()` with an immediate {@link push} will reset the reading state appropriately, + * however it is best to simply avoid calling `readable.unshift()` while in the + * process of performing a read. + * @since v0.9.11 + * @param chunk Chunk of data to unshift onto the read queue. For streams not operating in object mode, `chunk` must be a string, `Buffer`, `Uint8Array` or `null`. For object mode + * streams, `chunk` may be any JavaScript value. + * @param encoding Encoding of string chunks. Must be a valid `Buffer` encoding, such as `'utf8'` or `'ascii'`. + */ + unshift(chunk: any, encoding?: BufferEncoding): void; + /** + * Prior to Node.js 0.10, streams did not implement the entire `stream` module API + * as it is currently defined. (See `Compatibility` for more information.) + * + * When using an older Node.js library that emits `'data'` events and has a {@link pause} method that is advisory only, the`readable.wrap()` method can be used to create a `Readable` + * stream that uses + * the old stream as its data source. + * + * It will rarely be necessary to use `readable.wrap()` but the method has been + * provided as a convenience for interacting with older Node.js applications and + * libraries. + * + * ```js + * const { OldReader } = require('./old-api-module.js'); + * const { Readable } = require('stream'); + * const oreader = new OldReader(); + * const myReader = new Readable().wrap(oreader); + * + * myReader.on('readable', () => { + * myReader.read(); // etc. + * }); + * ``` + * @since v0.9.4 + * @param stream An "old style" readable stream + */ + wrap(stream: NodeJS.ReadableStream): this; + push(chunk: any, encoding?: BufferEncoding): boolean; + _destroy(error: Error | null, callback: (error?: Error | null) => void): void; + /** + * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'`event (unless `emitClose` is set to `false`). After this call, the readable + * stream will release any internal resources and subsequent calls to `push()`will be ignored. + * + * Once `destroy()` has been called any further calls will be a no-op and no + * further errors except from `_destroy()` may be emitted as `'error'`. + * + * Implementors should not override this method, but instead implement `readable._destroy()`. + * @since v8.0.0 + * @param error Error which will be passed as payload in `'error'` event + */ + destroy(error?: Error): void; + /** + * Event emitter + * The defined events on documents including: + * 1. close + * 2. data + * 3. end + * 4. error + * 5. pause + * 6. readable + * 7. resume + */ + addListener(event: 'close', listener: () => void): this; + addListener(event: 'data', listener: (chunk: any) => void): this; + addListener(event: 'end', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'pause', listener: () => void): this; + addListener(event: 'readable', listener: () => void): this; + addListener(event: 'resume', listener: () => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: 'close'): boolean; + emit(event: 'data', chunk: any): boolean; + emit(event: 'end'): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'pause'): boolean; + emit(event: 'readable'): boolean; + emit(event: 'resume'): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: 'close', listener: () => void): this; + on(event: 'data', listener: (chunk: any) => void): this; + on(event: 'end', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'pause', listener: () => void): this; + on(event: 'readable', listener: () => void): this; + on(event: 'resume', listener: () => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'data', listener: (chunk: any) => void): this; + once(event: 'end', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'pause', listener: () => void): this; + once(event: 'readable', listener: () => void): this; + once(event: 'resume', listener: () => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'data', listener: (chunk: any) => void): this; + prependListener(event: 'end', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'pause', listener: () => void): this; + prependListener(event: 'readable', listener: () => void): this; + prependListener(event: 'resume', listener: () => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'data', listener: (chunk: any) => void): this; + prependOnceListener(event: 'end', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'pause', listener: () => void): this; + prependOnceListener(event: 'readable', listener: () => void): this; + prependOnceListener(event: 'resume', listener: () => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + removeListener(event: 'close', listener: () => void): this; + removeListener(event: 'data', listener: (chunk: any) => void): this; + removeListener(event: 'end', listener: () => void): this; + removeListener(event: 'error', listener: (err: Error) => void): this; + removeListener(event: 'pause', listener: () => void): this; + removeListener(event: 'readable', listener: () => void): this; + removeListener(event: 'resume', listener: () => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + [Symbol.asyncIterator](): AsyncIterableIterator; + } + interface WritableOptions extends StreamOptions { + decodeStrings?: boolean | undefined; + defaultEncoding?: BufferEncoding | undefined; + write?(this: Writable, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void; + writev?( + this: Writable, + chunks: Array<{ + chunk: any; + encoding: BufferEncoding; + }>, + callback: (error?: Error | null) => void + ): void; + final?(this: Writable, callback: (error?: Error | null) => void): void; + } + /** + * @since v0.9.4 + */ + class Writable extends Stream implements NodeJS.WritableStream { + /** + * Is `true` if it is safe to call `writable.write()`, which means + * the stream has not been destroyed, errored or ended. + * @since v11.4.0 + */ + readonly writable: boolean; + /** + * Is `true` after `writable.end()` has been called. This property + * does not indicate whether the data has been flushed, for this use `writable.writableFinished` instead. + * @since v12.9.0 + */ + readonly writableEnded: boolean; + /** + * Is set to `true` immediately before the `'finish'` event is emitted. + * @since v12.6.0 + */ + readonly writableFinished: boolean; + /** + * Return the value of `highWaterMark` passed when creating this `Writable`. + * @since v9.3.0 + */ + readonly writableHighWaterMark: number; + /** + * This property contains the number of bytes (or objects) in the queue + * ready to be written. The value provides introspection data regarding + * the status of the `highWaterMark`. + * @since v9.4.0 + */ + readonly writableLength: number; + /** + * Getter for the property `objectMode` of a given `Writable` stream. + * @since v12.3.0 + */ + readonly writableObjectMode: boolean; + /** + * Number of times `writable.uncork()` needs to be + * called in order to fully uncork the stream. + * @since v13.2.0, v12.16.0 + */ + readonly writableCorked: number; + /** + * Is `true` after `writable.destroy()` has been called. + * @since v8.0.0 + */ + destroyed: boolean; + constructor(opts?: WritableOptions); + _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void; + _writev?( + chunks: Array<{ + chunk: any; + encoding: BufferEncoding; + }>, + callback: (error?: Error | null) => void + ): void; + _construct?(callback: (error?: Error | null) => void): void; + _destroy(error: Error | null, callback: (error?: Error | null) => void): void; + _final(callback: (error?: Error | null) => void): void; + /** + * The `writable.write()` method writes some data to the stream, and calls the + * supplied `callback` once the data has been fully handled. If an error + * occurs, the `callback` will be called with the error as its + * first argument. The `callback` is called asynchronously and before `'error'` is + * emitted. + * + * The return value is `true` if the internal buffer is less than the`highWaterMark` configured when the stream was created after admitting `chunk`. + * If `false` is returned, further attempts to write data to the stream should + * stop until the `'drain'` event is emitted. + * + * While a stream is not draining, calls to `write()` will buffer `chunk`, and + * return false. Once all currently buffered chunks are drained (accepted for + * delivery by the operating system), the `'drain'` event will be emitted. + * It is recommended that once `write()` returns false, no more chunks be written + * until the `'drain'` event is emitted. While calling `write()` on a stream that + * is not draining is allowed, Node.js will buffer all written chunks until + * maximum memory usage occurs, at which point it will abort unconditionally. + * Even before it aborts, high memory usage will cause poor garbage collector + * performance and high RSS (which is not typically released back to the system, + * even after the memory is no longer required). Since TCP sockets may never + * drain if the remote peer does not read the data, writing a socket that is + * not draining may lead to a remotely exploitable vulnerability. + * + * Writing data while the stream is not draining is particularly + * problematic for a `Transform`, because the `Transform` streams are paused + * by default until they are piped or a `'data'` or `'readable'` event handler + * is added. + * + * If the data to be written can be generated or fetched on demand, it is + * recommended to encapsulate the logic into a `Readable` and use {@link pipe}. However, if calling `write()` is preferred, it is + * possible to respect backpressure and avoid memory issues using the `'drain'` event: + * + * ```js + * function write(data, cb) { + * if (!stream.write(data)) { + * stream.once('drain', cb); + * } else { + * process.nextTick(cb); + * } + * } + * + * // Wait for cb to be called before doing any other write. + * write('hello', () => { + * console.log('Write completed, do more writes now.'); + * }); + * ``` + * + * A `Writable` stream in object mode will always ignore the `encoding` argument. + * @since v0.9.4 + * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a string, `Buffer` or `Uint8Array`. For object mode streams, `chunk` may be any + * JavaScript value other than `null`. + * @param [encoding='utf8'] The encoding, if `chunk` is a string. + * @param callback Callback for when this chunk of data is flushed. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + write(chunk: any, callback?: (error: Error | null | undefined) => void): boolean; + write(chunk: any, encoding: BufferEncoding, callback?: (error: Error | null | undefined) => void): boolean; + /** + * The `writable.setDefaultEncoding()` method sets the default `encoding` for a `Writable` stream. + * @since v0.11.15 + * @param encoding The new default encoding + */ + setDefaultEncoding(encoding: BufferEncoding): this; + /** + * Calling the `writable.end()` method signals that no more data will be written + * to the `Writable`. The optional `chunk` and `encoding` arguments allow one + * final additional chunk of data to be written immediately before closing the + * stream. + * + * Calling the {@link write} method after calling {@link end} will raise an error. + * + * ```js + * // Write 'hello, ' and then end with 'world!'. + * const fs = require('fs'); + * const file = fs.createWriteStream('example.txt'); + * file.write('hello, '); + * file.end('world!'); + * // Writing more now is not allowed! + * ``` + * @since v0.9.4 + * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a string, `Buffer` or `Uint8Array`. For object mode streams, `chunk` may be any + * JavaScript value other than `null`. + * @param encoding The encoding if `chunk` is a string + * @param callback Callback for when the stream is finished. + */ + end(cb?: () => void): void; + end(chunk: any, cb?: () => void): void; + end(chunk: any, encoding: BufferEncoding, cb?: () => void): void; + /** + * The `writable.cork()` method forces all written data to be buffered in memory. + * The buffered data will be flushed when either the {@link uncork} or {@link end} methods are called. + * + * The primary intent of `writable.cork()` is to accommodate a situation in which + * several small chunks are written to the stream in rapid succession. Instead of + * immediately forwarding them to the underlying destination, `writable.cork()`buffers all the chunks until `writable.uncork()` is called, which will pass them + * all to `writable._writev()`, if present. This prevents a head-of-line blocking + * situation where data is being buffered while waiting for the first small chunk + * to be processed. However, use of `writable.cork()` without implementing`writable._writev()` may have an adverse effect on throughput. + * + * See also: `writable.uncork()`, `writable._writev()`. + * @since v0.11.2 + */ + cork(): void; + /** + * The `writable.uncork()` method flushes all data buffered since {@link cork} was called. + * + * When using `writable.cork()` and `writable.uncork()` to manage the buffering + * of writes to a stream, it is recommended that calls to `writable.uncork()` be + * deferred using `process.nextTick()`. Doing so allows batching of all`writable.write()` calls that occur within a given Node.js event loop phase. + * + * ```js + * stream.cork(); + * stream.write('some '); + * stream.write('data '); + * process.nextTick(() => stream.uncork()); + * ``` + * + * If the `writable.cork()` method is called multiple times on a stream, the + * same number of calls to `writable.uncork()` must be called to flush the buffered + * data. + * + * ```js + * stream.cork(); + * stream.write('some '); + * stream.cork(); + * stream.write('data '); + * process.nextTick(() => { + * stream.uncork(); + * // The data will not be flushed until uncork() is called a second time. + * stream.uncork(); + * }); + * ``` + * + * See also: `writable.cork()`. + * @since v0.11.2 + */ + uncork(): void; + /** + * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'`event (unless `emitClose` is set to `false`). After this call, the writable + * stream has ended and subsequent calls to `write()` or `end()` will result in + * an `ERR_STREAM_DESTROYED` error. + * This is a destructive and immediate way to destroy a stream. Previous calls to`write()` may not have drained, and may trigger an `ERR_STREAM_DESTROYED` error. + * Use `end()` instead of destroy if data should flush before close, or wait for + * the `'drain'` event before destroying the stream. + * + * Once `destroy()` has been called any further calls will be a no-op and no + * further errors except from `_destroy()` may be emitted as `'error'`. + * + * Implementors should not override this method, + * but instead implement `writable._destroy()`. + * @since v8.0.0 + * @param error Optional, an error to emit with `'error'` event. + */ + destroy(error?: Error): void; + /** + * Event emitter + * The defined events on documents including: + * 1. close + * 2. drain + * 3. error + * 4. finish + * 5. pipe + * 6. unpipe + */ + addListener(event: 'close', listener: () => void): this; + addListener(event: 'drain', listener: () => void): this; + addListener(event: 'error', listener: (err: Error) => void): this; + addListener(event: 'finish', listener: () => void): this; + addListener(event: 'pipe', listener: (src: Readable) => void): this; + addListener(event: 'unpipe', listener: (src: Readable) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: 'close'): boolean; + emit(event: 'drain'): boolean; + emit(event: 'error', err: Error): boolean; + emit(event: 'finish'): boolean; + emit(event: 'pipe', src: Readable): boolean; + emit(event: 'unpipe', src: Readable): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: 'close', listener: () => void): this; + on(event: 'drain', listener: () => void): this; + on(event: 'error', listener: (err: Error) => void): this; + on(event: 'finish', listener: () => void): this; + on(event: 'pipe', listener: (src: Readable) => void): this; + on(event: 'unpipe', listener: (src: Readable) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: 'close', listener: () => void): this; + once(event: 'drain', listener: () => void): this; + once(event: 'error', listener: (err: Error) => void): this; + once(event: 'finish', listener: () => void): this; + once(event: 'pipe', listener: (src: Readable) => void): this; + once(event: 'unpipe', listener: (src: Readable) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: 'close', listener: () => void): this; + prependListener(event: 'drain', listener: () => void): this; + prependListener(event: 'error', listener: (err: Error) => void): this; + prependListener(event: 'finish', listener: () => void): this; + prependListener(event: 'pipe', listener: (src: Readable) => void): this; + prependListener(event: 'unpipe', listener: (src: Readable) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'close', listener: () => void): this; + prependOnceListener(event: 'drain', listener: () => void): this; + prependOnceListener(event: 'error', listener: (err: Error) => void): this; + prependOnceListener(event: 'finish', listener: () => void): this; + prependOnceListener(event: 'pipe', listener: (src: Readable) => void): this; + prependOnceListener(event: 'unpipe', listener: (src: Readable) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + removeListener(event: 'close', listener: () => void): this; + removeListener(event: 'drain', listener: () => void): this; + removeListener(event: 'error', listener: (err: Error) => void): this; + removeListener(event: 'finish', listener: () => void): this; + removeListener(event: 'pipe', listener: (src: Readable) => void): this; + removeListener(event: 'unpipe', listener: (src: Readable) => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + interface DuplexOptions extends ReadableOptions, WritableOptions { + allowHalfOpen?: boolean | undefined; + readableObjectMode?: boolean | undefined; + writableObjectMode?: boolean | undefined; + readableHighWaterMark?: number | undefined; + writableHighWaterMark?: number | undefined; + writableCorked?: number | undefined; + construct?(this: Duplex, callback: (error?: Error | null) => void): void; + read?(this: Duplex, size: number): void; + write?(this: Duplex, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void; + writev?( + this: Duplex, + chunks: Array<{ + chunk: any; + encoding: BufferEncoding; + }>, + callback: (error?: Error | null) => void + ): void; + final?(this: Duplex, callback: (error?: Error | null) => void): void; + destroy?(this: Duplex, error: Error | null, callback: (error: Error | null) => void): void; + } + /** + * Duplex streams are streams that implement both the `Readable` and `Writable` interfaces. + * + * Examples of `Duplex` streams include: + * + * * `TCP sockets` + * * `zlib streams` + * * `crypto streams` + * @since v0.9.4 + */ + class Duplex extends Readable implements Writable { + readonly writable: boolean; + readonly writableEnded: boolean; + readonly writableFinished: boolean; + readonly writableHighWaterMark: number; + readonly writableLength: number; + readonly writableObjectMode: boolean; + readonly writableCorked: number; + /** + * If `false` then the stream will automatically end the writable side when the + * readable side ends. Set initially by the `allowHalfOpen` constructor option, + * which defaults to `false`. + * + * This can be changed manually to change the half-open behavior of an existing`Duplex` stream instance, but must be changed before the `'end'` event is + * emitted. + * @since v0.9.4 + */ + allowHalfOpen: boolean; + constructor(opts?: DuplexOptions); + /** + * A utility method for creating duplex streams. + * + * - `Stream` converts writable stream into writable `Duplex` and readable stream + * to `Duplex`. + * - `Blob` converts into readable `Duplex`. + * - `string` converts into readable `Duplex`. + * - `ArrayBuffer` converts into readable `Duplex`. + * - `AsyncIterable` converts into a readable `Duplex`. Cannot yield `null`. + * - `AsyncGeneratorFunction` converts into a readable/writable transform + * `Duplex`. Must take a source `AsyncIterable` as first parameter. Cannot yield + * `null`. + * - `AsyncFunction` converts into a writable `Duplex`. Must return + * either `null` or `undefined` + * - `Object ({ writable, readable })` converts `readable` and + * `writable` into `Stream` and then combines them into `Duplex` where the + * `Duplex` will write to the `writable` and read from the `readable`. + * - `Promise` converts into readable `Duplex`. Value `null` is ignored. + * + * @since v16.8.0 + */ + static from(src: Stream | Blob | ArrayBuffer | string | Iterable | AsyncIterable | AsyncGeneratorFunction | Promise | Object): Duplex; + _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void; + _writev?( + chunks: Array<{ + chunk: any; + encoding: BufferEncoding; + }>, + callback: (error?: Error | null) => void + ): void; + _destroy(error: Error | null, callback: (error: Error | null) => void): void; + _final(callback: (error?: Error | null) => void): void; + write(chunk: any, encoding?: BufferEncoding, cb?: (error: Error | null | undefined) => void): boolean; + write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean; + setDefaultEncoding(encoding: BufferEncoding): this; + end(cb?: () => void): void; + end(chunk: any, cb?: () => void): void; + end(chunk: any, encoding?: BufferEncoding, cb?: () => void): void; + cork(): void; + uncork(): void; + } + type TransformCallback = (error?: Error | null, data?: any) => void; + interface TransformOptions extends DuplexOptions { + construct?(this: Transform, callback: (error?: Error | null) => void): void; + read?(this: Transform, size: number): void; + write?(this: Transform, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void; + writev?( + this: Transform, + chunks: Array<{ + chunk: any; + encoding: BufferEncoding; + }>, + callback: (error?: Error | null) => void + ): void; + final?(this: Transform, callback: (error?: Error | null) => void): void; + destroy?(this: Transform, error: Error | null, callback: (error: Error | null) => void): void; + transform?(this: Transform, chunk: any, encoding: BufferEncoding, callback: TransformCallback): void; + flush?(this: Transform, callback: TransformCallback): void; + } + /** + * Transform streams are `Duplex` streams where the output is in some way + * related to the input. Like all `Duplex` streams, `Transform` streams + * implement both the `Readable` and `Writable` interfaces. + * + * Examples of `Transform` streams include: + * + * * `zlib streams` + * * `crypto streams` + * @since v0.9.4 + */ + class Transform extends Duplex { + constructor(opts?: TransformOptions); + _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void; + _flush(callback: TransformCallback): void; + } + /** + * The `stream.PassThrough` class is a trivial implementation of a `Transform` stream that simply passes the input bytes across to the output. Its purpose is + * primarily for examples and testing, but there are some use cases where`stream.PassThrough` is useful as a building block for novel sorts of streams. + */ + class PassThrough extends Transform {} + /** + * Attaches an AbortSignal to a readable or writeable stream. This lets code + * control stream destruction using an `AbortController`. + * + * Calling `abort` on the `AbortController` corresponding to the passed`AbortSignal` will behave the same way as calling `.destroy(new AbortError())`on the stream. + * + * ```js + * const fs = require('fs'); + * + * const controller = new AbortController(); + * const read = addAbortSignal( + * controller.signal, + * fs.createReadStream(('object.json')) + * ); + * // Later, abort the operation closing the stream + * controller.abort(); + * ``` + * + * Or using an `AbortSignal` with a readable stream as an async iterable: + * + * ```js + * const controller = new AbortController(); + * setTimeout(() => controller.abort(), 10_000); // set a timeout + * const stream = addAbortSignal( + * controller.signal, + * fs.createReadStream(('object.json')) + * ); + * (async () => { + * try { + * for await (const chunk of stream) { + * await process(chunk); + * } + * } catch (e) { + * if (e.name === 'AbortError') { + * // The operation was cancelled + * } else { + * throw e; + * } + * } + * })(); + * ``` + * @since v15.4.0 + * @param signal A signal representing possible cancellation + * @param stream a stream to attach a signal to + */ + function addAbortSignal(signal: AbortSignal, stream: T): T; + interface FinishedOptions extends Abortable { + error?: boolean | undefined; + readable?: boolean | undefined; + writable?: boolean | undefined; + } + /** + * A function to get notified when a stream is no longer readable, writable + * or has experienced an error or a premature close event. + * + * ```js + * const { finished } = require('stream'); + * + * const rs = fs.createReadStream('archive.tar'); + * + * finished(rs, (err) => { + * if (err) { + * console.error('Stream failed.', err); + * } else { + * console.log('Stream is done reading.'); + * } + * }); + * + * rs.resume(); // Drain the stream. + * ``` + * + * Especially useful in error handling scenarios where a stream is destroyed + * prematurely (like an aborted HTTP request), and will not emit `'end'`or `'finish'`. + * + * The `finished` API provides promise version: + * + * ```js + * const { finished } = require('stream/promises'); + * + * const rs = fs.createReadStream('archive.tar'); + * + * async function run() { + * await finished(rs); + * console.log('Stream is done reading.'); + * } + * + * run().catch(console.error); + * rs.resume(); // Drain the stream. + * ``` + * + * `stream.finished()` leaves dangling event listeners (in particular`'error'`, `'end'`, `'finish'` and `'close'`) after `callback` has been + * invoked. The reason for this is so that unexpected `'error'` events (due to + * incorrect stream implementations) do not cause unexpected crashes. + * If this is unwanted behavior then the returned cleanup function needs to be + * invoked in the callback: + * + * ```js + * const cleanup = finished(rs, (err) => { + * cleanup(); + * // ... + * }); + * ``` + * @since v10.0.0 + * @param stream A readable and/or writable stream. + * @param callback A callback function that takes an optional error argument. + * @return A cleanup function which removes all registered listeners. + */ + function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options: FinishedOptions, callback: (err?: NodeJS.ErrnoException | null) => void): () => void; + function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, callback: (err?: NodeJS.ErrnoException | null) => void): () => void; + namespace finished { + function __promisify__(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options?: FinishedOptions): Promise; + } + type PipelineSourceFunction = () => Iterable | AsyncIterable; + type PipelineSource = Iterable | AsyncIterable | NodeJS.ReadableStream | PipelineSourceFunction; + type PipelineTransform, U> = + | NodeJS.ReadWriteStream + | ((source: S extends (...args: any[]) => Iterable | AsyncIterable ? AsyncIterable : S) => AsyncIterable); + type PipelineTransformSource = PipelineSource | PipelineTransform; + type PipelineDestinationIterableFunction = (source: AsyncIterable) => AsyncIterable; + type PipelineDestinationPromiseFunction = (source: AsyncIterable) => Promise

; + type PipelineDestination, P> = S extends PipelineTransformSource + ? NodeJS.WritableStream | PipelineDestinationIterableFunction | PipelineDestinationPromiseFunction + : never; + type PipelineCallback> = S extends PipelineDestinationPromiseFunction + ? (err: NodeJS.ErrnoException | null, value: P) => void + : (err: NodeJS.ErrnoException | null) => void; + type PipelinePromise> = S extends PipelineDestinationPromiseFunction ? Promise

: Promise; + interface PipelineOptions { + signal: AbortSignal; + } + /** + * A module method to pipe between streams and generators forwarding errors and + * properly cleaning up and provide a callback when the pipeline is complete. + * + * ```js + * const { pipeline } = require('stream'); + * const fs = require('fs'); + * const zlib = require('zlib'); + * + * // Use the pipeline API to easily pipe a series of streams + * // together and get notified when the pipeline is fully done. + * + * // A pipeline to gzip a potentially huge tar file efficiently: + * + * pipeline( + * fs.createReadStream('archive.tar'), + * zlib.createGzip(), + * fs.createWriteStream('archive.tar.gz'), + * (err) => { + * if (err) { + * console.error('Pipeline failed.', err); + * } else { + * console.log('Pipeline succeeded.'); + * } + * } + * ); + * ``` + * + * The `pipeline` API provides a promise version, which can also + * receive an options argument as the last parameter with a`signal` `AbortSignal` property. When the signal is aborted,`destroy` will be called on the underlying pipeline, with + * an`AbortError`. + * + * ```js + * const { pipeline } = require('stream/promises'); + * + * async function run() { + * await pipeline( + * fs.createReadStream('archive.tar'), + * zlib.createGzip(), + * fs.createWriteStream('archive.tar.gz') + * ); + * console.log('Pipeline succeeded.'); + * } + * + * run().catch(console.error); + * ``` + * + * To use an `AbortSignal`, pass it inside an options object, + * as the last argument: + * + * ```js + * const { pipeline } = require('stream/promises'); + * + * async function run() { + * const ac = new AbortController(); + * const signal = ac.signal; + * + * setTimeout(() => ac.abort(), 1); + * await pipeline( + * fs.createReadStream('archive.tar'), + * zlib.createGzip(), + * fs.createWriteStream('archive.tar.gz'), + * { signal }, + * ); + * } + * + * run().catch(console.error); // AbortError + * ``` + * + * The `pipeline` API also supports async generators: + * + * ```js + * const { pipeline } = require('stream/promises'); + * const fs = require('fs'); + * + * async function run() { + * await pipeline( + * fs.createReadStream('lowercase.txt'), + * async function* (source, signal) { + * source.setEncoding('utf8'); // Work with strings rather than `Buffer`s. + * for await (const chunk of source) { + * yield await processChunk(chunk, { signal }); + * } + * }, + * fs.createWriteStream('uppercase.txt') + * ); + * console.log('Pipeline succeeded.'); + * } + * + * run().catch(console.error); + * ``` + * + * Remember to handle the `signal` argument passed into the async generator. + * Especially in the case where the async generator is the source for the + * pipeline (i.e. first argument) or the pipeline will never complete. + * + * ```js + * const { pipeline } = require('stream/promises'); + * const fs = require('fs'); + * + * async function run() { + * await pipeline( + * async function * (signal) { + * await someLongRunningfn({ signal }); + * yield 'asd'; + * }, + * fs.createWriteStream('uppercase.txt') + * ); + * console.log('Pipeline succeeded.'); + * } + * + * run().catch(console.error); + * ``` + * + * `stream.pipeline()` will call `stream.destroy(err)` on all streams except: + * + * * `Readable` streams which have emitted `'end'` or `'close'`. + * * `Writable` streams which have emitted `'finish'` or `'close'`. + * + * `stream.pipeline()` leaves dangling event listeners on the streams + * after the `callback` has been invoked. In the case of reuse of streams after + * failure, this can cause event listener leaks and swallowed errors. + * @since v10.0.0 + * @param callback Called when the pipeline is fully done. + */ + function pipeline, B extends PipelineDestination>( + source: A, + destination: B, + callback?: PipelineCallback + ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; + function pipeline, T1 extends PipelineTransform, B extends PipelineDestination>( + source: A, + transform1: T1, + destination: B, + callback?: PipelineCallback + ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; + function pipeline, T1 extends PipelineTransform, T2 extends PipelineTransform, B extends PipelineDestination>( + source: A, + transform1: T1, + transform2: T2, + destination: B, + callback?: PipelineCallback + ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + B extends PipelineDestination + >(source: A, transform1: T1, transform2: T2, transform3: T3, destination: B, callback?: PipelineCallback): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + T4 extends PipelineTransform, + B extends PipelineDestination + >(source: A, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: B, callback?: PipelineCallback): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; + function pipeline( + streams: ReadonlyArray, + callback?: (err: NodeJS.ErrnoException | null) => void + ): NodeJS.WritableStream; + function pipeline( + stream1: NodeJS.ReadableStream, + stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream, + ...streams: Array void)> + ): NodeJS.WritableStream; + namespace pipeline { + function __promisify__, B extends PipelineDestination>(source: A, destination: B, options?: PipelineOptions): PipelinePromise; + function __promisify__, T1 extends PipelineTransform, B extends PipelineDestination>( + source: A, + transform1: T1, + destination: B, + options?: PipelineOptions + ): PipelinePromise; + function __promisify__, T1 extends PipelineTransform, T2 extends PipelineTransform, B extends PipelineDestination>( + source: A, + transform1: T1, + transform2: T2, + destination: B, + options?: PipelineOptions + ): PipelinePromise; + function __promisify__< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + B extends PipelineDestination + >(source: A, transform1: T1, transform2: T2, transform3: T3, destination: B, options?: PipelineOptions): PipelinePromise; + function __promisify__< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + T4 extends PipelineTransform, + B extends PipelineDestination + >(source: A, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: B, options?: PipelineOptions): PipelinePromise; + function __promisify__(streams: ReadonlyArray, options?: PipelineOptions): Promise; + function __promisify__( + stream1: NodeJS.ReadableStream, + stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream, + ...streams: Array + ): Promise; + } + interface Pipe { + close(): void; + hasRef(): boolean; + ref(): void; + unref(): void; + } + const promises: typeof streamPromises; + const consumers: typeof streamConsumers; + } + export = internal; +} +declare module 'node:stream' { + import stream = require('stream'); + export = stream; +} diff --git a/frontend/node_modules/@types/node/stream/consumers.d.ts b/frontend/node_modules/@types/node/stream/consumers.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ce6c9bb7852f27fdb23877aa6917b63f7dfe3e7b --- /dev/null +++ b/frontend/node_modules/@types/node/stream/consumers.d.ts @@ -0,0 +1,24 @@ +// Duplicates of interface in lib.dom.ts. +// Duplicated here rather than referencing lib.dom.ts because doing so causes lib.dom.ts to be loaded for "test-all" +// Which in turn causes tests to pass that shouldn't pass. +// +// This interface is not, and should not be, exported. +interface Blob { + readonly size: number; + readonly type: string; + arrayBuffer(): Promise; + slice(start?: number, end?: number, contentType?: string): Blob; + stream(): NodeJS.ReadableStream; + text(): Promise; +} +declare module 'stream/consumers' { + import { Readable } from 'node:stream'; + function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator): Promise; + function text(stream: NodeJS.ReadableStream | Readable | AsyncIterator): Promise; + function arrayBuffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator): Promise; + function blob(stream: NodeJS.ReadableStream | Readable | AsyncIterator): Promise; + function json(stream: NodeJS.ReadableStream | Readable | AsyncIterator): Promise; +} +declare module 'node:stream/consumers' { + export * from 'stream/consumers'; +} diff --git a/frontend/node_modules/@types/node/stream/promises.d.ts b/frontend/node_modules/@types/node/stream/promises.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b427073de50f3c33d229092dafbe0ea778c36294 --- /dev/null +++ b/frontend/node_modules/@types/node/stream/promises.d.ts @@ -0,0 +1,42 @@ +declare module 'stream/promises' { + import { FinishedOptions, PipelineSource, PipelineTransform, PipelineDestination, PipelinePromise, PipelineOptions } from 'node:stream'; + function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options?: FinishedOptions): Promise; + function pipeline, B extends PipelineDestination>(source: A, destination: B, options?: PipelineOptions): PipelinePromise; + function pipeline, T1 extends PipelineTransform, B extends PipelineDestination>( + source: A, + transform1: T1, + destination: B, + options?: PipelineOptions + ): PipelinePromise; + function pipeline, T1 extends PipelineTransform, T2 extends PipelineTransform, B extends PipelineDestination>( + source: A, + transform1: T1, + transform2: T2, + destination: B, + options?: PipelineOptions + ): PipelinePromise; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + B extends PipelineDestination + >(source: A, transform1: T1, transform2: T2, transform3: T3, destination: B, options?: PipelineOptions): PipelinePromise; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + T4 extends PipelineTransform, + B extends PipelineDestination + >(source: A, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: B, options?: PipelineOptions): PipelinePromise; + function pipeline(streams: ReadonlyArray, options?: PipelineOptions): Promise; + function pipeline( + stream1: NodeJS.ReadableStream, + stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream, + ...streams: Array + ): Promise; +} +declare module 'node:stream/promises' { + export * from 'stream/promises'; +} diff --git a/frontend/node_modules/@types/node/stream/web.d.ts b/frontend/node_modules/@types/node/stream/web.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a9d75c19c7ba477c47e1ec46e56d871c804819b9 --- /dev/null +++ b/frontend/node_modules/@types/node/stream/web.d.ts @@ -0,0 +1,6 @@ +declare module 'stream/web' { + // stub module, pending copy&paste from .d.ts or manual impl +} +declare module 'node:stream/web' { + export * from 'stream/web'; +} diff --git a/frontend/node_modules/@types/node/string_decoder.d.ts b/frontend/node_modules/@types/node/string_decoder.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..584e0c5d2b27ad4a72a891b8a8d6790a4f88b01c --- /dev/null +++ b/frontend/node_modules/@types/node/string_decoder.d.ts @@ -0,0 +1,67 @@ +/** + * The `string_decoder` module provides an API for decoding `Buffer` objects into + * strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16 + * characters. It can be accessed using: + * + * ```js + * const { StringDecoder } = require('string_decoder'); + * ``` + * + * The following example shows the basic use of the `StringDecoder` class. + * + * ```js + * const { StringDecoder } = require('string_decoder'); + * const decoder = new StringDecoder('utf8'); + * + * const cent = Buffer.from([0xC2, 0xA2]); + * console.log(decoder.write(cent)); + * + * const euro = Buffer.from([0xE2, 0x82, 0xAC]); + * console.log(decoder.write(euro)); + * ``` + * + * When a `Buffer` instance is written to the `StringDecoder` instance, an + * internal buffer is used to ensure that the decoded string does not contain + * any incomplete multibyte characters. These are held in the buffer until the + * next call to `stringDecoder.write()` or until `stringDecoder.end()` is called. + * + * In the following example, the three UTF-8 encoded bytes of the European Euro + * symbol (`€`) are written over three separate operations: + * + * ```js + * const { StringDecoder } = require('string_decoder'); + * const decoder = new StringDecoder('utf8'); + * + * decoder.write(Buffer.from([0xE2])); + * decoder.write(Buffer.from([0x82])); + * console.log(decoder.end(Buffer.from([0xAC]))); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/string_decoder.js) + */ +declare module 'string_decoder' { + class StringDecoder { + constructor(encoding?: BufferEncoding); + /** + * Returns a decoded string, ensuring that any incomplete multibyte characters at + * the end of the `Buffer`, or `TypedArray`, or `DataView` are omitted from the + * returned string and stored in an internal buffer for the next call to`stringDecoder.write()` or `stringDecoder.end()`. + * @since v0.1.99 + * @param buffer A `Buffer`, or `TypedArray`, or `DataView` containing the bytes to decode. + */ + write(buffer: Buffer): string; + /** + * Returns any remaining input stored in the internal buffer as a string. Bytes + * representing incomplete UTF-8 and UTF-16 characters will be replaced with + * substitution characters appropriate for the character encoding. + * + * If the `buffer` argument is provided, one final call to `stringDecoder.write()`is performed before returning the remaining input. + * After `end()` is called, the `stringDecoder` object can be reused for new input. + * @since v0.9.3 + * @param buffer A `Buffer`, or `TypedArray`, or `DataView` containing the bytes to decode. + */ + end(buffer?: Buffer): string; + } +} +declare module 'node:string_decoder' { + export * from 'string_decoder'; +} diff --git a/frontend/node_modules/@types/node/timers.d.ts b/frontend/node_modules/@types/node/timers.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1768d7fb98583084f5565ef0c9e8206a059abbf5 --- /dev/null +++ b/frontend/node_modules/@types/node/timers.d.ts @@ -0,0 +1,94 @@ +/** + * The `timer` module exposes a global API for scheduling functions to + * be called at some future period of time. Because the timer functions are + * globals, there is no need to call `require('timers')` to use the API. + * + * The timer functions within Node.js implement a similar API as the timers API + * provided by Web Browsers but use a different internal implementation that is + * built around the Node.js [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout). + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/timers.js) + */ +declare module 'timers' { + import { Abortable } from 'node:events'; + import { setTimeout as setTimeoutPromise, setImmediate as setImmediatePromise, setInterval as setIntervalPromise } from 'node:timers/promises'; + interface TimerOptions extends Abortable { + /** + * Set to `false` to indicate that the scheduled `Timeout` + * should not require the Node.js event loop to remain active. + * @default true + */ + ref?: boolean | undefined; + } + let setTimeout: typeof global.setTimeout; + let clearTimeout: typeof global.clearTimeout; + let setInterval: typeof global.setInterval; + let clearInterval: typeof global.clearInterval; + let setImmediate: typeof global.setImmediate; + let clearImmediate: typeof global.clearImmediate; + global { + namespace NodeJS { + // compatibility with older typings + interface Timer extends RefCounted { + hasRef(): boolean; + refresh(): this; + [Symbol.toPrimitive](): number; + } + interface Immediate extends RefCounted { + /** + * If true, the `Immediate` object will keep the Node.js event loop active. + * @since v11.0.0 + */ + hasRef(): boolean; + _onImmediate: Function; // to distinguish it from the Timeout class + } + interface Timeout extends Timer { + /** + * If true, the `Timeout` object will keep the Node.js event loop active. + * @since v11.0.0 + */ + hasRef(): boolean; + /** + * Sets the timer's start time to the current time, and reschedules the timer to + * call its callback at the previously specified duration adjusted to the current + * time. This is useful for refreshing a timer without allocating a new + * JavaScript object. + * + * Using this on a timer that has already called its callback will reactivate the + * timer. + * @since v10.2.0 + * @return a reference to `timeout` + */ + refresh(): this; + [Symbol.toPrimitive](): number; + } + } + function setTimeout(callback: (...args: TArgs) => void, ms?: number, ...args: TArgs): NodeJS.Timeout; + // util.promisify no rest args compability + // tslint:disable-next-line void-return + function setTimeout(callback: (args: void) => void, ms?: number): NodeJS.Timeout; + namespace setTimeout { + const __promisify__: typeof setTimeoutPromise; + } + function clearTimeout(timeoutId: NodeJS.Timeout): void; + function setInterval(callback: (...args: TArgs) => void, ms?: number, ...args: TArgs): NodeJS.Timer; + // util.promisify no rest args compability + // tslint:disable-next-line void-return + function setInterval(callback: (args: void) => void, ms?: number): NodeJS.Timer; + namespace setInterval { + const __promisify__: typeof setIntervalPromise; + } + function clearInterval(intervalId: NodeJS.Timeout): void; + function setImmediate(callback: (...args: TArgs) => void, ...args: TArgs): NodeJS.Immediate; + // util.promisify no rest args compability + // tslint:disable-next-line void-return + function setImmediate(callback: (args: void) => void): NodeJS.Immediate; + namespace setImmediate { + const __promisify__: typeof setImmediatePromise; + } + function clearImmediate(immediateId: NodeJS.Immediate): void; + function queueMicrotask(callback: () => void): void; + } +} +declare module 'node:timers' { + export * from 'timers'; +} diff --git a/frontend/node_modules/@types/node/timers/promises.d.ts b/frontend/node_modules/@types/node/timers/promises.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..fd778880ef386f4e275ab1e077093fc4c7412c55 --- /dev/null +++ b/frontend/node_modules/@types/node/timers/promises.d.ts @@ -0,0 +1,68 @@ +/** + * The `timers/promises` API provides an alternative set of timer functions + * that return `Promise` objects. The API is accessible via`require('timers/promises')`. + * + * ```js + * import { + * setTimeout, + * setImmediate, + * setInterval, + * } from 'timers/promises'; + * ``` + * @since v15.0.0 + */ +declare module 'timers/promises' { + import { TimerOptions } from 'node:timers'; + /** + * ```js + * import { + * setTimeout, + * } from 'timers/promises'; + * + * const res = await setTimeout(100, 'result'); + * + * console.log(res); // Prints 'result' + * ``` + * @since v15.0.0 + * @param [delay=1] The number of milliseconds to wait before fulfilling the promise. + * @param value A value with which the promise is fulfilled. + */ + function setTimeout(delay?: number, value?: T, options?: TimerOptions): Promise; + /** + * ```js + * import { + * setImmediate, + * } from 'timers/promises'; + * + * const res = await setImmediate('result'); + * + * console.log(res); // Prints 'result' + * ``` + * @since v15.0.0 + * @param value A value with which the promise is fulfilled. + */ + function setImmediate(value?: T, options?: TimerOptions): Promise; + /** + * Returns an async iterator that generates values in an interval of `delay` ms. + * + * ```js + * import { + * setInterval, + * } from 'timers/promises'; + * + * const interval = 100; + * for await (const startTime of setInterval(interval, Date.now())) { + * const now = Date.now(); + * console.log(now); + * if ((now - startTime) > 1000) + * break; + * } + * console.log(Date.now()); + * ``` + * @since v15.9.0 + */ + function setInterval(delay?: number, value?: T, options?: TimerOptions): AsyncIterable; +} +declare module 'node:timers/promises' { + export * from 'timers/promises'; +} diff --git a/frontend/node_modules/@types/node/tls.d.ts b/frontend/node_modules/@types/node/tls.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b1f4c87071ee1bbbbd87ea047a6bc4853dbac53a --- /dev/null +++ b/frontend/node_modules/@types/node/tls.d.ts @@ -0,0 +1,1019 @@ +/** + * The `tls` module provides an implementation of the Transport Layer Security + * (TLS) and Secure Socket Layer (SSL) protocols that is built on top of OpenSSL. + * The module can be accessed using: + * + * ```js + * const tls = require('tls'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/tls.js) + */ +declare module 'tls' { + import { X509Certificate } from 'node:crypto'; + import * as net from 'node:net'; + const CLIENT_RENEG_LIMIT: number; + const CLIENT_RENEG_WINDOW: number; + interface Certificate { + /** + * Country code. + */ + C: string; + /** + * Street. + */ + ST: string; + /** + * Locality. + */ + L: string; + /** + * Organization. + */ + O: string; + /** + * Organizational unit. + */ + OU: string; + /** + * Common name. + */ + CN: string; + } + interface PeerCertificate { + subject: Certificate; + issuer: Certificate; + subjectaltname: string; + infoAccess: NodeJS.Dict; + modulus: string; + exponent: string; + valid_from: string; + valid_to: string; + fingerprint: string; + fingerprint256: string; + ext_key_usage: string[]; + serialNumber: string; + raw: Buffer; + } + interface DetailedPeerCertificate extends PeerCertificate { + issuerCertificate: DetailedPeerCertificate; + } + interface CipherNameAndProtocol { + /** + * The cipher name. + */ + name: string; + /** + * SSL/TLS protocol version. + */ + version: string; + /** + * IETF name for the cipher suite. + */ + standardName: string; + } + interface EphemeralKeyInfo { + /** + * The supported types are 'DH' and 'ECDH'. + */ + type: string; + /** + * The name property is available only when type is 'ECDH'. + */ + name?: string | undefined; + /** + * The size of parameter of an ephemeral key exchange. + */ + size: number; + } + interface KeyObject { + /** + * Private keys in PEM format. + */ + pem: string | Buffer; + /** + * Optional passphrase. + */ + passphrase?: string | undefined; + } + interface PxfObject { + /** + * PFX or PKCS12 encoded private key and certificate chain. + */ + buf: string | Buffer; + /** + * Optional passphrase. + */ + passphrase?: string | undefined; + } + interface TLSSocketOptions extends SecureContextOptions, CommonConnectionOptions { + /** + * If true the TLS socket will be instantiated in server-mode. + * Defaults to false. + */ + isServer?: boolean | undefined; + /** + * An optional net.Server instance. + */ + server?: net.Server | undefined; + /** + * An optional Buffer instance containing a TLS session. + */ + session?: Buffer | undefined; + /** + * If true, specifies that the OCSP status request extension will be + * added to the client hello and an 'OCSPResponse' event will be + * emitted on the socket before establishing a secure communication + */ + requestOCSP?: boolean | undefined; + } + /** + * Performs transparent encryption of written data and all required TLS + * negotiation. + * + * Instances of `tls.TLSSocket` implement the duplex `Stream` interface. + * + * Methods that return TLS connection metadata (e.g.{@link TLSSocket.getPeerCertificate} will only return data while the + * connection is open. + * @since v0.11.4 + */ + class TLSSocket extends net.Socket { + /** + * Construct a new tls.TLSSocket object from an existing TCP socket. + */ + constructor(socket: net.Socket, options?: TLSSocketOptions); + /** + * Returns `true` if the peer certificate was signed by one of the CAs specified + * when creating the `tls.TLSSocket` instance, otherwise `false`. + * @since v0.11.4 + */ + authorized: boolean; + /** + * Returns the reason why the peer's certificate was not been verified. This + * property is set only when `tlsSocket.authorized === false`. + * @since v0.11.4 + */ + authorizationError: Error; + /** + * Always returns `true`. This may be used to distinguish TLS sockets from regular`net.Socket` instances. + * @since v0.11.4 + */ + encrypted: boolean; + /** + * String containing the selected ALPN protocol. + * Before a handshake has completed, this value is always null. + * When a handshake is completed but not ALPN protocol was selected, tlsSocket.alpnProtocol equals false. + */ + alpnProtocol: string | false | null; + /** + * Returns an object representing the local certificate. The returned object has + * some properties corresponding to the fields of the certificate. + * + * See {@link TLSSocket.getPeerCertificate} for an example of the certificate + * structure. + * + * If there is no local certificate, an empty object will be returned. If the + * socket has been destroyed, `null` will be returned. + * @since v11.2.0 + */ + getCertificate(): PeerCertificate | object | null; + /** + * Returns an object containing information on the negotiated cipher suite. + * + * For example: + * + * ```json + * { + * "name": "AES128-SHA256", + * "standardName": "TLS_RSA_WITH_AES_128_CBC_SHA256", + * "version": "TLSv1.2" + * } + * ``` + * + * See [SSL\_CIPHER\_get\_name](https://www.openssl.org/docs/man1.1.1/man3/SSL_CIPHER_get_name.html) for more information. + * @since v0.11.4 + */ + getCipher(): CipherNameAndProtocol; + /** + * Returns an object representing the type, name, and size of parameter of + * an ephemeral key exchange in `perfect forward secrecy` on a client + * connection. It returns an empty object when the key exchange is not + * ephemeral. As this is only supported on a client socket; `null` is returned + * if called on a server socket. The supported types are `'DH'` and `'ECDH'`. The`name` property is available only when type is `'ECDH'`. + * + * For example: `{ type: 'ECDH', name: 'prime256v1', size: 256 }`. + * @since v5.0.0 + */ + getEphemeralKeyInfo(): EphemeralKeyInfo | object | null; + /** + * As the `Finished` messages are message digests of the complete handshake + * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can + * be used for external authentication procedures when the authentication + * provided by SSL/TLS is not desired or is not enough. + * + * Corresponds to the `SSL_get_finished` routine in OpenSSL and may be used + * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929). + * @since v9.9.0 + * @return The latest `Finished` message that has been sent to the socket as part of a SSL/TLS handshake, or `undefined` if no `Finished` message has been sent yet. + */ + getFinished(): Buffer | undefined; + /** + * Returns an object representing the peer's certificate. If the peer does not + * provide a certificate, an empty object will be returned. If the socket has been + * destroyed, `null` will be returned. + * + * If the full certificate chain was requested, each certificate will include an`issuerCertificate` property containing an object representing its issuer's + * certificate. + * @since v0.11.4 + * @param detailed Include the full certificate chain if `true`, otherwise include just the peer's certificate. + * @return A certificate object. + */ + getPeerCertificate(detailed: true): DetailedPeerCertificate; + getPeerCertificate(detailed?: false): PeerCertificate; + getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate; + /** + * As the `Finished` messages are message digests of the complete handshake + * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can + * be used for external authentication procedures when the authentication + * provided by SSL/TLS is not desired or is not enough. + * + * Corresponds to the `SSL_get_peer_finished` routine in OpenSSL and may be used + * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929). + * @since v9.9.0 + * @return The latest `Finished` message that is expected or has actually been received from the socket as part of a SSL/TLS handshake, or `undefined` if there is no `Finished` message so + * far. + */ + getPeerFinished(): Buffer | undefined; + /** + * Returns a string containing the negotiated SSL/TLS protocol version of the + * current connection. The value `'unknown'` will be returned for connected + * sockets that have not completed the handshaking process. The value `null` will + * be returned for server sockets or disconnected client sockets. + * + * Protocol versions are: + * + * * `'SSLv3'` + * * `'TLSv1'` + * * `'TLSv1.1'` + * * `'TLSv1.2'` + * * `'TLSv1.3'` + * + * See the OpenSSL [`SSL_get_version`](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html) documentation for more information. + * @since v5.7.0 + */ + getProtocol(): string | null; + /** + * Returns the TLS session data or `undefined` if no session was + * negotiated. On the client, the data can be provided to the `session` option of {@link connect} to resume the connection. On the server, it may be useful + * for debugging. + * + * See `Session Resumption` for more information. + * + * Note: `getSession()` works only for TLSv1.2 and below. For TLSv1.3, applications + * must use the `'session'` event (it also works for TLSv1.2 and below). + * @since v0.11.4 + */ + getSession(): Buffer | undefined; + /** + * See [SSL\_get\_shared\_sigalgs](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_shared_sigalgs.html) for more information. + * @since v12.11.0 + * @return List of signature algorithms shared between the server and the client in the order of decreasing preference. + */ + getSharedSigalgs(): string[]; + /** + * For a client, returns the TLS session ticket if one is available, or`undefined`. For a server, always returns `undefined`. + * + * It may be useful for debugging. + * + * See `Session Resumption` for more information. + * @since v0.11.4 + */ + getTLSTicket(): Buffer | undefined; + /** + * See `Session Resumption` for more information. + * @since v0.5.6 + * @return `true` if the session was reused, `false` otherwise. + */ + isSessionReused(): boolean; + /** + * The `tlsSocket.renegotiate()` method initiates a TLS renegotiation process. + * Upon completion, the `callback` function will be passed a single argument + * that is either an `Error` (if the request failed) or `null`. + * + * This method can be used to request a peer's certificate after the secure + * connection has been established. + * + * When running as the server, the socket will be destroyed with an error after`handshakeTimeout` timeout. + * + * For TLSv1.3, renegotiation cannot be initiated, it is not supported by the + * protocol. + * @since v0.11.8 + * @param callback If `renegotiate()` returned `true`, callback is attached once to the `'secure'` event. If `renegotiate()` returned `false`, `callback` will be called in the next tick with + * an error, unless the `tlsSocket` has been destroyed, in which case `callback` will not be called at all. + * @return `true` if renegotiation was initiated, `false` otherwise. + */ + renegotiate( + options: { + rejectUnauthorized?: boolean | undefined; + requestCert?: boolean | undefined; + }, + callback: (err: Error | null) => void + ): undefined | boolean; + /** + * The `tlsSocket.setMaxSendFragment()` method sets the maximum TLS fragment size. + * Returns `true` if setting the limit succeeded; `false` otherwise. + * + * Smaller fragment sizes decrease the buffering latency on the client: larger + * fragments are buffered by the TLS layer until the entire fragment is received + * and its integrity is verified; large fragments can span multiple roundtrips + * and their processing can be delayed due to packet loss or reordering. However, + * smaller fragments add extra TLS framing bytes and CPU overhead, which may + * decrease overall server throughput. + * @since v0.11.11 + * @param [size=16384] The maximum TLS fragment size. The maximum value is `16384`. + */ + setMaxSendFragment(size: number): boolean; + /** + * Disables TLS renegotiation for this `TLSSocket` instance. Once called, attempts + * to renegotiate will trigger an `'error'` event on the `TLSSocket`. + * @since v8.4.0 + */ + disableRenegotiation(): void; + /** + * When enabled, TLS packet trace information is written to `stderr`. This can be + * used to debug TLS connection problems. + * + * Note: The format of the output is identical to the output of `openssl s_client -trace` or `openssl s_server -trace`. While it is produced by OpenSSL's`SSL_trace()` function, the format is + * undocumented, can change without notice, + * and should not be relied on. + * @since v12.2.0 + */ + enableTrace(): void; + /** + * Returns the peer certificate as an `X509Certificate` object. + * + * If there is no peer certificate, or the socket has been destroyed,`undefined` will be returned. + * @since v15.9.0 + */ + getPeerX509Certificate(): X509Certificate | undefined; + /** + * Returns the local certificate as an `X509Certificate` object. + * + * If there is no local certificate, or the socket has been destroyed,`undefined` will be returned. + * @since v15.9.0 + */ + getX509Certificate(): X509Certificate | undefined; + /** + * Keying material is used for validations to prevent different kind of attacks in + * network protocols, for example in the specifications of IEEE 802.1X. + * + * Example + * + * ```js + * const keyingMaterial = tlsSocket.exportKeyingMaterial( + * 128, + * 'client finished'); + * + * + * Example return value of keyingMaterial: + * + * + * ``` + * + * See the OpenSSL [`SSL_export_keying_material`](https://www.openssl.org/docs/man1.1.1/man3/SSL_export_keying_material.html) documentation for more + * information. + * @since v13.10.0, v12.17.0 + * @param length number of bytes to retrieve from keying material + * @param label an application specific label, typically this will be a value from the [IANA Exporter Label + * Registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#exporter-labels). + * @param context Optionally provide a context. + * @return requested bytes of the keying material + */ + exportKeyingMaterial(length: number, label: string, context: Buffer): Buffer; + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'OCSPResponse', listener: (response: Buffer) => void): this; + addListener(event: 'secureConnect', listener: () => void): this; + addListener(event: 'session', listener: (session: Buffer) => void): this; + addListener(event: 'keylog', listener: (line: Buffer) => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: 'OCSPResponse', response: Buffer): boolean; + emit(event: 'secureConnect'): boolean; + emit(event: 'session', session: Buffer): boolean; + emit(event: 'keylog', line: Buffer): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'OCSPResponse', listener: (response: Buffer) => void): this; + on(event: 'secureConnect', listener: () => void): this; + on(event: 'session', listener: (session: Buffer) => void): this; + on(event: 'keylog', listener: (line: Buffer) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'OCSPResponse', listener: (response: Buffer) => void): this; + once(event: 'secureConnect', listener: () => void): this; + once(event: 'session', listener: (session: Buffer) => void): this; + once(event: 'keylog', listener: (line: Buffer) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'OCSPResponse', listener: (response: Buffer) => void): this; + prependListener(event: 'secureConnect', listener: () => void): this; + prependListener(event: 'session', listener: (session: Buffer) => void): this; + prependListener(event: 'keylog', listener: (line: Buffer) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'OCSPResponse', listener: (response: Buffer) => void): this; + prependOnceListener(event: 'secureConnect', listener: () => void): this; + prependOnceListener(event: 'session', listener: (session: Buffer) => void): this; + prependOnceListener(event: 'keylog', listener: (line: Buffer) => void): this; + } + interface CommonConnectionOptions { + /** + * An optional TLS context object from tls.createSecureContext() + */ + secureContext?: SecureContext | undefined; + /** + * When enabled, TLS packet trace information is written to `stderr`. This can be + * used to debug TLS connection problems. + * @default false + */ + enableTrace?: boolean | undefined; + /** + * If true the server will request a certificate from clients that + * connect and attempt to verify that certificate. Defaults to + * false. + */ + requestCert?: boolean | undefined; + /** + * An array of strings or a Buffer naming possible ALPN protocols. + * (Protocols should be ordered by their priority.) + */ + ALPNProtocols?: string[] | Uint8Array[] | Uint8Array | undefined; + /** + * SNICallback(servername, cb) A function that will be + * called if the client supports SNI TLS extension. Two arguments + * will be passed when called: servername and cb. SNICallback should + * invoke cb(null, ctx), where ctx is a SecureContext instance. + * (tls.createSecureContext(...) can be used to get a proper + * SecureContext.) If SNICallback wasn't provided the default callback + * with high-level API will be used (see below). + */ + SNICallback?: ((servername: string, cb: (err: Error | null, ctx?: SecureContext) => void) => void) | undefined; + /** + * If true the server will reject any connection which is not + * authorized with the list of supplied CAs. This option only has an + * effect if requestCert is true. + * @default true + */ + rejectUnauthorized?: boolean | undefined; + } + interface TlsOptions extends SecureContextOptions, CommonConnectionOptions, net.ServerOpts { + /** + * Abort the connection if the SSL/TLS handshake does not finish in the + * specified number of milliseconds. A 'tlsClientError' is emitted on + * the tls.Server object whenever a handshake times out. Default: + * 120000 (120 seconds). + */ + handshakeTimeout?: number | undefined; + /** + * The number of seconds after which a TLS session created by the + * server will no longer be resumable. See Session Resumption for more + * information. Default: 300. + */ + sessionTimeout?: number | undefined; + /** + * 48-bytes of cryptographically strong pseudo-random data. + */ + ticketKeys?: Buffer | undefined; + /** + * + * @param socket + * @param identity identity parameter sent from the client. + * @return pre-shared key that must either be + * a buffer or `null` to stop the negotiation process. Returned PSK must be + * compatible with the selected cipher's digest. + * + * When negotiating TLS-PSK (pre-shared keys), this function is called + * with the identity provided by the client. + * If the return value is `null` the negotiation process will stop and an + * "unknown_psk_identity" alert message will be sent to the other party. + * If the server wishes to hide the fact that the PSK identity was not known, + * the callback must provide some random data as `psk` to make the connection + * fail with "decrypt_error" before negotiation is finished. + * PSK ciphers are disabled by default, and using TLS-PSK thus + * requires explicitly specifying a cipher suite with the `ciphers` option. + * More information can be found in the RFC 4279. + */ + pskCallback?(socket: TLSSocket, identity: string): DataView | NodeJS.TypedArray | null; + /** + * hint to send to a client to help + * with selecting the identity during TLS-PSK negotiation. Will be ignored + * in TLS 1.3. Upon failing to set pskIdentityHint `tlsClientError` will be + * emitted with `ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED` code. + */ + pskIdentityHint?: string | undefined; + } + interface PSKCallbackNegotation { + psk: DataView | NodeJS.TypedArray; + identity: string; + } + interface ConnectionOptions extends SecureContextOptions, CommonConnectionOptions { + host?: string | undefined; + port?: number | undefined; + path?: string | undefined; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored. + socket?: net.Socket | undefined; // Establish secure connection on a given socket rather than creating a new socket + checkServerIdentity?: typeof checkServerIdentity | undefined; + servername?: string | undefined; // SNI TLS Extension + session?: Buffer | undefined; + minDHSize?: number | undefined; + lookup?: net.LookupFunction | undefined; + timeout?: number | undefined; + /** + * When negotiating TLS-PSK (pre-shared keys), this function is called + * with optional identity `hint` provided by the server or `null` + * in case of TLS 1.3 where `hint` was removed. + * It will be necessary to provide a custom `tls.checkServerIdentity()` + * for the connection as the default one will try to check hostname/IP + * of the server against the certificate but that's not applicable for PSK + * because there won't be a certificate present. + * More information can be found in the RFC 4279. + * + * @param hint message sent from the server to help client + * decide which identity to use during negotiation. + * Always `null` if TLS 1.3 is used. + * @returns Return `null` to stop the negotiation process. `psk` must be + * compatible with the selected cipher's digest. + * `identity` must use UTF-8 encoding. + */ + pskCallback?(hint: string | null): PSKCallbackNegotation | null; + } + /** + * Accepts encrypted connections using TLS or SSL. + * @since v0.3.2 + */ + class Server extends net.Server { + constructor(secureConnectionListener?: (socket: TLSSocket) => void); + constructor(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void); + /** + * The `server.addContext()` method adds a secure context that will be used if + * the client request's SNI name matches the supplied `hostname` (or wildcard). + * + * When there are multiple matching contexts, the most recently added one is + * used. + * @since v0.5.3 + * @param hostname A SNI host name or wildcard (e.g. `'*'`) + * @param context An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc). + */ + addContext(hostname: string, context: SecureContextOptions): void; + /** + * Returns the session ticket keys. + * + * See `Session Resumption` for more information. + * @since v3.0.0 + * @return A 48-byte buffer containing the session ticket keys. + */ + getTicketKeys(): Buffer; + /** + * The `server.setSecureContext()` method replaces the secure context of an + * existing server. Existing connections to the server are not interrupted. + * @since v11.0.0 + * @param options An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc). + */ + setSecureContext(options: SecureContextOptions): void; + /** + * Sets the session ticket keys. + * + * Changes to the ticket keys are effective only for future server connections. + * Existing or currently pending server connections will use the previous keys. + * + * See `Session Resumption` for more information. + * @since v3.0.0 + * @param keys A 48-byte buffer containing the session ticket keys. + */ + setTicketKeys(keys: Buffer): void; + /** + * events.EventEmitter + * 1. tlsClientError + * 2. newSession + * 3. OCSPRequest + * 4. resumeSession + * 5. secureConnection + * 6. keylog + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this; + addListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; + addListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + addListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; + addListener(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this; + addListener(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: 'tlsClientError', err: Error, tlsSocket: TLSSocket): boolean; + emit(event: 'newSession', sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void): boolean; + emit(event: 'OCSPRequest', certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void): boolean; + emit(event: 'resumeSession', sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean; + emit(event: 'secureConnection', tlsSocket: TLSSocket): boolean; + emit(event: 'keylog', line: Buffer, tlsSocket: TLSSocket): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this; + on(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; + on(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + on(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; + on(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this; + on(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this; + once(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; + once(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + once(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; + once(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this; + once(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this; + prependListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; + prependListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + prependListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; + prependListener(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this; + prependListener(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: TLSSocket) => void): this; + prependOnceListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; + prependOnceListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + prependOnceListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; + prependOnceListener(event: 'secureConnection', listener: (tlsSocket: TLSSocket) => void): this; + prependOnceListener(event: 'keylog', listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + } + /** + * @deprecated since v0.11.3 Use `tls.TLSSocket` instead. + */ + interface SecurePair { + encrypted: TLSSocket; + cleartext: TLSSocket; + } + type SecureVersion = 'TLSv1.3' | 'TLSv1.2' | 'TLSv1.1' | 'TLSv1'; + interface SecureContextOptions { + /** + * Optionally override the trusted CA certificates. Default is to trust + * the well-known CAs curated by Mozilla. Mozilla's CAs are completely + * replaced when CAs are explicitly specified using this option. + */ + ca?: string | Buffer | Array | undefined; + /** + * Cert chains in PEM format. One cert chain should be provided per + * private key. Each cert chain should consist of the PEM formatted + * certificate for a provided private key, followed by the PEM + * formatted intermediate certificates (if any), in order, and not + * including the root CA (the root CA must be pre-known to the peer, + * see ca). When providing multiple cert chains, they do not have to + * be in the same order as their private keys in key. If the + * intermediate certificates are not provided, the peer will not be + * able to validate the certificate, and the handshake will fail. + */ + cert?: string | Buffer | Array | undefined; + /** + * Colon-separated list of supported signature algorithms. The list + * can contain digest algorithms (SHA256, MD5 etc.), public key + * algorithms (RSA-PSS, ECDSA etc.), combination of both (e.g + * 'RSA+SHA384') or TLS v1.3 scheme names (e.g. rsa_pss_pss_sha512). + */ + sigalgs?: string | undefined; + /** + * Cipher suite specification, replacing the default. For more + * information, see modifying the default cipher suite. Permitted + * ciphers can be obtained via tls.getCiphers(). Cipher names must be + * uppercased in order for OpenSSL to accept them. + */ + ciphers?: string | undefined; + /** + * Name of an OpenSSL engine which can provide the client certificate. + */ + clientCertEngine?: string | undefined; + /** + * PEM formatted CRLs (Certificate Revocation Lists). + */ + crl?: string | Buffer | Array | undefined; + /** + * Diffie Hellman parameters, required for Perfect Forward Secrecy. Use + * openssl dhparam to create the parameters. The key length must be + * greater than or equal to 1024 bits or else an error will be thrown. + * Although 1024 bits is permissible, use 2048 bits or larger for + * stronger security. If omitted or invalid, the parameters are + * silently discarded and DHE ciphers will not be available. + */ + dhparam?: string | Buffer | undefined; + /** + * A string describing a named curve or a colon separated list of curve + * NIDs or names, for example P-521:P-384:P-256, to use for ECDH key + * agreement. Set to auto to select the curve automatically. Use + * crypto.getCurves() to obtain a list of available curve names. On + * recent releases, openssl ecparam -list_curves will also display the + * name and description of each available elliptic curve. Default: + * tls.DEFAULT_ECDH_CURVE. + */ + ecdhCurve?: string | undefined; + /** + * Attempt to use the server's cipher suite preferences instead of the + * client's. When true, causes SSL_OP_CIPHER_SERVER_PREFERENCE to be + * set in secureOptions + */ + honorCipherOrder?: boolean | undefined; + /** + * Private keys in PEM format. PEM allows the option of private keys + * being encrypted. Encrypted keys will be decrypted with + * options.passphrase. Multiple keys using different algorithms can be + * provided either as an array of unencrypted key strings or buffers, + * or an array of objects in the form {pem: [, + * passphrase: ]}. The object form can only occur in an array. + * object.passphrase is optional. Encrypted keys will be decrypted with + * object.passphrase if provided, or options.passphrase if it is not. + */ + key?: string | Buffer | Array | undefined; + /** + * Name of an OpenSSL engine to get private key from. Should be used + * together with privateKeyIdentifier. + */ + privateKeyEngine?: string | undefined; + /** + * Identifier of a private key managed by an OpenSSL engine. Should be + * used together with privateKeyEngine. Should not be set together with + * key, because both options define a private key in different ways. + */ + privateKeyIdentifier?: string | undefined; + /** + * Optionally set the maximum TLS version to allow. One + * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the + * `secureProtocol` option, use one or the other. + * **Default:** `'TLSv1.3'`, unless changed using CLI options. Using + * `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to + * `'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used. + */ + maxVersion?: SecureVersion | undefined; + /** + * Optionally set the minimum TLS version to allow. One + * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the + * `secureProtocol` option, use one or the other. It is not recommended to use + * less than TLSv1.2, but it may be required for interoperability. + * **Default:** `'TLSv1.2'`, unless changed using CLI options. Using + * `--tls-v1.0` sets the default to `'TLSv1'`. Using `--tls-v1.1` sets the default to + * `'TLSv1.1'`. Using `--tls-min-v1.3` sets the default to + * 'TLSv1.3'. If multiple of the options are provided, the lowest minimum is used. + */ + minVersion?: SecureVersion | undefined; + /** + * Shared passphrase used for a single private key and/or a PFX. + */ + passphrase?: string | undefined; + /** + * PFX or PKCS12 encoded private key and certificate chain. pfx is an + * alternative to providing key and cert individually. PFX is usually + * encrypted, if it is, passphrase will be used to decrypt it. Multiple + * PFX can be provided either as an array of unencrypted PFX buffers, + * or an array of objects in the form {buf: [, + * passphrase: ]}. The object form can only occur in an array. + * object.passphrase is optional. Encrypted PFX will be decrypted with + * object.passphrase if provided, or options.passphrase if it is not. + */ + pfx?: string | Buffer | Array | undefined; + /** + * Optionally affect the OpenSSL protocol behavior, which is not + * usually necessary. This should be used carefully if at all! Value is + * a numeric bitmask of the SSL_OP_* options from OpenSSL Options + */ + secureOptions?: number | undefined; // Value is a numeric bitmask of the `SSL_OP_*` options + /** + * Legacy mechanism to select the TLS protocol version to use, it does + * not support independent control of the minimum and maximum version, + * and does not support limiting the protocol to TLSv1.3. Use + * minVersion and maxVersion instead. The possible values are listed as + * SSL_METHODS, use the function names as strings. For example, use + * 'TLSv1_1_method' to force TLS version 1.1, or 'TLS_method' to allow + * any TLS protocol version up to TLSv1.3. It is not recommended to use + * TLS versions less than 1.2, but it may be required for + * interoperability. Default: none, see minVersion. + */ + secureProtocol?: string | undefined; + /** + * Opaque identifier used by servers to ensure session state is not + * shared between applications. Unused by clients. + */ + sessionIdContext?: string | undefined; + /** + * 48-bytes of cryptographically strong pseudo-random data. + * See Session Resumption for more information. + */ + ticketKeys?: Buffer | undefined; + /** + * The number of seconds after which a TLS session created by the + * server will no longer be resumable. See Session Resumption for more + * information. Default: 300. + */ + sessionTimeout?: number | undefined; + } + interface SecureContext { + context: any; + } + /** + * Verifies the certificate `cert` is issued to `hostname`. + * + * Returns [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object, populating it with `reason`, `host`, and `cert` on + * failure. On success, returns [undefined](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type). + * + * This function can be overwritten by providing alternative function as part of + * the `options.checkServerIdentity` option passed to `tls.connect()`. The + * overwriting function can call `tls.checkServerIdentity()` of course, to augment + * the checks done with additional verification. + * + * This function is only called if the certificate passed all other checks, such as + * being issued by trusted CA (`options.ca`). + * @since v0.8.4 + * @param hostname The host name or IP address to verify the certificate against. + * @param cert A `certificate object` representing the peer's certificate. + */ + function checkServerIdentity(hostname: string, cert: PeerCertificate): Error | undefined; + /** + * Creates a new {@link Server}. The `secureConnectionListener`, if provided, is + * automatically set as a listener for the `'secureConnection'` event. + * + * The `ticketKeys` options is automatically shared between `cluster` module + * workers. + * + * The following illustrates a simple echo server: + * + * ```js + * const tls = require('tls'); + * const fs = require('fs'); + * + * const options = { + * key: fs.readFileSync('server-key.pem'), + * cert: fs.readFileSync('server-cert.pem'), + * + * // This is necessary only if using client certificate authentication. + * requestCert: true, + * + * // This is necessary only if the client uses a self-signed certificate. + * ca: [ fs.readFileSync('client-cert.pem') ] + * }; + * + * const server = tls.createServer(options, (socket) => { + * console.log('server connected', + * socket.authorized ? 'authorized' : 'unauthorized'); + * socket.write('welcome!\n'); + * socket.setEncoding('utf8'); + * socket.pipe(socket); + * }); + * server.listen(8000, () => { + * console.log('server bound'); + * }); + * ``` + * + * The server can be tested by connecting to it using the example client from {@link connect}. + * @since v0.3.2 + */ + function createServer(secureConnectionListener?: (socket: TLSSocket) => void): Server; + function createServer(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void): Server; + /** + * The `callback` function, if specified, will be added as a listener for the `'secureConnect'` event. + * + * `tls.connect()` returns a {@link TLSSocket} object. + * + * Unlike the `https` API, `tls.connect()` does not enable the + * SNI (Server Name Indication) extension by default, which may cause some + * servers to return an incorrect certificate or reject the connection + * altogether. To enable SNI, set the `servername` option in addition + * to `host`. + * + * The following illustrates a client for the echo server example from {@link createServer}: + * + * ```js + * // Assumes an echo server that is listening on port 8000. + * const tls = require('tls'); + * const fs = require('fs'); + * + * const options = { + * // Necessary only if the server requires client certificate authentication. + * key: fs.readFileSync('client-key.pem'), + * cert: fs.readFileSync('client-cert.pem'), + * + * // Necessary only if the server uses a self-signed certificate. + * ca: [ fs.readFileSync('server-cert.pem') ], + * + * // Necessary only if the server's cert isn't for "localhost". + * checkServerIdentity: () => { return null; }, + * }; + * + * const socket = tls.connect(8000, options, () => { + * console.log('client connected', + * socket.authorized ? 'authorized' : 'unauthorized'); + * process.stdin.pipe(socket); + * process.stdin.resume(); + * }); + * socket.setEncoding('utf8'); + * socket.on('data', (data) => { + * console.log(data); + * }); + * socket.on('end', () => { + * console.log('server ends connection'); + * }); + * ``` + * @since v0.11.3 + */ + function connect(options: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; + function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; + function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; + /** + * Creates a new secure pair object with two streams, one of which reads and writes + * the encrypted data and the other of which reads and writes the cleartext data. + * Generally, the encrypted stream is piped to/from an incoming encrypted data + * stream and the cleartext one is used as a replacement for the initial encrypted + * stream. + * + * `tls.createSecurePair()` returns a `tls.SecurePair` object with `cleartext` and`encrypted` stream properties. + * + * Using `cleartext` has the same API as {@link TLSSocket}. + * + * The `tls.createSecurePair()` method is now deprecated in favor of`tls.TLSSocket()`. For example, the code: + * + * ```js + * pair = tls.createSecurePair(// ... ); + * pair.encrypted.pipe(socket); + * socket.pipe(pair.encrypted); + * ``` + * + * can be replaced by: + * + * ```js + * secureSocket = tls.TLSSocket(socket, options); + * ``` + * + * where `secureSocket` has the same API as `pair.cleartext`. + * @since v0.3.2 + * @deprecated Since v0.11.3 - Use {@link TLSSocket} instead. + * @param context A secure context object as returned by `tls.createSecureContext()` + * @param isServer `true` to specify that this TLS connection should be opened as a server. + * @param requestCert `true` to specify whether a server should request a certificate from a connecting client. Only applies when `isServer` is `true`. + * @param rejectUnauthorized If not `false` a server automatically reject clients with invalid certificates. Only applies when `isServer` is `true`. + */ + function createSecurePair(context?: SecureContext, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair; + /** + * {@link createServer} sets the default value of the `honorCipherOrder` option + * to `true`, other APIs that create secure contexts leave it unset. + * + * {@link createServer} uses a 128 bit truncated SHA1 hash value generated + * from `process.argv` as the default value of the `sessionIdContext` option, other + * APIs that create secure contexts have no default value. + * + * The `tls.createSecureContext()` method creates a `SecureContext` object. It is + * usable as an argument to several `tls` APIs, such as {@link createServer} and `server.addContext()`, but has no public methods. + * + * A key is _required_ for ciphers that use certificates. Either `key` or`pfx` can be used to provide it. + * + * If the `ca` option is not given, then Node.js will default to using [Mozilla's publicly trusted list of + * CAs](https://hg.mozilla.org/mozilla-central/raw-file/tip/security/nss/lib/ckfw/builtins/certdata.txt). + * @since v0.11.13 + */ + function createSecureContext(options?: SecureContextOptions): SecureContext; + /** + * Returns an array with the names of the supported TLS ciphers. The names are + * lower-case for historical reasons, but must be uppercased to be used in + * the `ciphers` option of {@link createSecureContext}. + * + * Cipher names that start with `'tls_'` are for TLSv1.3, all the others are for + * TLSv1.2 and below. + * + * ```js + * console.log(tls.getCiphers()); // ['aes128-gcm-sha256', 'aes128-sha', ...] + * ``` + * @since v0.10.2 + */ + function getCiphers(): string[]; + /** + * The default curve name to use for ECDH key agreement in a tls server. + * The default value is 'auto'. See tls.createSecureContext() for further + * information. + */ + let DEFAULT_ECDH_CURVE: string; + /** + * The default value of the maxVersion option of + * tls.createSecureContext(). It can be assigned any of the supported TLS + * protocol versions, 'TLSv1.3', 'TLSv1.2', 'TLSv1.1', or 'TLSv1'. Default: + * 'TLSv1.3', unless changed using CLI options. Using --tls-max-v1.2 sets + * the default to 'TLSv1.2'. Using --tls-max-v1.3 sets the default to + * 'TLSv1.3'. If multiple of the options are provided, the highest maximum + * is used. + */ + let DEFAULT_MAX_VERSION: SecureVersion; + /** + * The default value of the minVersion option of tls.createSecureContext(). + * It can be assigned any of the supported TLS protocol versions, + * 'TLSv1.3', 'TLSv1.2', 'TLSv1.1', or 'TLSv1'. Default: 'TLSv1.2', unless + * changed using CLI options. Using --tls-min-v1.0 sets the default to + * 'TLSv1'. Using --tls-min-v1.1 sets the default to 'TLSv1.1'. Using + * --tls-min-v1.3 sets the default to 'TLSv1.3'. If multiple of the options + * are provided, the lowest minimum is used. + */ + let DEFAULT_MIN_VERSION: SecureVersion; + /** + * An immutable array of strings representing the root certificates (in PEM + * format) used for verifying peer certificates. This is the default value + * of the ca option to tls.createSecureContext(). + */ + const rootCertificates: ReadonlyArray; +} +declare module 'node:tls' { + export * from 'tls'; +} diff --git a/frontend/node_modules/@types/node/trace_events.d.ts b/frontend/node_modules/@types/node/trace_events.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..2976eb6e59507826653cbf29a4673a98fad13027 --- /dev/null +++ b/frontend/node_modules/@types/node/trace_events.d.ts @@ -0,0 +1,161 @@ +/** + * The `trace_events` module provides a mechanism to centralize tracing information + * generated by V8, Node.js core, and userspace code. + * + * Tracing can be enabled with the `--trace-event-categories` command-line flag + * or by using the `trace_events` module. The `--trace-event-categories` flag + * accepts a list of comma-separated category names. + * + * The available categories are: + * + * * `node`: An empty placeholder. + * * `node.async_hooks`: Enables capture of detailed `async_hooks` trace data. + * The `async_hooks` events have a unique `asyncId` and a special `triggerId` `triggerAsyncId` property. + * * `node.bootstrap`: Enables capture of Node.js bootstrap milestones. + * * `node.console`: Enables capture of `console.time()` and `console.count()`output. + * * `node.dns.native`: Enables capture of trace data for DNS queries. + * * `node.environment`: Enables capture of Node.js Environment milestones. + * * `node.fs.sync`: Enables capture of trace data for file system sync methods. + * * `node.perf`: Enables capture of `Performance API` measurements. + * * `node.perf.usertiming`: Enables capture of only Performance API User Timing + * measures and marks. + * * `node.perf.timerify`: Enables capture of only Performance API timerify + * measurements. + * * `node.promises.rejections`: Enables capture of trace data tracking the number + * of unhandled Promise rejections and handled-after-rejections. + * * `node.vm.script`: Enables capture of trace data for the `vm` module's`runInNewContext()`, `runInContext()`, and `runInThisContext()` methods. + * * `v8`: The `V8` events are GC, compiling, and execution related. + * + * By default the `node`, `node.async_hooks`, and `v8` categories are enabled. + * + * ```bash + * node --trace-event-categories v8,node,node.async_hooks server.js + * ``` + * + * Prior versions of Node.js required the use of the `--trace-events-enabled`flag to enable trace events. This requirement has been removed. However, the`--trace-events-enabled` flag _may_ still be + * used and will enable the`node`, `node.async_hooks`, and `v8` trace event categories by default. + * + * ```bash + * node --trace-events-enabled + * + * # is equivalent to + * + * node --trace-event-categories v8,node,node.async_hooks + * ``` + * + * Alternatively, trace events may be enabled using the `trace_events` module: + * + * ```js + * const trace_events = require('trace_events'); + * const tracing = trace_events.createTracing({ categories: ['node.perf'] }); + * tracing.enable(); // Enable trace event capture for the 'node.perf' category + * + * // do work + * + * tracing.disable(); // Disable trace event capture for the 'node.perf' category + * ``` + * + * Running Node.js with tracing enabled will produce log files that can be opened + * in the [`chrome://tracing`](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) tab of Chrome. + * + * The logging file is by default called `node_trace.${rotation}.log`, where`${rotation}` is an incrementing log-rotation id. The filepath pattern can + * be specified with `--trace-event-file-pattern` that accepts a template + * string that supports `${rotation}` and `${pid}`: + * + * ```bash + * node --trace-event-categories v8 --trace-event-file-pattern '${pid}-${rotation}.log' server.js + * ``` + * + * The tracing system uses the same time source + * as the one used by `process.hrtime()`. + * However the trace-event timestamps are expressed in microseconds, + * unlike `process.hrtime()` which returns nanoseconds. + * + * The features from this module are not available in `Worker` threads. + * @experimental + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/trace_events.js) + */ +declare module 'trace_events' { + /** + * The `Tracing` object is used to enable or disable tracing for sets of + * categories. Instances are created using the + * `trace_events.createTracing()` method. + * + * When created, the `Tracing` object is disabled. Calling the + * `tracing.enable()` method adds the categories to the set of enabled trace + * event categories. Calling `tracing.disable()` will remove the categories + * from the set of enabled trace event categories. + */ + interface Tracing { + /** + * A comma-separated list of the trace event categories covered by this + * `Tracing` object. + */ + readonly categories: string; + /** + * Disables this `Tracing` object. + * + * Only trace event categories _not_ covered by other enabled `Tracing` + * objects and _not_ specified by the `--trace-event-categories` flag + * will be disabled. + */ + disable(): void; + /** + * Enables this `Tracing` object for the set of categories covered by + * the `Tracing` object. + */ + enable(): void; + /** + * `true` only if the `Tracing` object has been enabled. + */ + readonly enabled: boolean; + } + interface CreateTracingOptions { + /** + * An array of trace category names. Values included in the array are + * coerced to a string when possible. An error will be thrown if the + * value cannot be coerced. + */ + categories: string[]; + } + /** + * Creates and returns a `Tracing` object for the given set of `categories`. + * + * ```js + * const trace_events = require('trace_events'); + * const categories = ['node.perf', 'node.async_hooks']; + * const tracing = trace_events.createTracing({ categories }); + * tracing.enable(); + * // do stuff + * tracing.disable(); + * ``` + * @since v10.0.0 + * @return . + */ + function createTracing(options: CreateTracingOptions): Tracing; + /** + * Returns a comma-separated list of all currently-enabled trace event + * categories. The current set of enabled trace event categories is determined + * by the _union_ of all currently-enabled `Tracing` objects and any categories + * enabled using the `--trace-event-categories` flag. + * + * Given the file `test.js` below, the command`node --trace-event-categories node.perf test.js` will print`'node.async_hooks,node.perf'` to the console. + * + * ```js + * const trace_events = require('trace_events'); + * const t1 = trace_events.createTracing({ categories: ['node.async_hooks'] }); + * const t2 = trace_events.createTracing({ categories: ['node.perf'] }); + * const t3 = trace_events.createTracing({ categories: ['v8'] }); + * + * t1.enable(); + * t2.enable(); + * + * console.log(trace_events.getEnabledCategories()); + * ``` + * @since v10.0.0 + */ + function getEnabledCategories(): string | undefined; +} +declare module 'node:trace_events' { + export * from 'trace_events'; +} diff --git a/frontend/node_modules/@types/node/tty.d.ts b/frontend/node_modules/@types/node/tty.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3bce2d366575f4197d3a36dad40f1faa6dd0e75f --- /dev/null +++ b/frontend/node_modules/@types/node/tty.d.ts @@ -0,0 +1,204 @@ +/** + * The `tty` module provides the `tty.ReadStream` and `tty.WriteStream` classes. + * In most cases, it will not be necessary or possible to use this module directly. + * However, it can be accessed using: + * + * ```js + * const tty = require('tty'); + * ``` + * + * When Node.js detects that it is being run with a text terminal ("TTY") + * attached, `process.stdin` will, by default, be initialized as an instance of`tty.ReadStream` and both `process.stdout` and `process.stderr` will, by + * default, be instances of `tty.WriteStream`. The preferred method of determining + * whether Node.js is being run within a TTY context is to check that the value of + * the `process.stdout.isTTY` property is `true`: + * + * ```console + * $ node -p -e "Boolean(process.stdout.isTTY)" + * true + * $ node -p -e "Boolean(process.stdout.isTTY)" | cat + * false + * ``` + * + * In most cases, there should be little to no reason for an application to + * manually create instances of the `tty.ReadStream` and `tty.WriteStream`classes. + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/tty.js) + */ +declare module 'tty' { + import * as net from 'node:net'; + /** + * The `tty.isatty()` method returns `true` if the given `fd` is associated with + * a TTY and `false` if it is not, including whenever `fd` is not a non-negative + * integer. + * @since v0.5.8 + * @param fd A numeric file descriptor + */ + function isatty(fd: number): boolean; + /** + * Represents the readable side of a TTY. In normal circumstances `process.stdin` will be the only `tty.ReadStream` instance in a Node.js + * process and there should be no reason to create additional instances. + * @since v0.5.8 + */ + class ReadStream extends net.Socket { + constructor(fd: number, options?: net.SocketConstructorOpts); + /** + * A `boolean` that is `true` if the TTY is currently configured to operate as a + * raw device. Defaults to `false`. + * @since v0.7.7 + */ + isRaw: boolean; + /** + * Allows configuration of `tty.ReadStream` so that it operates as a raw device. + * + * When in raw mode, input is always available character-by-character, not + * including modifiers. Additionally, all special processing of characters by the + * terminal is disabled, including echoing input characters.Ctrl+C will no longer cause a `SIGINT` when in this mode. + * @since v0.7.7 + * @param mode If `true`, configures the `tty.ReadStream` to operate as a raw device. If `false`, configures the `tty.ReadStream` to operate in its default mode. The `readStream.isRaw` + * property will be set to the resulting mode. + * @return The read stream instance. + */ + setRawMode(mode: boolean): this; + /** + * A `boolean` that is always `true` for `tty.ReadStream` instances. + * @since v0.5.8 + */ + isTTY: boolean; + } + /** + * -1 - to the left from cursor + * 0 - the entire line + * 1 - to the right from cursor + */ + type Direction = -1 | 0 | 1; + /** + * Represents the writable side of a TTY. In normal circumstances,`process.stdout` and `process.stderr` will be the only`tty.WriteStream` instances created for a Node.js process and there + * should be no reason to create additional instances. + * @since v0.5.8 + */ + class WriteStream extends net.Socket { + constructor(fd: number); + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: 'resize', listener: () => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: 'resize'): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'resize', listener: () => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'resize', listener: () => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: 'resize', listener: () => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: 'resize', listener: () => void): this; + /** + * `writeStream.clearLine()` clears the current line of this `WriteStream` in a + * direction identified by `dir`. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + clearLine(dir: Direction, callback?: () => void): boolean; + /** + * `writeStream.clearScreenDown()` clears this `WriteStream` from the current + * cursor down. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + clearScreenDown(callback?: () => void): boolean; + /** + * `writeStream.cursorTo()` moves this `WriteStream`'s cursor to the specified + * position. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + cursorTo(x: number, y?: number, callback?: () => void): boolean; + cursorTo(x: number, callback: () => void): boolean; + /** + * `writeStream.moveCursor()` moves this `WriteStream`'s cursor _relative_ to its + * current position. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + moveCursor(dx: number, dy: number, callback?: () => void): boolean; + /** + * Returns: + * + * * `1` for 2, + * * `4` for 16, + * * `8` for 256, + * * `24` for 16,777,216 colors supported. + * + * Use this to determine what colors the terminal supports. Due to the nature of + * colors in terminals it is possible to either have false positives or false + * negatives. It depends on process information and the environment variables that + * may lie about what terminal is used. + * It is possible to pass in an `env` object to simulate the usage of a specific + * terminal. This can be useful to check how specific environment settings behave. + * + * To enforce a specific color support, use one of the below environment settings. + * + * * 2 colors: `FORCE_COLOR = 0` (Disables colors) + * * 16 colors: `FORCE_COLOR = 1` + * * 256 colors: `FORCE_COLOR = 2` + * * 16,777,216 colors: `FORCE_COLOR = 3` + * + * Disabling color support is also possible by using the `NO_COLOR` and`NODE_DISABLE_COLORS` environment variables. + * @since v9.9.0 + * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal. + */ + getColorDepth(env?: object): number; + /** + * Returns `true` if the `writeStream` supports at least as many colors as provided + * in `count`. Minimum support is 2 (black and white). + * + * This has the same false positives and negatives as described in `writeStream.getColorDepth()`. + * + * ```js + * process.stdout.hasColors(); + * // Returns true or false depending on if `stdout` supports at least 16 colors. + * process.stdout.hasColors(256); + * // Returns true or false depending on if `stdout` supports at least 256 colors. + * process.stdout.hasColors({ TMUX: '1' }); + * // Returns true. + * process.stdout.hasColors(2 ** 24, { TMUX: '1' }); + * // Returns false (the environment setting pretends to support 2 ** 8 colors). + * ``` + * @since v11.13.0, v10.16.0 + * @param [count=16] The number of colors that are requested (minimum 2). + * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal. + */ + hasColors(count?: number): boolean; + hasColors(env?: object): boolean; + hasColors(count: number, env?: object): boolean; + /** + * `writeStream.getWindowSize()` returns the size of the TTY + * corresponding to this `WriteStream`. The array is of the type`[numColumns, numRows]` where `numColumns` and `numRows` represent the number + * of columns and rows in the corresponding TTY. + * @since v0.7.7 + */ + getWindowSize(): [number, number]; + /** + * A `number` specifying the number of columns the TTY currently has. This property + * is updated whenever the `'resize'` event is emitted. + * @since v0.7.7 + */ + columns: number; + /** + * A `number` specifying the number of rows the TTY currently has. This property + * is updated whenever the `'resize'` event is emitted. + * @since v0.7.7 + */ + rows: number; + /** + * A `boolean` that is always `true`. + * @since v0.5.8 + */ + isTTY: boolean; + } +} +declare module 'node:tty' { + export * from 'tty'; +} diff --git a/frontend/node_modules/@types/node/url.d.ts b/frontend/node_modules/@types/node/url.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..602fca03b8c571fbd9a58037758256e5b71ee361 --- /dev/null +++ b/frontend/node_modules/@types/node/url.d.ts @@ -0,0 +1,821 @@ +/** + * The `url` module provides utilities for URL resolution and parsing. It can be + * accessed using: + * + * ```js + * import url from 'url'; + * ``` + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/url.js) + */ +declare module 'url' { + import { Blob } from 'node:buffer'; + import { ClientRequestArgs } from 'node:http'; + import { ParsedUrlQuery, ParsedUrlQueryInput } from 'node:querystring'; + // Input to `url.format` + interface UrlObject { + auth?: string | null | undefined; + hash?: string | null | undefined; + host?: string | null | undefined; + hostname?: string | null | undefined; + href?: string | null | undefined; + pathname?: string | null | undefined; + protocol?: string | null | undefined; + search?: string | null | undefined; + slashes?: boolean | null | undefined; + port?: string | number | null | undefined; + query?: string | null | ParsedUrlQueryInput | undefined; + } + // Output of `url.parse` + interface Url { + auth: string | null; + hash: string | null; + host: string | null; + hostname: string | null; + href: string; + path: string | null; + pathname: string | null; + protocol: string | null; + search: string | null; + slashes: boolean | null; + port: string | null; + query: string | null | ParsedUrlQuery; + } + interface UrlWithParsedQuery extends Url { + query: ParsedUrlQuery; + } + interface UrlWithStringQuery extends Url { + query: string | null; + } + /** + * The `url.parse()` method takes a URL string, parses it, and returns a URL + * object. + * + * A `TypeError` is thrown if `urlString` is not a string. + * + * A `URIError` is thrown if the `auth` property is present but cannot be decoded. + * + * Use of the legacy `url.parse()` method is discouraged. Users should + * use the WHATWG `URL` API. Because the `url.parse()` method uses a + * lenient, non-standard algorithm for parsing URL strings, security + * issues can be introduced. Specifically, issues with [host name spoofing](https://hackerone.com/reports/678487) and + * incorrect handling of usernames and passwords have been identified. + * @since v0.1.25 + * @deprecated Legacy: Use the WHATWG URL API instead. + * @param urlString The URL string to parse. + * @param [parseQueryString=false] If `true`, the `query` property will always be set to an object returned by the {@link querystring} module's `parse()` method. If `false`, the `query` property + * on the returned URL object will be an unparsed, undecoded string. + * @param [slashesDenoteHost=false] If `true`, the first token after the literal string `//` and preceding the next `/` will be interpreted as the `host`. For instance, given `//foo/bar`, the + * result would be `{host: 'foo', pathname: '/bar'}` rather than `{pathname: '//foo/bar'}`. + */ + function parse(urlString: string): UrlWithStringQuery; + function parse(urlString: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery; + function parse(urlString: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery; + function parse(urlString: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url; + /** + * The URL object has both a `toString()` method and `href` property that return string serializations of the URL. + * These are not, however, customizable in any way. The `url.format(URL[, options])` method allows for basic + * customization of the output. + * Returns a customizable serialization of a URL `String` representation of a `WHATWG URL` object. + * + * ```js + * import url from 'url'; + * const myURL = new URL('https://a:b@測試?abc#foo'); + * + * console.log(myURL.href); + * // Prints https://a:b@xn--g6w251d/?abc#foo + * + * console.log(myURL.toString()); + * // Prints https://a:b@xn--g6w251d/?abc#foo + * + * console.log(url.format(myURL, { fragment: false, unicode: true, auth: false })); + * // Prints 'https://測試/?abc' + * ``` + * @since v7.6.0 + * @param urlObject A `WHATWG URL` object + * @param options + */ + function format(urlObject: URL, options?: URLFormatOptions): string; + /** + * The `url.format()` method returns a formatted URL string derived from`urlObject`. + * + * ```js + * const url = require('url'); + * url.format({ + * protocol: 'https', + * hostname: 'example.com', + * pathname: '/some/path', + * query: { + * page: 1, + * format: 'json' + * } + * }); + * + * // => 'https://example.com/some/path?page=1&format=json' + * ``` + * + * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`. + * + * The formatting process operates as follows: + * + * * A new empty string `result` is created. + * * If `urlObject.protocol` is a string, it is appended as-is to `result`. + * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown. + * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII + * colon (`:`) character, the literal string `:` will be appended to `result`. + * * If either of the following conditions is true, then the literal string `//`will be appended to `result`: + * * `urlObject.slashes` property is true; + * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or`file`; + * * If the value of the `urlObject.auth` property is truthy, and either`urlObject.host` or `urlObject.hostname` are not `undefined`, the value of`urlObject.auth` will be coerced into a string + * and appended to `result`followed by the literal string `@`. + * * If the `urlObject.host` property is `undefined` then: + * * If the `urlObject.hostname` is a string, it is appended to `result`. + * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string, + * an `Error` is thrown. + * * If the `urlObject.port` property value is truthy, and `urlObject.hostname`is not `undefined`: + * * The literal string `:` is appended to `result`, and + * * The value of `urlObject.port` is coerced to a string and appended to`result`. + * * Otherwise, if the `urlObject.host` property value is truthy, the value of`urlObject.host` is coerced to a string and appended to `result`. + * * If the `urlObject.pathname` property is a string that is not an empty string: + * * If the `urlObject.pathname`_does not start_ with an ASCII forward slash + * (`/`), then the literal string `'/'` is appended to `result`. + * * The value of `urlObject.pathname` is appended to `result`. + * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown. + * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result`followed by the output of calling the + * `querystring` module's `stringify()`method passing the value of `urlObject.query`. + * * Otherwise, if `urlObject.search` is a string: + * * If the value of `urlObject.search`_does not start_ with the ASCII question + * mark (`?`) character, the literal string `?` is appended to `result`. + * * The value of `urlObject.search` is appended to `result`. + * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown. + * * If the `urlObject.hash` property is a string: + * * If the value of `urlObject.hash`_does not start_ with the ASCII hash (`#`) + * character, the literal string `#` is appended to `result`. + * * The value of `urlObject.hash` is appended to `result`. + * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a + * string, an `Error` is thrown. + * * `result` is returned. + * @since v0.1.25 + * @deprecated Legacy: Use the WHATWG URL API instead. + * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`. + */ + function format(urlObject: UrlObject | string): string; + /** + * The `url.resolve()` method resolves a target URL relative to a base URL in a + * manner similar to that of a Web browser resolving an anchor tag HREF. + * + * ```js + * const url = require('url'); + * url.resolve('/one/two/three', 'four'); // '/one/two/four' + * url.resolve('http://example.com/', '/one'); // 'http://example.com/one' + * url.resolve('http://example.com/one', '/two'); // 'http://example.com/two' + * ``` + * + * You can achieve the same result using the WHATWG URL API: + * + * ```js + * function resolve(from, to) { + * const resolvedUrl = new URL(to, new URL(from, 'resolve://')); + * if (resolvedUrl.protocol === 'resolve:') { + * // `from` is a relative URL. + * const { pathname, search, hash } = resolvedUrl; + * return pathname + search + hash; + * } + * return resolvedUrl.toString(); + * } + * + * resolve('/one/two/three', 'four'); // '/one/two/four' + * resolve('http://example.com/', '/one'); // 'http://example.com/one' + * resolve('http://example.com/one', '/two'); // 'http://example.com/two' + * ``` + * @since v0.1.25 + * @deprecated Legacy: Use the WHATWG URL API instead. + * @param from The Base URL being resolved against. + * @param to The HREF URL being resolved. + */ + function resolve(from: string, to: string): string; + /** + * Returns the [Punycode](https://tools.ietf.org/html/rfc5891#section-4.4) ASCII serialization of the `domain`. If `domain` is an + * invalid domain, the empty string is returned. + * + * It performs the inverse operation to {@link domainToUnicode}. + * + * This feature is only available if the `node` executable was compiled with `ICU` enabled. If not, the domain names are passed through unchanged. + * + * ```js + * import url from 'url'; + * + * console.log(url.domainToASCII('español.com')); + * // Prints xn--espaol-zwa.com + * console.log(url.domainToASCII('中文.com')); + * // Prints xn--fiq228c.com + * console.log(url.domainToASCII('xn--iñvalid.com')); + * // Prints an empty string + * ``` + * @since v7.4.0, v6.13.0 + */ + function domainToASCII(domain: string): string; + /** + * Returns the Unicode serialization of the `domain`. If `domain` is an invalid + * domain, the empty string is returned. + * + * It performs the inverse operation to {@link domainToASCII}. + * + * This feature is only available if the `node` executable was compiled with `ICU` enabled. If not, the domain names are passed through unchanged. + * + * ```js + * import url from 'url'; + * + * console.log(url.domainToUnicode('xn--espaol-zwa.com')); + * // Prints español.com + * console.log(url.domainToUnicode('xn--fiq228c.com')); + * // Prints 中文.com + * console.log(url.domainToUnicode('xn--iñvalid.com')); + * // Prints an empty string + * ``` + * @since v7.4.0, v6.13.0 + */ + function domainToUnicode(domain: string): string; + /** + * This function ensures the correct decodings of percent-encoded characters as + * well as ensuring a cross-platform valid absolute path string. + * + * ```js + * import { fileURLToPath } from 'url'; + * + * const __filename = fileURLToPath(import.meta.url); + * + * new URL('file:///C:/path/').pathname; // Incorrect: /C:/path/ + * fileURLToPath('file:///C:/path/'); // Correct: C:\path\ (Windows) + * + * new URL('file://nas/foo.txt').pathname; // Incorrect: /foo.txt + * fileURLToPath('file://nas/foo.txt'); // Correct: \\nas\foo.txt (Windows) + * + * new URL('file:///你好.txt').pathname; // Incorrect: /%E4%BD%A0%E5%A5%BD.txt + * fileURLToPath('file:///你好.txt'); // Correct: /你好.txt (POSIX) + * + * new URL('file:///hello world').pathname; // Incorrect: /hello%20world + * fileURLToPath('file:///hello world'); // Correct: /hello world (POSIX) + * ``` + * @since v10.12.0 + * @param url The file URL string or URL object to convert to a path. + * @return The fully-resolved platform-specific Node.js file path. + */ + function fileURLToPath(url: string | URL): string; + /** + * This function ensures that `path` is resolved absolutely, and that the URL + * control characters are correctly encoded when converting into a File URL. + * + * ```js + * import { pathToFileURL } from 'url'; + * + * new URL('/foo#1', 'file:'); // Incorrect: file:///foo#1 + * pathToFileURL('/foo#1'); // Correct: file:///foo%231 (POSIX) + * + * new URL('/some/path%.c', 'file:'); // Incorrect: file:///some/path%.c + * pathToFileURL('/some/path%.c'); // Correct: file:///some/path%25.c (POSIX) + * ``` + * @since v10.12.0 + * @param path The path to convert to a File URL. + * @return The file URL object. + */ + function pathToFileURL(path: string): URL; + /** + * This utility function converts a URL object into an ordinary options object as + * expected by the `http.request()` and `https.request()` APIs. + * + * ```js + * import { urlToHttpOptions } from 'url'; + * const myURL = new URL('https://a:b@測試?abc#foo'); + * + * console.log(urlToHttpOptions(myURL)); + * + * { + * protocol: 'https:', + * hostname: 'xn--g6w251d', + * hash: '#foo', + * search: '?abc', + * pathname: '/', + * path: '/?abc', + * href: 'https://a:b@xn--g6w251d/?abc#foo', + * auth: 'a:b' + * } + * + * ``` + * @since v15.7.0 + * @param url The `WHATWG URL` object to convert to an options object. + * @return Options object + */ + function urlToHttpOptions(url: URL): ClientRequestArgs; + interface URLFormatOptions { + auth?: boolean | undefined; + fragment?: boolean | undefined; + search?: boolean | undefined; + unicode?: boolean | undefined; + } + /** + * Browser-compatible `URL` class, implemented by following the WHATWG URL + * Standard. [Examples of parsed URLs](https://url.spec.whatwg.org/#example-url-parsing) may be found in the Standard itself. + * The `URL` class is also available on the global object. + * + * In accordance with browser conventions, all properties of `URL` objects + * are implemented as getters and setters on the class prototype, rather than as + * data properties on the object itself. Thus, unlike `legacy urlObject` s, + * using the `delete` keyword on any properties of `URL` objects (e.g. `delete myURL.protocol`, `delete myURL.pathname`, etc) has no effect but will still + * return `true`. + * @since v7.0.0, v6.13.0 + */ + class URL { + /** + * Creates a `'blob:nodedata:...'` URL string that represents the given `Blob` object and can be used to retrieve the `Blob` later. + * + * ```js + * const { + * Blob, + * resolveObjectURL, + * } = require('buffer'); + * + * const blob = new Blob(['hello']); + * const id = URL.createObjectURL(blob); + * + * // later... + * + * const otherBlob = resolveObjectURL(id); + * console.log(otherBlob.size); + * ``` + * + * The data stored by the registered `Blob` will be retained in memory until`URL.revokeObjectURL()` is called to remove it. + * + * `Blob` objects are registered within the current thread. If using Worker + * Threads, `Blob` objects registered within one Worker will not be available + * to other workers or the main thread. + * @since v16.7.0 + * @experimental + */ + static createObjectURL(blob: Blob): string; + /** + * Removes the stored `Blob` identified by the given ID. + * @since v16.7.0 + * @experimental + * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`. + */ + static revokeObjectURL(objectUrl: string): void; + constructor(input: string, base?: string | URL); + /** + * Gets and sets the fragment portion of the URL. + * + * ```js + * const myURL = new URL('https://example.org/foo#bar'); + * console.log(myURL.hash); + * // Prints #bar + * + * myURL.hash = 'baz'; + * console.log(myURL.href); + * // Prints https://example.org/foo#baz + * ``` + * + * Invalid URL characters included in the value assigned to the `hash` property + * are `percent-encoded`. The selection of which characters to + * percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce. + */ + hash: string; + /** + * Gets and sets the host portion of the URL. + * + * ```js + * const myURL = new URL('https://example.org:81/foo'); + * console.log(myURL.host); + * // Prints example.org:81 + * + * myURL.host = 'example.com:82'; + * console.log(myURL.href); + * // Prints https://example.com:82/foo + * ``` + * + * Invalid host values assigned to the `host` property are ignored. + */ + host: string; + /** + * Gets and sets the host name portion of the URL. The key difference between`url.host` and `url.hostname` is that `url.hostname` does _not_ include the + * port. + * + * ```js + * const myURL = new URL('https://example.org:81/foo'); + * console.log(myURL.hostname); + * // Prints example.org + * + * // Setting the hostname does not change the port + * myURL.hostname = 'example.com:82'; + * console.log(myURL.href); + * // Prints https://example.com:81/foo + * + * // Use myURL.host to change the hostname and port + * myURL.host = 'example.org:82'; + * console.log(myURL.href); + * // Prints https://example.org:82/foo + * ``` + * + * Invalid host name values assigned to the `hostname` property are ignored. + */ + hostname: string; + /** + * Gets and sets the serialized URL. + * + * ```js + * const myURL = new URL('https://example.org/foo'); + * console.log(myURL.href); + * // Prints https://example.org/foo + * + * myURL.href = 'https://example.com/bar'; + * console.log(myURL.href); + * // Prints https://example.com/bar + * ``` + * + * Getting the value of the `href` property is equivalent to calling {@link toString}. + * + * Setting the value of this property to a new value is equivalent to creating a + * new `URL` object using `new URL(value)`. Each of the `URL`object's properties will be modified. + * + * If the value assigned to the `href` property is not a valid URL, a `TypeError`will be thrown. + */ + href: string; + /** + * Gets the read-only serialization of the URL's origin. + * + * ```js + * const myURL = new URL('https://example.org/foo/bar?baz'); + * console.log(myURL.origin); + * // Prints https://example.org + * ``` + * + * ```js + * const idnURL = new URL('https://測試'); + * console.log(idnURL.origin); + * // Prints https://xn--g6w251d + * + * console.log(idnURL.hostname); + * // Prints xn--g6w251d + * ``` + */ + readonly origin: string; + /** + * Gets and sets the password portion of the URL. + * + * ```js + * const myURL = new URL('https://abc:xyz@example.com'); + * console.log(myURL.password); + * // Prints xyz + * + * myURL.password = '123'; + * console.log(myURL.href); + * // Prints https://abc:123@example.com + * ``` + * + * Invalid URL characters included in the value assigned to the `password` property + * are `percent-encoded`. The selection of which characters to + * percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce. + */ + password: string; + /** + * Gets and sets the path portion of the URL. + * + * ```js + * const myURL = new URL('https://example.org/abc/xyz?123'); + * console.log(myURL.pathname); + * // Prints /abc/xyz + * + * myURL.pathname = '/abcdef'; + * console.log(myURL.href); + * // Prints https://example.org/abcdef?123 + * ``` + * + * Invalid URL characters included in the value assigned to the `pathname`property are `percent-encoded`. The selection of which characters + * to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce. + */ + pathname: string; + /** + * Gets and sets the port portion of the URL. + * + * The port value may be a number or a string containing a number in the range`0` to `65535` (inclusive). Setting the value to the default port of the`URL` objects given `protocol` will + * result in the `port` value becoming + * the empty string (`''`). + * + * The port value can be an empty string in which case the port depends on + * the protocol/scheme: + * + * + * + * Upon assigning a value to the port, the value will first be converted to a + * string using `.toString()`. + * + * If that string is invalid but it begins with a number, the leading number is + * assigned to `port`. + * If the number lies outside the range denoted above, it is ignored. + * + * ```js + * const myURL = new URL('https://example.org:8888'); + * console.log(myURL.port); + * // Prints 8888 + * + * // Default ports are automatically transformed to the empty string + * // (HTTPS protocol's default port is 443) + * myURL.port = '443'; + * console.log(myURL.port); + * // Prints the empty string + * console.log(myURL.href); + * // Prints https://example.org/ + * + * myURL.port = 1234; + * console.log(myURL.port); + * // Prints 1234 + * console.log(myURL.href); + * // Prints https://example.org:1234/ + * + * // Completely invalid port strings are ignored + * myURL.port = 'abcd'; + * console.log(myURL.port); + * // Prints 1234 + * + * // Leading numbers are treated as a port number + * myURL.port = '5678abcd'; + * console.log(myURL.port); + * // Prints 5678 + * + * // Non-integers are truncated + * myURL.port = 1234.5678; + * console.log(myURL.port); + * // Prints 1234 + * + * // Out-of-range numbers which are not represented in scientific notation + * // will be ignored. + * myURL.port = 1e10; // 10000000000, will be range-checked as described below + * console.log(myURL.port); + * // Prints 1234 + * ``` + * + * Numbers which contain a decimal point, + * such as floating-point numbers or numbers in scientific notation, + * are not an exception to this rule. + * Leading numbers up to the decimal point will be set as the URL's port, + * assuming they are valid: + * + * ```js + * myURL.port = 4.567e21; + * console.log(myURL.port); + * // Prints 4 (because it is the leading number in the string '4.567e21') + * ``` + */ + port: string; + /** + * Gets and sets the protocol portion of the URL. + * + * ```js + * const myURL = new URL('https://example.org'); + * console.log(myURL.protocol); + * // Prints https: + * + * myURL.protocol = 'ftp'; + * console.log(myURL.href); + * // Prints ftp://example.org/ + * ``` + * + * Invalid URL protocol values assigned to the `protocol` property are ignored. + */ + protocol: string; + /** + * Gets and sets the serialized query portion of the URL. + * + * ```js + * const myURL = new URL('https://example.org/abc?123'); + * console.log(myURL.search); + * // Prints ?123 + * + * myURL.search = 'abc=xyz'; + * console.log(myURL.href); + * // Prints https://example.org/abc?abc=xyz + * ``` + * + * Any invalid URL characters appearing in the value assigned the `search`property will be `percent-encoded`. The selection of which + * characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce. + */ + search: string; + /** + * Gets the `URLSearchParams` object representing the query parameters of the + * URL. This property is read-only but the `URLSearchParams` object it provides + * can be used to mutate the URL instance; to replace the entirety of query + * parameters of the URL, use the {@link search} setter. See `URLSearchParams` documentation for details. + * + * Use care when using `.searchParams` to modify the `URL` because, + * per the WHATWG specification, the `URLSearchParams` object uses + * different rules to determine which characters to percent-encode. For + * instance, the `URL` object will not percent encode the ASCII tilde (`~`) + * character, while `URLSearchParams` will always encode it: + * + * ```js + * const myUrl = new URL('https://example.org/abc?foo=~bar'); + * + * console.log(myUrl.search); // prints ?foo=~bar + * + * // Modify the URL via searchParams... + * myUrl.searchParams.sort(); + * + * console.log(myUrl.search); // prints ?foo=%7Ebar + * ``` + */ + readonly searchParams: URLSearchParams; + /** + * Gets and sets the username portion of the URL. + * + * ```js + * const myURL = new URL('https://abc:xyz@example.com'); + * console.log(myURL.username); + * // Prints abc + * + * myURL.username = '123'; + * console.log(myURL.href); + * // Prints https://123:xyz@example.com/ + * ``` + * + * Any invalid URL characters appearing in the value assigned the `username`property will be `percent-encoded`. The selection of which + * characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce. + */ + username: string; + /** + * The `toString()` method on the `URL` object returns the serialized URL. The + * value returned is equivalent to that of {@link href} and {@link toJSON}. + */ + toString(): string; + /** + * The `toJSON()` method on the `URL` object returns the serialized URL. The + * value returned is equivalent to that of {@link href} and {@link toString}. + * + * This method is automatically called when an `URL` object is serialized + * with [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). + * + * ```js + * const myURLs = [ + * new URL('https://www.example.com'), + * new URL('https://test.example.org'), + * ]; + * console.log(JSON.stringify(myURLs)); + * // Prints ["https://www.example.com/","https://test.example.org/"] + * ``` + */ + toJSON(): string; + } + /** + * The `URLSearchParams` API provides read and write access to the query of a`URL`. The `URLSearchParams` class can also be used standalone with one of the + * four following constructors. + * The `URLSearchParams` class is also available on the global object. + * + * The WHATWG `URLSearchParams` interface and the `querystring` module have + * similar purpose, but the purpose of the `querystring` module is more + * general, as it allows the customization of delimiter characters (`&` and `=`). + * On the other hand, this API is designed purely for URL query strings. + * + * ```js + * const myURL = new URL('https://example.org/?abc=123'); + * console.log(myURL.searchParams.get('abc')); + * // Prints 123 + * + * myURL.searchParams.append('abc', 'xyz'); + * console.log(myURL.href); + * // Prints https://example.org/?abc=123&abc=xyz + * + * myURL.searchParams.delete('abc'); + * myURL.searchParams.set('a', 'b'); + * console.log(myURL.href); + * // Prints https://example.org/?a=b + * + * const newSearchParams = new URLSearchParams(myURL.searchParams); + * // The above is equivalent to + * // const newSearchParams = new URLSearchParams(myURL.search); + * + * newSearchParams.append('a', 'c'); + * console.log(myURL.href); + * // Prints https://example.org/?a=b + * console.log(newSearchParams.toString()); + * // Prints a=b&a=c + * + * // newSearchParams.toString() is implicitly called + * myURL.search = newSearchParams; + * console.log(myURL.href); + * // Prints https://example.org/?a=b&a=c + * newSearchParams.delete('a'); + * console.log(myURL.href); + * // Prints https://example.org/?a=b&a=c + * ``` + * @since v7.5.0, v6.13.0 + */ + class URLSearchParams implements Iterable<[string, string]> { + constructor(init?: URLSearchParams | string | Record> | Iterable<[string, string]> | ReadonlyArray<[string, string]>); + /** + * Append a new name-value pair to the query string. + */ + append(name: string, value: string): void; + /** + * Remove all name-value pairs whose name is `name`. + */ + delete(name: string): void; + /** + * Returns an ES6 `Iterator` over each of the name-value pairs in the query. + * Each item of the iterator is a JavaScript `Array`. The first item of the `Array`is the `name`, the second item of the `Array` is the `value`. + * + * Alias for `urlSearchParams[@@iterator]()`. + */ + entries(): IterableIterator<[string, string]>; + /** + * Iterates over each name-value pair in the query and invokes the given function. + * + * ```js + * const myURL = new URL('https://example.org/?a=b&c=d'); + * myURL.searchParams.forEach((value, name, searchParams) => { + * console.log(name, value, myURL.searchParams === searchParams); + * }); + * // Prints: + * // a b true + * // c d true + * ``` + * @param fn Invoked for each name-value pair in the query + * @param thisArg To be used as `this` value for when `fn` is called + */ + forEach(callback: (this: TThis, value: string, name: string, searchParams: this) => void, thisArg?: TThis): void; + /** + * Returns the value of the first name-value pair whose name is `name`. If there + * are no such pairs, `null` is returned. + * @return or `null` if there is no name-value pair with the given `name`. + */ + get(name: string): string | null; + /** + * Returns the values of all name-value pairs whose name is `name`. If there are + * no such pairs, an empty array is returned. + */ + getAll(name: string): string[]; + /** + * Returns `true` if there is at least one name-value pair whose name is `name`. + */ + has(name: string): boolean; + /** + * Returns an ES6 `Iterator` over the names of each name-value pair. + * + * ```js + * const params = new URLSearchParams('foo=bar&foo=baz'); + * for (const name of params.keys()) { + * console.log(name); + * } + * // Prints: + * // foo + * // foo + * ``` + */ + keys(): IterableIterator; + /** + * Sets the value in the `URLSearchParams` object associated with `name` to`value`. If there are any pre-existing name-value pairs whose names are `name`, + * set the first such pair's value to `value` and remove all others. If not, + * append the name-value pair to the query string. + * + * ```js + * const params = new URLSearchParams(); + * params.append('foo', 'bar'); + * params.append('foo', 'baz'); + * params.append('abc', 'def'); + * console.log(params.toString()); + * // Prints foo=bar&foo=baz&abc=def + * + * params.set('foo', 'def'); + * params.set('xyz', 'opq'); + * console.log(params.toString()); + * // Prints foo=def&abc=def&xyz=opq + * ``` + */ + set(name: string, value: string): void; + /** + * Sort all existing name-value pairs in-place by their names. Sorting is done + * with a [stable sorting algorithm](https://en.wikipedia.org/wiki/Sorting_algorithm#Stability), so relative order between name-value pairs + * with the same name is preserved. + * + * This method can be used, in particular, to increase cache hits. + * + * ```js + * const params = new URLSearchParams('query[]=abc&type=search&query[]=123'); + * params.sort(); + * console.log(params.toString()); + * // Prints query%5B%5D=abc&query%5B%5D=123&type=search + * ``` + * @since v7.7.0, v6.13.0 + */ + sort(): void; + /** + * Returns the search parameters serialized as a string, with characters + * percent-encoded where necessary. + */ + toString(): string; + /** + * Returns an ES6 `Iterator` over the values of each name-value pair. + */ + values(): IterableIterator; + [Symbol.iterator](): IterableIterator<[string, string]>; + } +} +declare module 'node:url' { + export * from 'url'; +} diff --git a/frontend/node_modules/@types/node/util.d.ts b/frontend/node_modules/@types/node/util.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d0f4c176476c8bcf13f2a897fabd94cfa8563e2b --- /dev/null +++ b/frontend/node_modules/@types/node/util.d.ts @@ -0,0 +1,1594 @@ +/** + * The `util` module supports the needs of Node.js internal APIs. Many of the + * utilities are useful for application and module developers as well. To access + * it: + * + * ```js + * const util = require('util'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/util.js) + */ +declare module 'util' { + import * as types from 'node:util/types'; + export interface InspectOptions { + /** + * If set to `true`, getters are going to be + * inspected as well. If set to `'get'` only getters without setter are going + * to be inspected. If set to `'set'` only getters having a corresponding + * setter are going to be inspected. This might cause side effects depending on + * the getter function. + * @default `false` + */ + getters?: 'get' | 'set' | boolean | undefined; + showHidden?: boolean | undefined; + /** + * @default 2 + */ + depth?: number | null | undefined; + colors?: boolean | undefined; + customInspect?: boolean | undefined; + showProxy?: boolean | undefined; + maxArrayLength?: number | null | undefined; + /** + * Specifies the maximum number of characters to + * include when formatting. Set to `null` or `Infinity` to show all elements. + * Set to `0` or negative to show no characters. + * @default 10000 + */ + maxStringLength?: number | null | undefined; + breakLength?: number | undefined; + /** + * Setting this to `false` causes each object key + * to be displayed on a new line. It will also add new lines to text that is + * longer than `breakLength`. If set to a number, the most `n` inner elements + * are united on a single line as long as all properties fit into + * `breakLength`. Short array elements are also grouped together. Note that no + * text will be reduced below 16 characters, no matter the `breakLength` size. + * For more information, see the example below. + * @default `true` + */ + compact?: boolean | number | undefined; + sorted?: boolean | ((a: string, b: string) => number) | undefined; + } + export type Style = 'special' | 'number' | 'bigint' | 'boolean' | 'undefined' | 'null' | 'string' | 'symbol' | 'date' | 'regexp' | 'module'; + export type CustomInspectFunction = (depth: number, options: InspectOptionsStylized) => string; + export interface InspectOptionsStylized extends InspectOptions { + stylize(text: string, styleType: Style): string; + } + /** + * The `util.format()` method returns a formatted string using the first argument + * as a `printf`\-like format string which can contain zero or more format + * specifiers. Each specifier is replaced with the converted value from the + * corresponding argument. Supported specifiers are: + * + * If a specifier does not have a corresponding argument, it is not replaced: + * + * ```js + * util.format('%s:%s', 'foo'); + * // Returns: 'foo:%s' + * ``` + * + * Values that are not part of the format string are formatted using`util.inspect()` if their type is not `string`. + * + * If there are more arguments passed to the `util.format()` method than the + * number of specifiers, the extra arguments are concatenated to the returned + * string, separated by spaces: + * + * ```js + * util.format('%s:%s', 'foo', 'bar', 'baz'); + * // Returns: 'foo:bar baz' + * ``` + * + * If the first argument does not contain a valid format specifier, `util.format()`returns a string that is the concatenation of all arguments separated by spaces: + * + * ```js + * util.format(1, 2, 3); + * // Returns: '1 2 3' + * ``` + * + * If only one argument is passed to `util.format()`, it is returned as it is + * without any formatting: + * + * ```js + * util.format('%% %s'); + * // Returns: '%% %s' + * ``` + * + * `util.format()` is a synchronous method that is intended as a debugging tool. + * Some input values can have a significant performance overhead that can block the + * event loop. Use this function with care and never in a hot code path. + * @since v0.5.3 + * @param format A `printf`-like format string. + */ + export function format(format?: any, ...param: any[]): string; + /** + * This function is identical to {@link format}, except in that it takes + * an `inspectOptions` argument which specifies options that are passed along to {@link inspect}. + * + * ```js + * util.formatWithOptions({ colors: true }, 'See object %O', { foo: 42 }); + * // Returns 'See object { foo: 42 }', where `42` is colored as a number + * // when printed to a terminal. + * ``` + * @since v10.0.0 + */ + export function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string; + /** + * Returns the string name for a numeric error code that comes from a Node.js API. + * The mapping between error codes and error names is platform-dependent. + * See `Common System Errors` for the names of common errors. + * + * ```js + * fs.access('file/that/does/not/exist', (err) => { + * const name = util.getSystemErrorName(err.errno); + * console.error(name); // ENOENT + * }); + * ``` + * @since v9.7.0 + */ + export function getSystemErrorName(err: number): string; + /** + * Returns a Map of all system error codes available from the Node.js API. + * The mapping between error codes and error names is platform-dependent. + * See `Common System Errors` for the names of common errors. + * + * ```js + * fs.access('file/that/does/not/exist', (err) => { + * const errorMap = util.getSystemErrorMap(); + * const name = errorMap.get(err.errno); + * console.error(name); // ENOENT + * }); + * ``` + * @since v16.0.0 + */ + export function getSystemErrorMap(): Map; + /** + * The `util.log()` method prints the given `string` to `stdout` with an included + * timestamp. + * + * ```js + * const util = require('util'); + * + * util.log('Timestamped message.'); + * ``` + * @since v0.3.0 + * @deprecated Since v6.0.0 - Use a third party module instead. + */ + export function log(string: string): void; + /** + * Returns the `string` after replacing any surrogate code points + * (or equivalently, any unpaired surrogate code units) with the + * Unicode "replacement character" U+FFFD. + * @since v16.8.0 + */ + export function toUSVString(string: string): string; + /** + * The `util.inspect()` method returns a string representation of `object` that is + * intended for debugging. The output of `util.inspect` may change at any time + * and should not be depended upon programmatically. Additional `options` may be + * passed that alter the result.`util.inspect()` will use the constructor's name and/or `@@toStringTag` to make + * an identifiable tag for an inspected value. + * + * ```js + * class Foo { + * get [Symbol.toStringTag]() { + * return 'bar'; + * } + * } + * + * class Bar {} + * + * const baz = Object.create(null, { [Symbol.toStringTag]: { value: 'foo' } }); + * + * util.inspect(new Foo()); // 'Foo [bar] {}' + * util.inspect(new Bar()); // 'Bar {}' + * util.inspect(baz); // '[foo] {}' + * ``` + * + * Circular references point to their anchor by using a reference index: + * + * ```js + * const { inspect } = require('util'); + * + * const obj = {}; + * obj.a = [obj]; + * obj.b = {}; + * obj.b.inner = obj.b; + * obj.b.obj = obj; + * + * console.log(inspect(obj)); + * // { + * // a: [ [Circular *1] ], + * // b: { inner: [Circular *2], obj: [Circular *1] } + * // } + * ``` + * + * The following example inspects all properties of the `util` object: + * + * ```js + * const util = require('util'); + * + * console.log(util.inspect(util, { showHidden: true, depth: null })); + * ``` + * + * The following example highlights the effect of the `compact` option: + * + * ```js + * const util = require('util'); + * + * const o = { + * a: [1, 2, [[ + * 'Lorem ipsum dolor sit amet,\nconsectetur adipiscing elit, sed do ' + + * 'eiusmod \ntempor incididunt ut labore et dolore magna aliqua.', + * 'test', + * 'foo']], 4], + * b: new Map([['za', 1], ['zb', 'test']]) + * }; + * console.log(util.inspect(o, { compact: true, depth: 5, breakLength: 80 })); + * + * // { a: + * // [ 1, + * // 2, + * // [ [ 'Lorem ipsum dolor sit amet,\nconsectetur [...]', // A long line + * // 'test', + * // 'foo' ] ], + * // 4 ], + * // b: Map(2) { 'za' => 1, 'zb' => 'test' } } + * + * // Setting `compact` to false or an integer creates more reader friendly output. + * console.log(util.inspect(o, { compact: false, depth: 5, breakLength: 80 })); + * + * // { + * // a: [ + * // 1, + * // 2, + * // [ + * // [ + * // 'Lorem ipsum dolor sit amet,\n' + + * // 'consectetur adipiscing elit, sed do eiusmod \n' + + * // 'tempor incididunt ut labore et dolore magna aliqua.', + * // 'test', + * // 'foo' + * // ] + * // ], + * // 4 + * // ], + * // b: Map(2) { + * // 'za' => 1, + * // 'zb' => 'test' + * // } + * // } + * + * // Setting `breakLength` to e.g. 150 will print the "Lorem ipsum" text in a + * // single line. + * ``` + * + * The `showHidden` option allows [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) and + * [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) entries to be + * inspected. If there are more entries than `maxArrayLength`, there is no + * guarantee which entries are displayed. That means retrieving the same [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) entries twice may + * result in different output. Furthermore, entries + * with no remaining strong references may be garbage collected at any time. + * + * ```js + * const { inspect } = require('util'); + * + * const obj = { a: 1 }; + * const obj2 = { b: 2 }; + * const weakSet = new WeakSet([obj, obj2]); + * + * console.log(inspect(weakSet, { showHidden: true })); + * // WeakSet { { a: 1 }, { b: 2 } } + * ``` + * + * The `sorted` option ensures that an object's property insertion order does not + * impact the result of `util.inspect()`. + * + * ```js + * const { inspect } = require('util'); + * const assert = require('assert'); + * + * const o1 = { + * b: [2, 3, 1], + * a: '`a` comes before `b`', + * c: new Set([2, 3, 1]) + * }; + * console.log(inspect(o1, { sorted: true })); + * // { a: '`a` comes before `b`', b: [ 2, 3, 1 ], c: Set(3) { 1, 2, 3 } } + * console.log(inspect(o1, { sorted: (a, b) => b.localeCompare(a) })); + * // { c: Set(3) { 3, 2, 1 }, b: [ 2, 3, 1 ], a: '`a` comes before `b`' } + * + * const o2 = { + * c: new Set([2, 1, 3]), + * a: '`a` comes before `b`', + * b: [2, 3, 1] + * }; + * assert.strict.equal( + * inspect(o1, { sorted: true }), + * inspect(o2, { sorted: true }) + * ); + * ``` + * + * `util.inspect()` is a synchronous method intended for debugging. Its maximum + * output length is approximately 128 MB. Inputs that result in longer output will + * be truncated. + * @since v0.3.0 + * @param object Any JavaScript primitive or `Object`. + * @return The representation of `object`. + */ + export function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string; + export function inspect(object: any, options: InspectOptions): string; + export namespace inspect { + let colors: NodeJS.Dict<[number, number]>; + let styles: { + [K in Style]: string; + }; + let defaultOptions: InspectOptions; + /** + * Allows changing inspect settings from the repl. + */ + let replDefaults: InspectOptions; + /** + * That can be used to declare custom inspect functions. + */ + const custom: unique symbol; + } + /** + * Alias for [`Array.isArray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray). + * + * Returns `true` if the given `object` is an `Array`. Otherwise, returns `false`. + * + * ```js + * const util = require('util'); + * + * util.isArray([]); + * // Returns: true + * util.isArray(new Array()); + * // Returns: true + * util.isArray({}); + * // Returns: false + * ``` + * @since v0.6.0 + * @deprecated Since v4.0.0 - Use `isArray` instead. + */ + export function isArray(object: unknown): object is unknown[]; + /** + * Returns `true` if the given `object` is a `RegExp`. Otherwise, returns `false`. + * + * ```js + * const util = require('util'); + * + * util.isRegExp(/some regexp/); + * // Returns: true + * util.isRegExp(new RegExp('another regexp')); + * // Returns: true + * util.isRegExp({}); + * // Returns: false + * ``` + * @since v0.6.0 + * @deprecated Since v4.0.0 - Deprecated + */ + export function isRegExp(object: unknown): object is RegExp; + /** + * Returns `true` if the given `object` is a `Date`. Otherwise, returns `false`. + * + * ```js + * const util = require('util'); + * + * util.isDate(new Date()); + * // Returns: true + * util.isDate(Date()); + * // false (without 'new' returns a String) + * util.isDate({}); + * // Returns: false + * ``` + * @since v0.6.0 + * @deprecated Since v4.0.0 - Use {@link types.isDate} instead. + */ + export function isDate(object: unknown): object is Date; + /** + * Returns `true` if the given `object` is an `Error`. Otherwise, returns`false`. + * + * ```js + * const util = require('util'); + * + * util.isError(new Error()); + * // Returns: true + * util.isError(new TypeError()); + * // Returns: true + * util.isError({ name: 'Error', message: 'an error occurred' }); + * // Returns: false + * ``` + * + * This method relies on `Object.prototype.toString()` behavior. It is + * possible to obtain an incorrect result when the `object` argument manipulates`@@toStringTag`. + * + * ```js + * const util = require('util'); + * const obj = { name: 'Error', message: 'an error occurred' }; + * + * util.isError(obj); + * // Returns: false + * obj[Symbol.toStringTag] = 'Error'; + * util.isError(obj); + * // Returns: true + * ``` + * @since v0.6.0 + * @deprecated Since v4.0.0 - Use {@link types.isNativeError} instead. + */ + export function isError(object: unknown): object is Error; + /** + * Usage of `util.inherits()` is discouraged. Please use the ES6 `class` and`extends` keywords to get language level inheritance support. Also note + * that the two styles are [semantically incompatible](https://github.com/nodejs/node/issues/4179). + * + * Inherit the prototype methods from one [constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor) into another. The + * prototype of `constructor` will be set to a new object created from`superConstructor`. + * + * This mainly adds some input validation on top of`Object.setPrototypeOf(constructor.prototype, superConstructor.prototype)`. + * As an additional convenience, `superConstructor` will be accessible + * through the `constructor.super_` property. + * + * ```js + * const util = require('util'); + * const EventEmitter = require('events'); + * + * function MyStream() { + * EventEmitter.call(this); + * } + * + * util.inherits(MyStream, EventEmitter); + * + * MyStream.prototype.write = function(data) { + * this.emit('data', data); + * }; + * + * const stream = new MyStream(); + * + * console.log(stream instanceof EventEmitter); // true + * console.log(MyStream.super_ === EventEmitter); // true + * + * stream.on('data', (data) => { + * console.log(`Received data: "${data}"`); + * }); + * stream.write('It works!'); // Received data: "It works!" + * ``` + * + * ES6 example using `class` and `extends`: + * + * ```js + * const EventEmitter = require('events'); + * + * class MyStream extends EventEmitter { + * write(data) { + * this.emit('data', data); + * } + * } + * + * const stream = new MyStream(); + * + * stream.on('data', (data) => { + * console.log(`Received data: "${data}"`); + * }); + * stream.write('With ES6'); + * ``` + * @since v0.3.0 + * @deprecated Legacy: Use ES2015 class syntax and `extends` keyword instead. + */ + export function inherits(constructor: unknown, superConstructor: unknown): void; + export type DebugLoggerFunction = (msg: string, ...param: unknown[]) => void; + export interface DebugLogger extends DebugLoggerFunction { + enabled: boolean; + } + /** + * The `util.debuglog()` method is used to create a function that conditionally + * writes debug messages to `stderr` based on the existence of the `NODE_DEBUG`environment variable. If the `section` name appears within the value of that + * environment variable, then the returned function operates similar to `console.error()`. If not, then the returned function is a no-op. + * + * ```js + * const util = require('util'); + * const debuglog = util.debuglog('foo'); + * + * debuglog('hello from foo [%d]', 123); + * ``` + * + * If this program is run with `NODE_DEBUG=foo` in the environment, then + * it will output something like: + * + * ```console + * FOO 3245: hello from foo [123] + * ``` + * + * where `3245` is the process id. If it is not run with that + * environment variable set, then it will not print anything. + * + * The `section` supports wildcard also: + * + * ```js + * const util = require('util'); + * const debuglog = util.debuglog('foo-bar'); + * + * debuglog('hi there, it\'s foo-bar [%d]', 2333); + * ``` + * + * if it is run with `NODE_DEBUG=foo*` in the environment, then it will output + * something like: + * + * ```console + * FOO-BAR 3257: hi there, it's foo-bar [2333] + * ``` + * + * Multiple comma-separated `section` names may be specified in the `NODE_DEBUG`environment variable: `NODE_DEBUG=fs,net,tls`. + * + * The optional `callback` argument can be used to replace the logging function + * with a different function that doesn't have any initialization or + * unnecessary wrapping. + * + * ```js + * const util = require('util'); + * let debuglog = util.debuglog('internals', (debug) => { + * // Replace with a logging function that optimizes out + * // testing if the section is enabled + * debuglog = debug; + * }); + * ``` + * @since v0.11.3 + * @param section A string identifying the portion of the application for which the `debuglog` function is being created. + * @param callback A callback invoked the first time the logging function is called with a function argument that is a more optimized logging function. + * @return The logging function + */ + export function debuglog(section: string, callback?: (fn: DebugLoggerFunction) => void): DebugLogger; + export const debug: typeof debuglog; + /** + * Returns `true` if the given `object` is a `Boolean`. Otherwise, returns `false`. + * + * ```js + * const util = require('util'); + * + * util.isBoolean(1); + * // Returns: false + * util.isBoolean(0); + * // Returns: false + * util.isBoolean(false); + * // Returns: true + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `typeof value === 'boolean'` instead. + */ + export function isBoolean(object: unknown): object is boolean; + /** + * Returns `true` if the given `object` is a `Buffer`. Otherwise, returns `false`. + * + * ```js + * const util = require('util'); + * + * util.isBuffer({ length: 0 }); + * // Returns: false + * util.isBuffer([]); + * // Returns: false + * util.isBuffer(Buffer.from('hello world')); + * // Returns: true + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `isBuffer` instead. + */ + export function isBuffer(object: unknown): object is Buffer; + /** + * Returns `true` if the given `object` is a `Function`. Otherwise, returns`false`. + * + * ```js + * const util = require('util'); + * + * function Foo() {} + * const Bar = () => {}; + * + * util.isFunction({}); + * // Returns: false + * util.isFunction(Foo); + * // Returns: true + * util.isFunction(Bar); + * // Returns: true + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `typeof value === 'function'` instead. + */ + export function isFunction(object: unknown): boolean; + /** + * Returns `true` if the given `object` is strictly `null`. Otherwise, returns`false`. + * + * ```js + * const util = require('util'); + * + * util.isNull(0); + * // Returns: false + * util.isNull(undefined); + * // Returns: false + * util.isNull(null); + * // Returns: true + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `value === null` instead. + */ + export function isNull(object: unknown): object is null; + /** + * Returns `true` if the given `object` is `null` or `undefined`. Otherwise, + * returns `false`. + * + * ```js + * const util = require('util'); + * + * util.isNullOrUndefined(0); + * // Returns: false + * util.isNullOrUndefined(undefined); + * // Returns: true + * util.isNullOrUndefined(null); + * // Returns: true + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `value === undefined || value === null` instead. + */ + export function isNullOrUndefined(object: unknown): object is null | undefined; + /** + * Returns `true` if the given `object` is a `Number`. Otherwise, returns `false`. + * + * ```js + * const util = require('util'); + * + * util.isNumber(false); + * // Returns: false + * util.isNumber(Infinity); + * // Returns: true + * util.isNumber(0); + * // Returns: true + * util.isNumber(NaN); + * // Returns: true + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `typeof value === 'number'` instead. + */ + export function isNumber(object: unknown): object is number; + /** + * Returns `true` if the given `object` is strictly an `Object`**and** not a`Function` (even though functions are objects in JavaScript). + * Otherwise, returns `false`. + * + * ```js + * const util = require('util'); + * + * util.isObject(5); + * // Returns: false + * util.isObject(null); + * // Returns: false + * util.isObject({}); + * // Returns: true + * util.isObject(() => {}); + * // Returns: false + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Deprecated: Use `value !== null && typeof value === 'object'` instead. + */ + export function isObject(object: unknown): boolean; + /** + * Returns `true` if the given `object` is a primitive type. Otherwise, returns`false`. + * + * ```js + * const util = require('util'); + * + * util.isPrimitive(5); + * // Returns: true + * util.isPrimitive('foo'); + * // Returns: true + * util.isPrimitive(false); + * // Returns: true + * util.isPrimitive(null); + * // Returns: true + * util.isPrimitive(undefined); + * // Returns: true + * util.isPrimitive({}); + * // Returns: false + * util.isPrimitive(() => {}); + * // Returns: false + * util.isPrimitive(/^$/); + * // Returns: false + * util.isPrimitive(new Date()); + * // Returns: false + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `(typeof value !== 'object' && typeof value !== 'function') || value === null` instead. + */ + export function isPrimitive(object: unknown): boolean; + /** + * Returns `true` if the given `object` is a `string`. Otherwise, returns `false`. + * + * ```js + * const util = require('util'); + * + * util.isString(''); + * // Returns: true + * util.isString('foo'); + * // Returns: true + * util.isString(String('foo')); + * // Returns: true + * util.isString(5); + * // Returns: false + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `typeof value === 'string'` instead. + */ + export function isString(object: unknown): object is string; + /** + * Returns `true` if the given `object` is a `Symbol`. Otherwise, returns `false`. + * + * ```js + * const util = require('util'); + * + * util.isSymbol(5); + * // Returns: false + * util.isSymbol('foo'); + * // Returns: false + * util.isSymbol(Symbol('foo')); + * // Returns: true + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `typeof value === 'symbol'` instead. + */ + export function isSymbol(object: unknown): object is symbol; + /** + * Returns `true` if the given `object` is `undefined`. Otherwise, returns `false`. + * + * ```js + * const util = require('util'); + * + * const foo = undefined; + * util.isUndefined(5); + * // Returns: false + * util.isUndefined(foo); + * // Returns: true + * util.isUndefined(null); + * // Returns: false + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `value === undefined` instead. + */ + export function isUndefined(object: unknown): object is undefined; + /** + * The `util.deprecate()` method wraps `fn` (which may be a function or class) in + * such a way that it is marked as deprecated. + * + * ```js + * const util = require('util'); + * + * exports.obsoleteFunction = util.deprecate(() => { + * // Do something here. + * }, 'obsoleteFunction() is deprecated. Use newShinyFunction() instead.'); + * ``` + * + * When called, `util.deprecate()` will return a function that will emit a`DeprecationWarning` using the `'warning'` event. The warning will + * be emitted and printed to `stderr` the first time the returned function is + * called. After the warning is emitted, the wrapped function is called without + * emitting a warning. + * + * If the same optional `code` is supplied in multiple calls to `util.deprecate()`, + * the warning will be emitted only once for that `code`. + * + * ```js + * const util = require('util'); + * + * const fn1 = util.deprecate(someFunction, someMessage, 'DEP0001'); + * const fn2 = util.deprecate(someOtherFunction, someOtherMessage, 'DEP0001'); + * fn1(); // Emits a deprecation warning with code DEP0001 + * fn2(); // Does not emit a deprecation warning because it has the same code + * ``` + * + * If either the `--no-deprecation` or `--no-warnings` command-line flags are + * used, or if the `process.noDeprecation` property is set to `true`_prior_ to + * the first deprecation warning, the `util.deprecate()` method does nothing. + * + * If the `--trace-deprecation` or `--trace-warnings` command-line flags are set, + * or the `process.traceDeprecation` property is set to `true`, a warning and a + * stack trace are printed to `stderr` the first time the deprecated function is + * called. + * + * If the `--throw-deprecation` command-line flag is set, or the`process.throwDeprecation` property is set to `true`, then an exception will be + * thrown when the deprecated function is called. + * + * The `--throw-deprecation` command-line flag and `process.throwDeprecation`property take precedence over `--trace-deprecation` and`process.traceDeprecation`. + * @since v0.8.0 + * @param fn The function that is being deprecated. + * @param msg A warning message to display when the deprecated function is invoked. + * @param code A deprecation code. See the `list of deprecated APIs` for a list of codes. + * @return The deprecated function wrapped to emit a warning. + */ + export function deprecate(fn: T, msg: string, code?: string): T; + /** + * Returns `true` if there is deep strict equality between `val1` and `val2`. + * Otherwise, returns `false`. + * + * See `assert.deepStrictEqual()` for more information about deep strict + * equality. + * @since v9.0.0 + */ + export function isDeepStrictEqual(val1: unknown, val2: unknown): boolean; + /** + * Returns `str` with any ANSI escape codes removed. + * + * ```js + * console.log(util.stripVTControlCharacters('\u001B[4mvalue\u001B[0m')); + * // Prints "value" + * ``` + * @since v16.11.0 + */ + export function stripVTControlCharacters(str: string): string; + /** + * Takes an `async` function (or a function that returns a `Promise`) and returns a + * function following the error-first callback style, i.e. taking + * an `(err, value) => ...` callback as the last argument. In the callback, the + * first argument will be the rejection reason (or `null` if the `Promise`resolved), and the second argument will be the resolved value. + * + * ```js + * const util = require('util'); + * + * async function fn() { + * return 'hello world'; + * } + * const callbackFunction = util.callbackify(fn); + * + * callbackFunction((err, ret) => { + * if (err) throw err; + * console.log(ret); + * }); + * ``` + * + * Will print: + * + * ```text + * hello world + * ``` + * + * The callback is executed asynchronously, and will have a limited stack trace. + * If the callback throws, the process will emit an `'uncaughtException'` event, and if not handled will exit. + * + * Since `null` has a special meaning as the first argument to a callback, if a + * wrapped function rejects a `Promise` with a falsy value as a reason, the value + * is wrapped in an `Error` with the original value stored in a field named`reason`. + * + * ```js + * function fn() { + * return Promise.reject(null); + * } + * const callbackFunction = util.callbackify(fn); + * + * callbackFunction((err, ret) => { + * // When the Promise was rejected with `null` it is wrapped with an Error and + * // the original value is stored in `reason`. + * err && err.hasOwnProperty('reason') && err.reason === null; // true + * }); + * ``` + * @since v8.2.0 + * @param original An `async` function + * @return a callback style function + */ + export function callbackify(fn: () => Promise): (callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify(fn: () => Promise): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + export function callbackify(fn: (arg1: T1) => Promise): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify(fn: (arg1: T1) => Promise): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + export function callbackify(fn: (arg1: T1, arg2: T2) => Promise): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify(fn: (arg1: T1, arg2: T2) => Promise): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + export function callbackify(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3) => Promise + ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + export interface CustomPromisifyLegacy extends Function { + __promisify__: TCustom; + } + export interface CustomPromisifySymbol extends Function { + [promisify.custom]: TCustom; + } + export type CustomPromisify = CustomPromisifySymbol | CustomPromisifyLegacy; + /** + * Takes a function following the common error-first callback style, i.e. taking + * an `(err, value) => ...` callback as the last argument, and returns a version + * that returns promises. + * + * ```js + * const util = require('util'); + * const fs = require('fs'); + * + * const stat = util.promisify(fs.stat); + * stat('.').then((stats) => { + * // Do something with `stats` + * }).catch((error) => { + * // Handle the error. + * }); + * ``` + * + * Or, equivalently using `async function`s: + * + * ```js + * const util = require('util'); + * const fs = require('fs'); + * + * const stat = util.promisify(fs.stat); + * + * async function callStat() { + * const stats = await stat('.'); + * console.log(`This directory is owned by ${stats.uid}`); + * } + * ``` + * + * If there is an `original[util.promisify.custom]` property present, `promisify`will return its value, see `Custom promisified functions`. + * + * `promisify()` assumes that `original` is a function taking a callback as its + * final argument in all cases. If `original` is not a function, `promisify()`will throw an error. If `original` is a function but its last argument is not + * an error-first callback, it will still be passed an error-first + * callback as its last argument. + * + * Using `promisify()` on class methods or other methods that use `this` may not + * work as expected unless handled specially: + * + * ```js + * const util = require('util'); + * + * class Foo { + * constructor() { + * this.a = 42; + * } + * + * bar(callback) { + * callback(null, this.a); + * } + * } + * + * const foo = new Foo(); + * + * const naiveBar = util.promisify(foo.bar); + * // TypeError: Cannot read property 'a' of undefined + * // naiveBar().then(a => console.log(a)); + * + * naiveBar.call(foo).then((a) => console.log(a)); // '42' + * + * const bindBar = naiveBar.bind(foo); + * bindBar().then((a) => console.log(a)); // '42' + * ``` + * @since v8.0.0 + */ + export function promisify(fn: CustomPromisify): TCustom; + export function promisify(fn: (callback: (err: any, result: TResult) => void) => void): () => Promise; + export function promisify(fn: (callback: (err?: any) => void) => void): () => Promise; + export function promisify(fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void): (arg1: T1) => Promise; + export function promisify(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; + export function promisify(fn: Function): Function; + export namespace promisify { + /** + * That can be used to declare custom promisified variants of functions. + */ + const custom: unique symbol; + } + /** + * An implementation of the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/) `TextDecoder` API. + * + * ```js + * const decoder = new TextDecoder('shift_jis'); + * let string = ''; + * let buffer; + * while (buffer = getNextChunkSomehow()) { + * string += decoder.decode(buffer, { stream: true }); + * } + * string += decoder.decode(); // end-of-stream + * ``` + * @since v8.3.0 + */ + export class TextDecoder { + /** + * The encoding supported by the `TextDecoder` instance. + */ + readonly encoding: string; + /** + * The value will be `true` if decoding errors result in a `TypeError` being + * thrown. + */ + readonly fatal: boolean; + /** + * The value will be `true` if the decoding result will include the byte order + * mark. + */ + readonly ignoreBOM: boolean; + constructor( + encoding?: string, + options?: { + fatal?: boolean | undefined; + ignoreBOM?: boolean | undefined; + } + ); + /** + * Decodes the `input` and returns a string. If `options.stream` is `true`, any + * incomplete byte sequences occurring at the end of the `input` are buffered + * internally and emitted after the next call to `textDecoder.decode()`. + * + * If `textDecoder.fatal` is `true`, decoding errors that occur will result in a`TypeError` being thrown. + * @param input An `ArrayBuffer`, `DataView` or `TypedArray` instance containing the encoded data. + */ + decode( + input?: NodeJS.ArrayBufferView | ArrayBuffer | null, + options?: { + stream?: boolean | undefined; + } + ): string; + } + export interface EncodeIntoResult { + /** + * The read Unicode code units of input. + */ + read: number; + /** + * The written UTF-8 bytes of output. + */ + written: number; + } + export { types }; + /** + * An implementation of the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/) `TextEncoder` API. All + * instances of `TextEncoder` only support UTF-8 encoding. + * + * ```js + * const encoder = new TextEncoder(); + * const uint8array = encoder.encode('this is some data'); + * ``` + * + * The `TextEncoder` class is also available on the global object. + * @since v8.3.0 + */ + export class TextEncoder { + /** + * The encoding supported by the `TextEncoder` instance. Always set to `'utf-8'`. + */ + readonly encoding: string; + /** + * UTF-8 encodes the `input` string and returns a `Uint8Array` containing the + * encoded bytes. + * @param [input='an empty string'] The text to encode. + */ + encode(input?: string): Uint8Array; + /** + * UTF-8 encodes the `src` string to the `dest` Uint8Array and returns an object + * containing the read Unicode code units and written UTF-8 bytes. + * + * ```js + * const encoder = new TextEncoder(); + * const src = 'this is some data'; + * const dest = new Uint8Array(10); + * const { read, written } = encoder.encodeInto(src, dest); + * ``` + * @param src The text to encode. + * @param dest The array to hold the encode result. + */ + encodeInto(src: string, dest: Uint8Array): EncodeIntoResult; + } +} +declare module 'util/types' { + export * from 'util/types'; +} +declare module 'util/types' { + import { KeyObject, webcrypto } from 'node:crypto'; + /** + * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) or + * [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance. + * + * See also `util.types.isArrayBuffer()` and `util.types.isSharedArrayBuffer()`. + * + * ```js + * util.types.isAnyArrayBuffer(new ArrayBuffer()); // Returns true + * util.types.isAnyArrayBuffer(new SharedArrayBuffer()); // Returns true + * ``` + * @since v10.0.0 + */ + function isAnyArrayBuffer(object: unknown): object is ArrayBufferLike; + /** + * Returns `true` if the value is an `arguments` object. + * + * ```js + * function foo() { + * util.types.isArgumentsObject(arguments); // Returns true + * } + * ``` + * @since v10.0.0 + */ + function isArgumentsObject(object: unknown): object is IArguments; + /** + * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instance. + * This does _not_ include [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instances. Usually, it is + * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that. + * + * ```js + * util.types.isArrayBuffer(new ArrayBuffer()); // Returns true + * util.types.isArrayBuffer(new SharedArrayBuffer()); // Returns false + * ``` + * @since v10.0.0 + */ + function isArrayBuffer(object: unknown): object is ArrayBuffer; + /** + * Returns `true` if the value is an instance of one of the [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) views, such as typed + * array objects or [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView). Equivalent to + * [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). + * + * ```js + * util.types.isArrayBufferView(new Int8Array()); // true + * util.types.isArrayBufferView(Buffer.from('hello world')); // true + * util.types.isArrayBufferView(new DataView(new ArrayBuffer(16))); // true + * util.types.isArrayBufferView(new ArrayBuffer()); // false + * ``` + * @since v10.0.0 + */ + function isArrayBufferView(object: unknown): object is NodeJS.ArrayBufferView; + /** + * Returns `true` if the value is an [async function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function). + * This only reports back what the JavaScript engine is seeing; + * in particular, the return value may not match the original source code if + * a transpilation tool was used. + * + * ```js + * util.types.isAsyncFunction(function foo() {}); // Returns false + * util.types.isAsyncFunction(async function foo() {}); // Returns true + * ``` + * @since v10.0.0 + */ + function isAsyncFunction(object: unknown): boolean; + /** + * Returns `true` if the value is a `BigInt64Array` instance. + * + * ```js + * util.types.isBigInt64Array(new BigInt64Array()); // Returns true + * util.types.isBigInt64Array(new BigUint64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isBigInt64Array(value: unknown): value is BigInt64Array; + /** + * Returns `true` if the value is a `BigUint64Array` instance. + * + * ```js + * util.types.isBigUint64Array(new BigInt64Array()); // Returns false + * util.types.isBigUint64Array(new BigUint64Array()); // Returns true + * ``` + * @since v10.0.0 + */ + function isBigUint64Array(value: unknown): value is BigUint64Array; + /** + * Returns `true` if the value is a boolean object, e.g. created + * by `new Boolean()`. + * + * ```js + * util.types.isBooleanObject(false); // Returns false + * util.types.isBooleanObject(true); // Returns false + * util.types.isBooleanObject(new Boolean(false)); // Returns true + * util.types.isBooleanObject(new Boolean(true)); // Returns true + * util.types.isBooleanObject(Boolean(false)); // Returns false + * util.types.isBooleanObject(Boolean(true)); // Returns false + * ``` + * @since v10.0.0 + */ + function isBooleanObject(object: unknown): object is Boolean; + /** + * Returns `true` if the value is any boxed primitive object, e.g. created + * by `new Boolean()`, `new String()` or `Object(Symbol())`. + * + * For example: + * + * ```js + * util.types.isBoxedPrimitive(false); // Returns false + * util.types.isBoxedPrimitive(new Boolean(false)); // Returns true + * util.types.isBoxedPrimitive(Symbol('foo')); // Returns false + * util.types.isBoxedPrimitive(Object(Symbol('foo'))); // Returns true + * util.types.isBoxedPrimitive(Object(BigInt(5))); // Returns true + * ``` + * @since v10.11.0 + */ + function isBoxedPrimitive(object: unknown): object is String | Number | BigInt | Boolean | Symbol; + /** + * Returns `true` if the value is a built-in [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView) instance. + * + * ```js + * const ab = new ArrayBuffer(20); + * util.types.isDataView(new DataView(ab)); // Returns true + * util.types.isDataView(new Float64Array()); // Returns false + * ``` + * + * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). + * @since v10.0.0 + */ + function isDataView(object: unknown): object is DataView; + /** + * Returns `true` if the value is a built-in [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) instance. + * + * ```js + * util.types.isDate(new Date()); // Returns true + * ``` + * @since v10.0.0 + */ + function isDate(object: unknown): object is Date; + /** + * Returns `true` if the value is a native `External` value. + * + * A native `External` value is a special type of object that contains a + * raw C++ pointer (`void*`) for access from native code, and has no other + * properties. Such objects are created either by Node.js internals or native + * addons. In JavaScript, they are [frozen](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze) objects with a`null` prototype. + * + * ```c + * #include + * #include + * napi_value result; + * static napi_value MyNapi(napi_env env, napi_callback_info info) { + * int* raw = (int*) malloc(1024); + * napi_status status = napi_create_external(env, (void*) raw, NULL, NULL, &result); + * if (status != napi_ok) { + * napi_throw_error(env, NULL, "napi_create_external failed"); + * return NULL; + * } + * return result; + * } + * ... + * DECLARE_NAPI_PROPERTY("myNapi", MyNapi) + * ... + * ``` + * + * ```js + * const native = require('napi_addon.node'); + * const data = native.myNapi(); + * util.types.isExternal(data); // returns true + * util.types.isExternal(0); // returns false + * util.types.isExternal(new String('foo')); // returns false + * ``` + * + * For further information on `napi_create_external`, refer to `napi_create_external()`. + * @since v10.0.0 + */ + function isExternal(object: unknown): boolean; + /** + * Returns `true` if the value is a built-in [`Float32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array) instance. + * + * ```js + * util.types.isFloat32Array(new ArrayBuffer()); // Returns false + * util.types.isFloat32Array(new Float32Array()); // Returns true + * util.types.isFloat32Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isFloat32Array(object: unknown): object is Float32Array; + /** + * Returns `true` if the value is a built-in [`Float64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array) instance. + * + * ```js + * util.types.isFloat64Array(new ArrayBuffer()); // Returns false + * util.types.isFloat64Array(new Uint8Array()); // Returns false + * util.types.isFloat64Array(new Float64Array()); // Returns true + * ``` + * @since v10.0.0 + */ + function isFloat64Array(object: unknown): object is Float64Array; + /** + * Returns `true` if the value is a generator function. + * This only reports back what the JavaScript engine is seeing; + * in particular, the return value may not match the original source code if + * a transpilation tool was used. + * + * ```js + * util.types.isGeneratorFunction(function foo() {}); // Returns false + * util.types.isGeneratorFunction(function* foo() {}); // Returns true + * ``` + * @since v10.0.0 + */ + function isGeneratorFunction(object: unknown): object is GeneratorFunction; + /** + * Returns `true` if the value is a generator object as returned from a + * built-in generator function. + * This only reports back what the JavaScript engine is seeing; + * in particular, the return value may not match the original source code if + * a transpilation tool was used. + * + * ```js + * function* foo() {} + * const generator = foo(); + * util.types.isGeneratorObject(generator); // Returns true + * ``` + * @since v10.0.0 + */ + function isGeneratorObject(object: unknown): object is Generator; + /** + * Returns `true` if the value is a built-in [`Int8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array) instance. + * + * ```js + * util.types.isInt8Array(new ArrayBuffer()); // Returns false + * util.types.isInt8Array(new Int8Array()); // Returns true + * util.types.isInt8Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isInt8Array(object: unknown): object is Int8Array; + /** + * Returns `true` if the value is a built-in [`Int16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array) instance. + * + * ```js + * util.types.isInt16Array(new ArrayBuffer()); // Returns false + * util.types.isInt16Array(new Int16Array()); // Returns true + * util.types.isInt16Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isInt16Array(object: unknown): object is Int16Array; + /** + * Returns `true` if the value is a built-in [`Int32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array) instance. + * + * ```js + * util.types.isInt32Array(new ArrayBuffer()); // Returns false + * util.types.isInt32Array(new Int32Array()); // Returns true + * util.types.isInt32Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isInt32Array(object: unknown): object is Int32Array; + /** + * Returns `true` if the value is a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance. + * + * ```js + * util.types.isMap(new Map()); // Returns true + * ``` + * @since v10.0.0 + */ + function isMap(object: T | {}): object is T extends ReadonlyMap ? (unknown extends T ? never : ReadonlyMap) : Map; + /** + * Returns `true` if the value is an iterator returned for a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance. + * + * ```js + * const map = new Map(); + * util.types.isMapIterator(map.keys()); // Returns true + * util.types.isMapIterator(map.values()); // Returns true + * util.types.isMapIterator(map.entries()); // Returns true + * util.types.isMapIterator(map[Symbol.iterator]()); // Returns true + * ``` + * @since v10.0.0 + */ + function isMapIterator(object: unknown): boolean; + /** + * Returns `true` if the value is an instance of a [Module Namespace Object](https://tc39.github.io/ecma262/#sec-module-namespace-exotic-objects). + * + * ```js + * import * as ns from './a.js'; + * + * util.types.isModuleNamespaceObject(ns); // Returns true + * ``` + * @since v10.0.0 + */ + function isModuleNamespaceObject(value: unknown): boolean; + /** + * Returns `true` if the value is an instance of a built-in `Error` type. + * + * ```js + * util.types.isNativeError(new Error()); // Returns true + * util.types.isNativeError(new TypeError()); // Returns true + * util.types.isNativeError(new RangeError()); // Returns true + * ``` + * @since v10.0.0 + */ + function isNativeError(object: unknown): object is Error; + /** + * Returns `true` if the value is a number object, e.g. created + * by `new Number()`. + * + * ```js + * util.types.isNumberObject(0); // Returns false + * util.types.isNumberObject(new Number(0)); // Returns true + * ``` + * @since v10.0.0 + */ + function isNumberObject(object: unknown): object is Number; + /** + * Returns `true` if the value is a built-in [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). + * + * ```js + * util.types.isPromise(Promise.resolve(42)); // Returns true + * ``` + * @since v10.0.0 + */ + function isPromise(object: unknown): object is Promise; + /** + * Returns `true` if the value is a [`Proxy`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) instance. + * + * ```js + * const target = {}; + * const proxy = new Proxy(target, {}); + * util.types.isProxy(target); // Returns false + * util.types.isProxy(proxy); // Returns true + * ``` + * @since v10.0.0 + */ + function isProxy(object: unknown): boolean; + /** + * Returns `true` if the value is a regular expression object. + * + * ```js + * util.types.isRegExp(/abc/); // Returns true + * util.types.isRegExp(new RegExp('abc')); // Returns true + * ``` + * @since v10.0.0 + */ + function isRegExp(object: unknown): object is RegExp; + /** + * Returns `true` if the value is a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance. + * + * ```js + * util.types.isSet(new Set()); // Returns true + * ``` + * @since v10.0.0 + */ + function isSet(object: T | {}): object is T extends ReadonlySet ? (unknown extends T ? never : ReadonlySet) : Set; + /** + * Returns `true` if the value is an iterator returned for a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance. + * + * ```js + * const set = new Set(); + * util.types.isSetIterator(set.keys()); // Returns true + * util.types.isSetIterator(set.values()); // Returns true + * util.types.isSetIterator(set.entries()); // Returns true + * util.types.isSetIterator(set[Symbol.iterator]()); // Returns true + * ``` + * @since v10.0.0 + */ + function isSetIterator(object: unknown): boolean; + /** + * Returns `true` if the value is a built-in [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance. + * This does _not_ include [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instances. Usually, it is + * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that. + * + * ```js + * util.types.isSharedArrayBuffer(new ArrayBuffer()); // Returns false + * util.types.isSharedArrayBuffer(new SharedArrayBuffer()); // Returns true + * ``` + * @since v10.0.0 + */ + function isSharedArrayBuffer(object: unknown): object is SharedArrayBuffer; + /** + * Returns `true` if the value is a string object, e.g. created + * by `new String()`. + * + * ```js + * util.types.isStringObject('foo'); // Returns false + * util.types.isStringObject(new String('foo')); // Returns true + * ``` + * @since v10.0.0 + */ + function isStringObject(object: unknown): object is String; + /** + * Returns `true` if the value is a symbol object, created + * by calling `Object()` on a `Symbol` primitive. + * + * ```js + * const symbol = Symbol('foo'); + * util.types.isSymbolObject(symbol); // Returns false + * util.types.isSymbolObject(Object(symbol)); // Returns true + * ``` + * @since v10.0.0 + */ + function isSymbolObject(object: unknown): object is Symbol; + /** + * Returns `true` if the value is a built-in [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) instance. + * + * ```js + * util.types.isTypedArray(new ArrayBuffer()); // Returns false + * util.types.isTypedArray(new Uint8Array()); // Returns true + * util.types.isTypedArray(new Float64Array()); // Returns true + * ``` + * + * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). + * @since v10.0.0 + */ + function isTypedArray(object: unknown): object is NodeJS.TypedArray; + /** + * Returns `true` if the value is a built-in [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) instance. + * + * ```js + * util.types.isUint8Array(new ArrayBuffer()); // Returns false + * util.types.isUint8Array(new Uint8Array()); // Returns true + * util.types.isUint8Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isUint8Array(object: unknown): object is Uint8Array; + /** + * Returns `true` if the value is a built-in [`Uint8ClampedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray) instance. + * + * ```js + * util.types.isUint8ClampedArray(new ArrayBuffer()); // Returns false + * util.types.isUint8ClampedArray(new Uint8ClampedArray()); // Returns true + * util.types.isUint8ClampedArray(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isUint8ClampedArray(object: unknown): object is Uint8ClampedArray; + /** + * Returns `true` if the value is a built-in [`Uint16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array) instance. + * + * ```js + * util.types.isUint16Array(new ArrayBuffer()); // Returns false + * util.types.isUint16Array(new Uint16Array()); // Returns true + * util.types.isUint16Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isUint16Array(object: unknown): object is Uint16Array; + /** + * Returns `true` if the value is a built-in [`Uint32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array) instance. + * + * ```js + * util.types.isUint32Array(new ArrayBuffer()); // Returns false + * util.types.isUint32Array(new Uint32Array()); // Returns true + * util.types.isUint32Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isUint32Array(object: unknown): object is Uint32Array; + /** + * Returns `true` if the value is a built-in [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) instance. + * + * ```js + * util.types.isWeakMap(new WeakMap()); // Returns true + * ``` + * @since v10.0.0 + */ + function isWeakMap(object: unknown): object is WeakMap; + /** + * Returns `true` if the value is a built-in [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) instance. + * + * ```js + * util.types.isWeakSet(new WeakSet()); // Returns true + * ``` + * @since v10.0.0 + */ + function isWeakSet(object: unknown): object is WeakSet; + /** + * Returns `true` if `value` is a `KeyObject`, `false` otherwise. + * @since v16.2.0 + */ + function isKeyObject(object: unknown): object is KeyObject; + /** + * Returns `true` if `value` is a `CryptoKey`, `false` otherwise. + * @since v16.2.0 + */ + function isCryptoKey(object: unknown): object is webcrypto.CryptoKey; +} +declare module 'node:util' { + export * from 'util'; +} +declare module 'node:util/types' { + export * from 'util/types'; +} diff --git a/frontend/node_modules/@types/node/v8.d.ts b/frontend/node_modules/@types/node/v8.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f467fccf8d784d6d9e88086a5c4a203ad92349cb --- /dev/null +++ b/frontend/node_modules/@types/node/v8.d.ts @@ -0,0 +1,378 @@ +/** + * The `v8` module exposes APIs that are specific to the version of [V8](https://developers.google.com/v8/) built into the Node.js binary. It can be accessed using: + * + * ```js + * const v8 = require('v8'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/v8.js) + */ +declare module 'v8' { + import { Readable } from 'node:stream'; + interface HeapSpaceInfo { + space_name: string; + space_size: number; + space_used_size: number; + space_available_size: number; + physical_space_size: number; + } + // ** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */ + type DoesZapCodeSpaceFlag = 0 | 1; + interface HeapInfo { + total_heap_size: number; + total_heap_size_executable: number; + total_physical_size: number; + total_available_size: number; + used_heap_size: number; + heap_size_limit: number; + malloced_memory: number; + peak_malloced_memory: number; + does_zap_garbage: DoesZapCodeSpaceFlag; + number_of_native_contexts: number; + number_of_detached_contexts: number; + } + interface HeapCodeStatistics { + code_and_metadata_size: number; + bytecode_and_metadata_size: number; + external_script_source_size: number; + } + /** + * Returns an integer representing a version tag derived from the V8 version, + * command-line flags, and detected CPU features. This is useful for determining + * whether a `vm.Script` `cachedData` buffer is compatible with this instance + * of V8. + * + * ```js + * console.log(v8.cachedDataVersionTag()); // 3947234607 + * // The value returned by v8.cachedDataVersionTag() is derived from the V8 + * // version, command-line flags, and detected CPU features. Test that the value + * // does indeed update when flags are toggled. + * v8.setFlagsFromString('--allow_natives_syntax'); + * console.log(v8.cachedDataVersionTag()); // 183726201 + * ``` + * @since v8.0.0 + */ + function cachedDataVersionTag(): number; + /** + * Returns an object with the following properties: + * + * `does_zap_garbage` is a 0/1 boolean, which signifies whether the`--zap_code_space` option is enabled or not. This makes V8 overwrite heap + * garbage with a bit pattern. The RSS footprint (resident set size) gets bigger + * because it continuously touches all heap pages and that makes them less likely + * to get swapped out by the operating system. + * + * `number_of_native_contexts` The value of native\_context is the number of the + * top-level contexts currently active. Increase of this number over time indicates + * a memory leak. + * + * `number_of_detached_contexts` The value of detached\_context is the number + * of contexts that were detached and not yet garbage collected. This number + * being non-zero indicates a potential memory leak. + * + * ```js + * { + * total_heap_size: 7326976, + * total_heap_size_executable: 4194304, + * total_physical_size: 7326976, + * total_available_size: 1152656, + * used_heap_size: 3476208, + * heap_size_limit: 1535115264, + * malloced_memory: 16384, + * peak_malloced_memory: 1127496, + * does_zap_garbage: 0, + * number_of_native_contexts: 1, + * number_of_detached_contexts: 0 + * } + * ``` + * @since v1.0.0 + */ + function getHeapStatistics(): HeapInfo; + /** + * Returns statistics about the V8 heap spaces, i.e. the segments which make up + * the V8 heap. Neither the ordering of heap spaces, nor the availability of a + * heap space can be guaranteed as the statistics are provided via the + * V8[`GetHeapSpaceStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#ac673576f24fdc7a33378f8f57e1d13a4) function and may change from one V8 version to the + * next. + * + * The value returned is an array of objects containing the following properties: + * + * ```json + * [ + * { + * "space_name": "new_space", + * "space_size": 2063872, + * "space_used_size": 951112, + * "space_available_size": 80824, + * "physical_space_size": 2063872 + * }, + * { + * "space_name": "old_space", + * "space_size": 3090560, + * "space_used_size": 2493792, + * "space_available_size": 0, + * "physical_space_size": 3090560 + * }, + * { + * "space_name": "code_space", + * "space_size": 1260160, + * "space_used_size": 644256, + * "space_available_size": 960, + * "physical_space_size": 1260160 + * }, + * { + * "space_name": "map_space", + * "space_size": 1094160, + * "space_used_size": 201608, + * "space_available_size": 0, + * "physical_space_size": 1094160 + * }, + * { + * "space_name": "large_object_space", + * "space_size": 0, + * "space_used_size": 0, + * "space_available_size": 1490980608, + * "physical_space_size": 0 + * } + * ] + * ``` + * @since v6.0.0 + */ + function getHeapSpaceStatistics(): HeapSpaceInfo[]; + /** + * The `v8.setFlagsFromString()` method can be used to programmatically set + * V8 command-line flags. This method should be used with care. Changing settings + * after the VM has started may result in unpredictable behavior, including + * crashes and data loss; or it may simply do nothing. + * + * The V8 options available for a version of Node.js may be determined by running`node --v8-options`. + * + * Usage: + * + * ```js + * // Print GC events to stdout for one minute. + * const v8 = require('v8'); + * v8.setFlagsFromString('--trace_gc'); + * setTimeout(() => { v8.setFlagsFromString('--notrace_gc'); }, 60e3); + * ``` + * @since v1.0.0 + */ + function setFlagsFromString(flags: string): void; + /** + * Generates a snapshot of the current V8 heap and returns a Readable + * Stream that may be used to read the JSON serialized representation. + * This JSON stream format is intended to be used with tools such as + * Chrome DevTools. The JSON schema is undocumented and specific to the + * V8 engine. Therefore, the schema may change from one version of V8 to the next. + * + * ```js + * // Print heap snapshot to the console + * const v8 = require('v8'); + * const stream = v8.getHeapSnapshot(); + * stream.pipe(process.stdout); + * ``` + * @since v11.13.0 + * @return A Readable Stream containing the V8 heap snapshot + */ + function getHeapSnapshot(): Readable; + /** + * Generates a snapshot of the current V8 heap and writes it to a JSON + * file. This file is intended to be used with tools such as Chrome + * DevTools. The JSON schema is undocumented and specific to the V8 + * engine, and may change from one version of V8 to the next. + * + * A heap snapshot is specific to a single V8 isolate. When using `worker threads`, a heap snapshot generated from the main thread will + * not contain any information about the workers, and vice versa. + * + * ```js + * const { writeHeapSnapshot } = require('v8'); + * const { + * Worker, + * isMainThread, + * parentPort + * } = require('worker_threads'); + * + * if (isMainThread) { + * const worker = new Worker(__filename); + * + * worker.once('message', (filename) => { + * console.log(`worker heapdump: ${filename}`); + * // Now get a heapdump for the main thread. + * console.log(`main thread heapdump: ${writeHeapSnapshot()}`); + * }); + * + * // Tell the worker to create a heapdump. + * worker.postMessage('heapdump'); + * } else { + * parentPort.once('message', (message) => { + * if (message === 'heapdump') { + * // Generate a heapdump for the worker + * // and return the filename to the parent. + * parentPort.postMessage(writeHeapSnapshot()); + * } + * }); + * } + * ``` + * @since v11.13.0 + * @param filename The file path where the V8 heap snapshot is to be saved. If not specified, a file name with the pattern `'Heap-${yyyymmdd}-${hhmmss}-${pid}-${thread_id}.heapsnapshot'` will be + * generated, where `{pid}` will be the PID of the Node.js process, `{thread_id}` will be `0` when `writeHeapSnapshot()` is called from the main Node.js thread or the id of a + * worker thread. + * @return The filename where the snapshot was saved. + */ + function writeHeapSnapshot(filename?: string): string; + /** + * Returns an object with the following properties: + * + * ```js + * { + * code_and_metadata_size: 212208, + * bytecode_and_metadata_size: 161368, + * external_script_source_size: 1410794 + * } + * ``` + * @since v12.8.0 + */ + function getHeapCodeStatistics(): HeapCodeStatistics; + /** + * @since v8.0.0 + */ + class Serializer { + /** + * Writes out a header, which includes the serialization format version. + */ + writeHeader(): void; + /** + * Serializes a JavaScript value and adds the serialized representation to the + * internal buffer. + * + * This throws an error if `value` cannot be serialized. + */ + writeValue(val: any): boolean; + /** + * Returns the stored internal buffer. This serializer should not be used once + * the buffer is released. Calling this method results in undefined behavior + * if a previous write has failed. + */ + releaseBuffer(): Buffer; + /** + * Marks an `ArrayBuffer` as having its contents transferred out of band. + * Pass the corresponding `ArrayBuffer` in the deserializing context to `deserializer.transferArrayBuffer()`. + * @param id A 32-bit unsigned integer. + * @param arrayBuffer An `ArrayBuffer` instance. + */ + transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void; + /** + * Write a raw 32-bit unsigned integer. + * For use inside of a custom `serializer._writeHostObject()`. + */ + writeUint32(value: number): void; + /** + * Write a raw 64-bit unsigned integer, split into high and low 32-bit parts. + * For use inside of a custom `serializer._writeHostObject()`. + */ + writeUint64(hi: number, lo: number): void; + /** + * Write a JS `number` value. + * For use inside of a custom `serializer._writeHostObject()`. + */ + writeDouble(value: number): void; + /** + * Write raw bytes into the serializer’s internal buffer. The deserializer + * will require a way to compute the length of the buffer. + * For use inside of a custom `serializer._writeHostObject()`. + */ + writeRawBytes(buffer: NodeJS.TypedArray): void; + } + /** + * A subclass of `Serializer` that serializes `TypedArray`(in particular `Buffer`) and `DataView` objects as host objects, and only + * stores the part of their underlying `ArrayBuffer`s that they are referring to. + * @since v8.0.0 + */ + class DefaultSerializer extends Serializer {} + /** + * @since v8.0.0 + */ + class Deserializer { + constructor(data: NodeJS.TypedArray); + /** + * Reads and validates a header (including the format version). + * May, for example, reject an invalid or unsupported wire format. In that case, + * an `Error` is thrown. + */ + readHeader(): boolean; + /** + * Deserializes a JavaScript value from the buffer and returns it. + */ + readValue(): any; + /** + * Marks an `ArrayBuffer` as having its contents transferred out of band. + * Pass the corresponding `ArrayBuffer` in the serializing context to `serializer.transferArrayBuffer()` (or return the `id` from `serializer._getSharedArrayBufferId()` in the case of + * `SharedArrayBuffer`s). + * @param id A 32-bit unsigned integer. + * @param arrayBuffer An `ArrayBuffer` instance. + */ + transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void; + /** + * Reads the underlying wire format version. Likely mostly to be useful to + * legacy code reading old wire format versions. May not be called before`.readHeader()`. + */ + getWireFormatVersion(): number; + /** + * Read a raw 32-bit unsigned integer and return it. + * For use inside of a custom `deserializer._readHostObject()`. + */ + readUint32(): number; + /** + * Read a raw 64-bit unsigned integer and return it as an array `[hi, lo]`with two 32-bit unsigned integer entries. + * For use inside of a custom `deserializer._readHostObject()`. + */ + readUint64(): [number, number]; + /** + * Read a JS `number` value. + * For use inside of a custom `deserializer._readHostObject()`. + */ + readDouble(): number; + /** + * Read raw bytes from the deserializer’s internal buffer. The `length` parameter + * must correspond to the length of the buffer that was passed to `serializer.writeRawBytes()`. + * For use inside of a custom `deserializer._readHostObject()`. + */ + readRawBytes(length: number): Buffer; + } + /** + * A subclass of `Deserializer` corresponding to the format written by `DefaultSerializer`. + * @since v8.0.0 + */ + class DefaultDeserializer extends Deserializer {} + /** + * Uses a `DefaultSerializer` to serialize `value` into a buffer. + * @since v8.0.0 + */ + function serialize(value: any): Buffer; + /** + * Uses a `DefaultDeserializer` with default options to read a JS value + * from a buffer. + * @since v8.0.0 + * @param buffer A buffer returned by {@link serialize}. + */ + function deserialize(buffer: NodeJS.TypedArray): any; + /** + * The `v8.takeCoverage()` method allows the user to write the coverage started by `NODE_V8_COVERAGE` to disk on demand. This method can be invoked multiple + * times during the lifetime of the process. Each time the execution counter will + * be reset and a new coverage report will be written to the directory specified + * by `NODE_V8_COVERAGE`. + * + * When the process is about to exit, one last coverage will still be written to + * disk unless {@link stopCoverage} is invoked before the process exits. + * @since v15.1.0, v12.22.0 + */ + function takeCoverage(): void; + /** + * The `v8.stopCoverage()` method allows the user to stop the coverage collection + * started by `NODE_V8_COVERAGE`, so that V8 can release the execution count + * records and optimize code. This can be used in conjunction with {@link takeCoverage} if the user wants to collect the coverage on demand. + * @since v15.1.0, v12.22.0 + */ + function stopCoverage(): void; +} +declare module 'node:v8' { + export * from 'v8'; +} diff --git a/frontend/node_modules/@types/node/vm.d.ts b/frontend/node_modules/@types/node/vm.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a46b39190ba43447a3a66b4ba590c2804bfbddc3 --- /dev/null +++ b/frontend/node_modules/@types/node/vm.d.ts @@ -0,0 +1,507 @@ +/** + * The `vm` module enables compiling and running code within V8 Virtual + * Machine contexts. **The `vm` module is not a security mechanism. Do** + * **not use it to run untrusted code.** + * + * JavaScript code can be compiled and run immediately or + * compiled, saved, and run later. + * + * A common use case is to run the code in a different V8 Context. This means + * invoked code has a different global object than the invoking code. + * + * One can provide the context by `contextifying` an + * object. The invoked code treats any property in the context like a + * global variable. Any changes to global variables caused by the invoked + * code are reflected in the context object. + * + * ```js + * const vm = require('vm'); + * + * const x = 1; + * + * const context = { x: 2 }; + * vm.createContext(context); // Contextify the object. + * + * const code = 'x += 40; var y = 17;'; + * // `x` and `y` are global variables in the context. + * // Initially, x has the value 2 because that is the value of context.x. + * vm.runInContext(code, context); + * + * console.log(context.x); // 42 + * console.log(context.y); // 17 + * + * console.log(x); // 1; y is not defined. + * ``` + * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/vm.js) + */ +declare module 'vm' { + interface Context extends NodeJS.Dict {} + interface BaseOptions { + /** + * Specifies the filename used in stack traces produced by this script. + * Default: `''`. + */ + filename?: string | undefined; + /** + * Specifies the line number offset that is displayed in stack traces produced by this script. + * Default: `0`. + */ + lineOffset?: number | undefined; + /** + * Specifies the column number offset that is displayed in stack traces produced by this script. + * @default 0 + */ + columnOffset?: number | undefined; + } + interface ScriptOptions extends BaseOptions { + displayErrors?: boolean | undefined; + timeout?: number | undefined; + cachedData?: Buffer | undefined; + /** @deprecated in favor of `script.createCachedData()` */ + produceCachedData?: boolean | undefined; + } + interface RunningScriptOptions extends BaseOptions { + /** + * When `true`, if an `Error` occurs while compiling the `code`, the line of code causing the error is attached to the stack trace. + * Default: `true`. + */ + displayErrors?: boolean | undefined; + /** + * Specifies the number of milliseconds to execute code before terminating execution. + * If execution is terminated, an `Error` will be thrown. This value must be a strictly positive integer. + */ + timeout?: number | undefined; + /** + * If `true`, the execution will be terminated when `SIGINT` (Ctrl+C) is received. + * Existing handlers for the event that have been attached via `process.on('SIGINT')` will be disabled during script execution, but will continue to work after that. + * If execution is terminated, an `Error` will be thrown. + * Default: `false`. + */ + breakOnSigint?: boolean | undefined; + /** + * If set to `afterEvaluate`, microtasks will be run immediately after the script has run. + */ + microtaskMode?: 'afterEvaluate' | undefined; + } + interface CompileFunctionOptions extends BaseOptions { + /** + * Provides an optional data with V8's code cache data for the supplied source. + */ + cachedData?: Buffer | undefined; + /** + * Specifies whether to produce new cache data. + * Default: `false`, + */ + produceCachedData?: boolean | undefined; + /** + * The sandbox/context in which the said function should be compiled in. + */ + parsingContext?: Context | undefined; + /** + * An array containing a collection of context extensions (objects wrapping the current scope) to be applied while compiling + */ + contextExtensions?: Object[] | undefined; + } + interface CreateContextOptions { + /** + * Human-readable name of the newly created context. + * @default 'VM Context i' Where i is an ascending numerical index of the created context. + */ + name?: string | undefined; + /** + * Corresponds to the newly created context for display purposes. + * The origin should be formatted like a `URL`, but with only the scheme, host, and port (if necessary), + * like the value of the `url.origin` property of a URL object. + * Most notably, this string should omit the trailing slash, as that denotes a path. + * @default '' + */ + origin?: string | undefined; + codeGeneration?: + | { + /** + * If set to false any calls to eval or function constructors (Function, GeneratorFunction, etc) + * will throw an EvalError. + * @default true + */ + strings?: boolean | undefined; + /** + * If set to false any attempt to compile a WebAssembly module will throw a WebAssembly.CompileError. + * @default true + */ + wasm?: boolean | undefined; + } + | undefined; + /** + * If set to `afterEvaluate`, microtasks will be run immediately after the script has run. + */ + microtaskMode?: 'afterEvaluate' | undefined; + } + type MeasureMemoryMode = 'summary' | 'detailed'; + interface MeasureMemoryOptions { + /** + * @default 'summary' + */ + mode?: MeasureMemoryMode | undefined; + context?: Context | undefined; + } + interface MemoryMeasurement { + total: { + jsMemoryEstimate: number; + jsMemoryRange: [number, number]; + }; + } + /** + * Instances of the `vm.Script` class contain precompiled scripts that can be + * executed in specific contexts. + * @since v0.3.1 + */ + class Script { + constructor(code: string, options?: ScriptOptions); + /** + * Runs the compiled code contained by the `vm.Script` object within the given`contextifiedObject` and returns the result. Running code does not have access + * to local scope. + * + * The following example compiles code that increments a global variable, sets + * the value of another global variable, then execute the code multiple times. + * The globals are contained in the `context` object. + * + * ```js + * const vm = require('vm'); + * + * const context = { + * animal: 'cat', + * count: 2 + * }; + * + * const script = new vm.Script('count += 1; name = "kitty";'); + * + * vm.createContext(context); + * for (let i = 0; i < 10; ++i) { + * script.runInContext(context); + * } + * + * console.log(context); + * // Prints: { animal: 'cat', count: 12, name: 'kitty' } + * ``` + * + * Using the `timeout` or `breakOnSigint` options will result in new event loops + * and corresponding threads being started, which have a non-zero performance + * overhead. + * @since v0.3.1 + * @param contextifiedObject A `contextified` object as returned by the `vm.createContext()` method. + * @return the result of the very last statement executed in the script. + */ + runInContext(contextifiedObject: Context, options?: RunningScriptOptions): any; + /** + * First contextifies the given `contextObject`, runs the compiled code contained + * by the `vm.Script` object within the created context, and returns the result. + * Running code does not have access to local scope. + * + * The following example compiles code that sets a global variable, then executes + * the code multiple times in different contexts. The globals are set on and + * contained within each individual `context`. + * + * ```js + * const vm = require('vm'); + * + * const script = new vm.Script('globalVar = "set"'); + * + * const contexts = [{}, {}, {}]; + * contexts.forEach((context) => { + * script.runInNewContext(context); + * }); + * + * console.log(contexts); + * // Prints: [{ globalVar: 'set' }, { globalVar: 'set' }, { globalVar: 'set' }] + * ``` + * @since v0.3.1 + * @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created. + * @return the result of the very last statement executed in the script. + */ + runInNewContext(contextObject?: Context, options?: RunningScriptOptions): any; + /** + * Runs the compiled code contained by the `vm.Script` within the context of the + * current `global` object. Running code does not have access to local scope, but_does_ have access to the current `global` object. + * + * The following example compiles code that increments a `global` variable then + * executes that code multiple times: + * + * ```js + * const vm = require('vm'); + * + * global.globalVar = 0; + * + * const script = new vm.Script('globalVar += 1', { filename: 'myfile.vm' }); + * + * for (let i = 0; i < 1000; ++i) { + * script.runInThisContext(); + * } + * + * console.log(globalVar); + * + * // 1000 + * ``` + * @since v0.3.1 + * @return the result of the very last statement executed in the script. + */ + runInThisContext(options?: RunningScriptOptions): any; + /** + * Creates a code cache that can be used with the `Script` constructor's`cachedData` option. Returns a `Buffer`. This method may be called at any + * time and any number of times. + * + * ```js + * const script = new vm.Script(` + * function add(a, b) { + * return a + b; + * } + * + * const x = add(1, 2); + * `); + * + * const cacheWithoutX = script.createCachedData(); + * + * script.runInThisContext(); + * + * const cacheWithX = script.createCachedData(); + * ``` + * @since v10.6.0 + */ + createCachedData(): Buffer; + /** @deprecated in favor of `script.createCachedData()` */ + cachedDataProduced?: boolean | undefined; + cachedDataRejected?: boolean | undefined; + cachedData?: Buffer | undefined; + } + /** + * If given a `contextObject`, the `vm.createContext()` method will `prepare + * that object` so that it can be used in calls to {@link runInContext} or `script.runInContext()`. Inside such scripts, + * the `contextObject` will be the global object, retaining all of its existing + * properties but also having the built-in objects and functions any standard [global object](https://es5.github.io/#x15.1) has. Outside of scripts run by the vm module, global variables + * will remain unchanged. + * + * ```js + * const vm = require('vm'); + * + * global.globalVar = 3; + * + * const context = { globalVar: 1 }; + * vm.createContext(context); + * + * vm.runInContext('globalVar *= 2;', context); + * + * console.log(context); + * // Prints: { globalVar: 2 } + * + * console.log(global.globalVar); + * // Prints: 3 + * ``` + * + * If `contextObject` is omitted (or passed explicitly as `undefined`), a new, + * empty `contextified` object will be returned. + * + * The `vm.createContext()` method is primarily useful for creating a single + * context that can be used to run multiple scripts. For instance, if emulating a + * web browser, the method can be used to create a single context representing a + * window's global object, then run all ` \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/node_modules/tslib/tslib.es6.js b/frontend/node_modules/apache-arrow/node_modules/tslib/tslib.es6.js new file mode 100644 index 0000000000000000000000000000000000000000..7fdec025453847d8198104e9b7a422b648c17ed4 --- /dev/null +++ b/frontend/node_modules/apache-arrow/node_modules/tslib/tslib.es6.js @@ -0,0 +1,218 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global Reflect, Promise */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +export function __extends(d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +export var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +export function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +export function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +export function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +export function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +export function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +export function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +export function __createBinding(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +} + +export function __exportStar(m, exports) { + for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; +} + +export function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +export function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +export function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +export function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +}; + +export function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +export function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +export function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } +} + +export function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +export function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +export function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result.default = mod; + return result; +} + +export function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +export function __classPrivateFieldGet(receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); +} + +export function __classPrivateFieldSet(receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; +} diff --git a/frontend/node_modules/apache-arrow/node_modules/tslib/tslib.html b/frontend/node_modules/apache-arrow/node_modules/tslib/tslib.html new file mode 100644 index 0000000000000000000000000000000000000000..44c9ba51e3547ad1b7a9244f14703ab681519619 --- /dev/null +++ b/frontend/node_modules/apache-arrow/node_modules/tslib/tslib.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/node_modules/tslib/tslib.js b/frontend/node_modules/apache-arrow/node_modules/tslib/tslib.js new file mode 100644 index 0000000000000000000000000000000000000000..fbce0186f246229c9ecc0f6fa6c080770abfc346 --- /dev/null +++ b/frontend/node_modules/apache-arrow/node_modules/tslib/tslib.js @@ -0,0 +1,284 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __createBinding; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if (typeof module === "object" && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + + __extends = function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __awaiter = function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + + __createBinding = function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }; + + __exportStar = function (m, exports) { + for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; + }; + + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; + + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); +}); diff --git a/frontend/node_modules/apache-arrow/package.json b/frontend/node_modules/apache-arrow/package.json new file mode 100644 index 0000000000000000000000000000000000000000..febb460ecb4c5089c3e6245c3395db6ca39dc29d --- /dev/null +++ b/frontend/node_modules/apache-arrow/package.json @@ -0,0 +1,44 @@ +{ + "version": "0.17.0", + "name": "apache-arrow", + "unpkg": "Arrow.es5.min.js", + "jsdelivr": "Arrow.es5.min.js", + "browser": "Arrow.dom", + "main": "Arrow.node", + "module": "Arrow.dom.mjs", + "esm": { + "mode": "all", + "sourceMap": true + }, + "types": "Arrow.node.d.ts", + "license": "Apache-2.0", + "description": "Apache Arrow columnar in-memory format", + "author": "Apache Software Foundation", + "homepage": "https://github.com/apache/arrow/blob/master/js/README.md", + "repository": { + "type": "git", + "url": "git+https://github.com/apache/arrow.git" + }, + "bugs": { + "url": "https://issues.apache.org/jira/projects/ARROW" + }, + "keywords": [ + "apache", + "arrow" + ], + "dependencies": { + "@types/flatbuffers": "^1.9.1", + "@types/node": "^12.0.4", + "@types/text-encoding-utf-8": "^1.0.1", + "command-line-args": "5.0.2", + "command-line-usage": "5.0.5", + "flatbuffers": "1.11.0", + "json-bignum": "^0.0.3", + "pad-left": "^2.1.0", + "text-encoding-utf-8": "^1.0.2", + "tslib": "^1.9.3" + }, + "bin": { + "arrow2csv": "bin/arrow2csv.js" + } +} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/recordbatch.d.ts b/frontend/node_modules/apache-arrow/recordbatch.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c3724981219bde109b5339d0e3f8a78e09ac76db --- /dev/null +++ b/frontend/node_modules/apache-arrow/recordbatch.d.ts @@ -0,0 +1,66 @@ +import { Data } from './data'; +import { Table } from './table'; +import { Vector } from './vector'; +import { Schema, Field } from './schema'; +import { DataType, Struct } from './type'; +import { Clonable, Sliceable, Applicative } from './vector'; +import { StructVector, VectorBuilderOptions, VectorBuilderOptionsAsync } from './vector/index'; +declare type VectorMap = { + [key: string]: Vector; +}; +declare type Fields = (keyof T)[] | Field[]; +declare type ChildData = (Data | Vector)[]; +export interface RecordBatch { + concat(...others: Vector>[]): Table; + slice(begin?: number, end?: number): RecordBatch; + clone(data: Data>, children?: Vector[]): RecordBatch; +} +export declare class RecordBatch extends StructVector implements Clonable>, Sliceable>, Applicative, Table> { + static from(options: VectorBuilderOptions, TNull>): Table; + static from(options: VectorBuilderOptionsAsync, TNull>): Promise>; + static new(children: T): RecordBatch<{ + [P in keyof T]: T[P]['type']; + }>; + static new(children: ChildData, fields?: Fields): RecordBatch; + protected _schema: Schema; + protected _dictionaries?: Map; + constructor(schema: Schema, length: number, children: (Data | Vector)[]); + constructor(schema: Schema, data: Data>, children?: Vector[]); + readonly schema: Schema; + readonly numCols: number; + readonly dictionaries: Map>; + select(...columnNames: K[]): RecordBatch<{ + [key: string]: any; + }>; + selectAt(...columnIndices: number[]): RecordBatch<{ + [key: string]: K; + }>; +} +/** + * An internal class used by the `RecordBatchReader` and `RecordBatchWriter` + * implementations to differentiate between a stream with valid zero-length + * RecordBatches, and a stream with a Schema message, but no RecordBatches. + * @see https://github.com/apache/arrow/pull/4373 + * @ignore + * @private + */ +export declare class _InternalEmptyPlaceholderRecordBatch extends RecordBatch { + constructor(schema: Schema); +} +export {}; diff --git a/frontend/node_modules/apache-arrow/recordbatch.js b/frontend/node_modules/apache-arrow/recordbatch.js new file mode 100644 index 0000000000000000000000000000000000000000..156ec1ba4c837ed21f67d4e4840d631f0a374fd7 --- /dev/null +++ b/frontend/node_modules/apache-arrow/recordbatch.js @@ -0,0 +1,124 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const data_1 = require("./data"); +const table_1 = require("./table"); +const vector_1 = require("./vector"); +const visitor_1 = require("./visitor"); +const schema_1 = require("./schema"); +const compat_1 = require("./util/compat"); +const chunked_1 = require("./vector/chunked"); +const args_1 = require("./util/args"); +const type_1 = require("./type"); +const recordbatch_1 = require("./util/recordbatch"); +const index_1 = require("./vector/index"); +class RecordBatch extends index_1.StructVector { + constructor(...args) { + let data; + let schema = args[0]; + let children; + if (args[1] instanceof data_1.Data) { + [, data, children] = args; + } + else { + const fields = schema.fields; + const [, length, childData] = args; + data = data_1.Data.Struct(new type_1.Struct(fields), 0, length, 0, null, childData); + } + super(data, children); + this._schema = schema; + } + /** @nocollapse */ + static from(options) { + if (compat_1.isIterable(options['values'])) { + return table_1.Table.from(options); + } + return table_1.Table.from(options); + } + /** @nocollapse */ + static new(...args) { + const [fs, xs] = args_1.selectFieldArgs(args); + const vs = xs.filter((x) => x instanceof vector_1.Vector); + return new RecordBatch(...recordbatch_1.ensureSameLengthData(new schema_1.Schema(fs), vs.map((x) => x.data))); + } + clone(data, children = this._children) { + return new RecordBatch(this._schema, data, children); + } + concat(...others) { + const schema = this._schema, chunks = chunked_1.Chunked.flatten(this, ...others); + return new table_1.Table(schema, chunks.map(({ data }) => new RecordBatch(schema, data))); + } + get schema() { return this._schema; } + get numCols() { return this._schema.fields.length; } + get dictionaries() { + return this._dictionaries || (this._dictionaries = DictionaryCollector.collect(this)); + } + select(...columnNames) { + const nameToIndex = this._schema.fields.reduce((m, f, i) => m.set(f.name, i), new Map()); + return this.selectAt(...columnNames.map((columnName) => nameToIndex.get(columnName)).filter((x) => x > -1)); + } + selectAt(...columnIndices) { + const schema = this._schema.selectAt(...columnIndices); + const childData = columnIndices.map((i) => this.data.childData[i]).filter(Boolean); + return new RecordBatch(schema, this.length, childData); + } +} +exports.RecordBatch = RecordBatch; +/** + * An internal class used by the `RecordBatchReader` and `RecordBatchWriter` + * implementations to differentiate between a stream with valid zero-length + * RecordBatches, and a stream with a Schema message, but no RecordBatches. + * @see https://github.com/apache/arrow/pull/4373 + * @ignore + * @private + */ +/* tslint:disable:class-name */ +class _InternalEmptyPlaceholderRecordBatch extends RecordBatch { + constructor(schema) { + super(schema, 0, schema.fields.map((f) => data_1.Data.new(f.type, 0, 0, 0))); + } +} +exports._InternalEmptyPlaceholderRecordBatch = _InternalEmptyPlaceholderRecordBatch; +/** @ignore */ +class DictionaryCollector extends visitor_1.Visitor { + constructor() { + super(...arguments); + this.dictionaries = new Map(); + } + static collect(batch) { + return new DictionaryCollector().visit(batch.data, new type_1.Struct(batch.schema.fields)).dictionaries; + } + visit(data, type) { + if (type_1.DataType.isDictionary(type)) { + return this.visitDictionary(data, type); + } + else { + data.childData.forEach((child, i) => this.visit(child, type.children[i].type)); + } + return this; + } + visitDictionary(data, type) { + const dictionary = data.dictionary; + if (dictionary && dictionary.length > 0) { + this.dictionaries.set(type.id, dictionary); + } + return this; + } +} + +//# sourceMappingURL=recordbatch.js.map diff --git a/frontend/node_modules/apache-arrow/recordbatch.js.map b/frontend/node_modules/apache-arrow/recordbatch.js.map new file mode 100644 index 0000000000000000000000000000000000000000..aea61876f76cf1f865d06fed56352bc64e89a262 --- /dev/null +++ b/frontend/node_modules/apache-arrow/recordbatch.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["recordbatch.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,iCAA8B;AAC9B,mCAAgC;AAChC,qCAAkC;AAClC,uCAAoC;AACpC,qCAAyC;AACzC,0CAA2C;AAC3C,8CAA2C;AAC3C,sCAA8C;AAC9C,iCAAsD;AACtD,oDAA0D;AAE1D,0CAA+F;AAY/F,MAAa,WACT,SAAQ,oBAAe;IA6BvB,YAAY,GAAG,IAAW;QACtB,IAAI,IAAqB,CAAC;QAC1B,IAAI,MAAM,GAAG,IAAI,CAAC,CAAC,CAAc,CAAC;QAClC,IAAI,QAA8B,CAAC;QACnC,IAAI,IAAI,CAAC,CAAC,CAAC,YAAY,WAAI,EAAE;YACzB,CAAC,EAAE,IAAI,E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EAAE,CAChC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;SACjD;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IACM,eAAe,CAAC,IAAU,EAAE,IAAgB;QAC/C,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QACnC,IAAI,UAAU,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;YACrC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;SAC9C;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ","file":"recordbatch.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from './data';\nimport { Table } from './table';\nimport { Vector } from './vector';\nimport { Visitor } from './visitor';\nimport { Schema, Field } from './schema';\nimport { isIterable } from './util/compat';\nimport { Chunked } from './vector/chunked';\nimport { selectFieldArgs } from './util/args';\nimport { DataType, Struct, Dictionary } from './type';\nimport { ensureSameLengthData } from './util/recordbatch';\nimport { Clonable, Sliceable, Applicative } from './vector';\nimport { StructVector, VectorBuilderOptions, VectorBuilderOptionsAsync } from './vector/index';\n\ntype VectorMap = { [key: string]: Vector };\ntype Fields = (keyof T)[] | Field[];\ntype ChildData = (Data | Vector)[];\n\nexport interface RecordBatch {\n concat(...others: Vector>[]): Table;\n slice(begin?: number, end?: number): RecordBatch;\n clone(data: Data>, children?: Vector[]): RecordBatch;\n}\n\nexport class RecordBatch\n extends StructVector\n implements Clonable>,\n Sliceable>,\n Applicative, Table> {\n\n public static from(options: VectorBuilderOptions, TNull>): Table;\n public static from(options: VectorBuilderOptionsAsync, TNull>): Promise>;\n /** @nocollapse */\n public static from(options: VectorBuilderOptions, TNull> | VectorBuilderOptionsAsync, TNull>) {\n if (isIterable<(Struct)['TValue'] | TNull>(options['values'])) {\n return Table.from(options as VectorBuilderOptions, TNull>);\n }\n return Table.from(options as VectorBuilderOptionsAsync, TNull>);\n }\n\n public static new(children: T): RecordBatch<{ [P in keyof T]: T[P]['type'] }>;\n public static new(children: ChildData, fields?: Fields): RecordBatch;\n /** @nocollapse */\n public static new(...args: any[]) {\n const [fs, xs] = selectFieldArgs(args);\n const vs = xs.filter((x): x is Vector => x instanceof Vector);\n return new RecordBatch(...ensureSameLengthData(new Schema(fs), vs.map((x) => x.data)));\n }\n\n protected _schema: Schema;\n protected _dictionaries?: Map;\n\n constructor(schema: Schema, length: number, children: (Data | Vector)[]);\n constructor(schema: Schema, data: Data>, children?: Vector[]);\n constructor(...args: any[]) {\n let data: Data>;\n let schema = args[0] as Schema;\n let children: Vector[] | undefined;\n if (args[1] instanceof Data) {\n [, data, children] = (args as [any, Data>, Vector[]?]);\n } else {\n const fields = schema.fields as Field[];\n const [, length, childData] = args as [any, number, Data[]];\n data = Data.Struct(new Struct(fields), 0, length, 0, null, childData);\n }\n super(data, children);\n this._schema = schema;\n }\n\n public clone(data: Data>, children = this._children) {\n return new RecordBatch(this._schema, data, children);\n }\n\n public concat(...others: Vector>[]): Table {\n const schema = this._schema, chunks = Chunked.flatten(this, ...others);\n return new Table(schema, chunks.map(({ data }) => new RecordBatch(schema, data)));\n }\n\n public get schema() { return this._schema; }\n public get numCols() { return this._schema.fields.length; }\n public get dictionaries() {\n return this._dictionaries || (this._dictionaries = DictionaryCollector.collect(this));\n }\n\n public select(...columnNames: K[]) {\n const nameToIndex = this._schema.fields.reduce((m, f, i) => m.set(f.name as K, i), new Map());\n return this.selectAt(...columnNames.map((columnName) => nameToIndex.get(columnName)!).filter((x) => x > -1));\n }\n public selectAt(...columnIndices: number[]) {\n const schema = this._schema.selectAt(...columnIndices);\n const childData = columnIndices.map((i) => this.data.childData[i]).filter(Boolean);\n return new RecordBatch<{ [key: string]: K }>(schema, this.length, childData);\n }\n}\n\n/**\n * An internal class used by the `RecordBatchReader` and `RecordBatchWriter`\n * implementations to differentiate between a stream with valid zero-length\n * RecordBatches, and a stream with a Schema message, but no RecordBatches.\n * @see https://github.com/apache/arrow/pull/4373\n * @ignore\n * @private\n */\n/* tslint:disable:class-name */\nexport class _InternalEmptyPlaceholderRecordBatch extends RecordBatch {\n constructor(schema: Schema) {\n super(schema, 0, schema.fields.map((f) => Data.new(f.type, 0, 0, 0)));\n }\n}\n\n/** @ignore */\nclass DictionaryCollector extends Visitor {\n public dictionaries = new Map();\n public static collect(batch: T) {\n return new DictionaryCollector().visit(\n batch.data, new Struct(batch.schema.fields)\n ).dictionaries;\n }\n public visit(data: Data, type: DataType) {\n if (DataType.isDictionary(type)) {\n return this.visitDictionary(data, type);\n } else {\n data.childData.forEach((child, i) =>\n this.visit(child, type.children[i].type));\n }\n return this;\n }\n public visitDictionary(data: Data, type: Dictionary) {\n const dictionary = data.dictionary;\n if (dictionary && dictionary.length > 0) {\n this.dictionaries.set(type.id, dictionary);\n }\n return this;\n }\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/recordbatch.mjs b/frontend/node_modules/apache-arrow/recordbatch.mjs new file mode 100644 index 0000000000000000000000000000000000000000..cc6b62c88d8ceffa640f2300419fe3dcb645eb17 --- /dev/null +++ b/frontend/node_modules/apache-arrow/recordbatch.mjs @@ -0,0 +1,120 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { Data } from './data'; +import { Table } from './table'; +import { Vector } from './vector'; +import { Visitor } from './visitor'; +import { Schema } from './schema'; +import { isIterable } from './util/compat'; +import { Chunked } from './vector/chunked'; +import { selectFieldArgs } from './util/args'; +import { DataType, Struct } from './type'; +import { ensureSameLengthData } from './util/recordbatch'; +import { StructVector } from './vector/index'; +export class RecordBatch extends StructVector { + constructor(...args) { + let data; + let schema = args[0]; + let children; + if (args[1] instanceof Data) { + [, data, children] = args; + } + else { + const fields = schema.fields; + const [, length, childData] = args; + data = Data.Struct(new Struct(fields), 0, length, 0, null, childData); + } + super(data, children); + this._schema = schema; + } + /** @nocollapse */ + static from(options) { + if (isIterable(options['values'])) { + return Table.from(options); + } + return Table.from(options); + } + /** @nocollapse */ + static new(...args) { + const [fs, xs] = selectFieldArgs(args); + const vs = xs.filter((x) => x instanceof Vector); + return new RecordBatch(...ensureSameLengthData(new Schema(fs), vs.map((x) => x.data))); + } + clone(data, children = this._children) { + return new RecordBatch(this._schema, data, children); + } + concat(...others) { + const schema = this._schema, chunks = Chunked.flatten(this, ...others); + return new Table(schema, chunks.map(({ data }) => new RecordBatch(schema, data))); + } + get schema() { return this._schema; } + get numCols() { return this._schema.fields.length; } + get dictionaries() { + return this._dictionaries || (this._dictionaries = DictionaryCollector.collect(this)); + } + select(...columnNames) { + const nameToIndex = this._schema.fields.reduce((m, f, i) => m.set(f.name, i), new Map()); + return this.selectAt(...columnNames.map((columnName) => nameToIndex.get(columnName)).filter((x) => x > -1)); + } + selectAt(...columnIndices) { + const schema = this._schema.selectAt(...columnIndices); + const childData = columnIndices.map((i) => this.data.childData[i]).filter(Boolean); + return new RecordBatch(schema, this.length, childData); + } +} +/** + * An internal class used by the `RecordBatchReader` and `RecordBatchWriter` + * implementations to differentiate between a stream with valid zero-length + * RecordBatches, and a stream with a Schema message, but no RecordBatches. + * @see https://github.com/apache/arrow/pull/4373 + * @ignore + * @private + */ +/* tslint:disable:class-name */ +export class _InternalEmptyPlaceholderRecordBatch extends RecordBatch { + constructor(schema) { + super(schema, 0, schema.fields.map((f) => Data.new(f.type, 0, 0, 0))); + } +} +/** @ignore */ +class DictionaryCollector extends Visitor { + constructor() { + super(...arguments); + this.dictionaries = new Map(); + } + static collect(batch) { + return new DictionaryCollector().visit(batch.data, new Struct(batch.schema.fields)).dictionaries; + } + visit(data, type) { + if (DataType.isDictionary(type)) { + return this.visitDictionary(data, type); + } + else { + data.childData.forEach((child, i) => this.visit(child, type.children[i].type)); + } + return this; + } + visitDictionary(data, type) { + const dictionary = data.dictionary; + if (dictionary && dictionary.length > 0) { + this.dictionaries.set(type.id, dictionary); + } + return this; + } +} + +//# sourceMappingURL=recordbatch.mjs.map diff --git a/frontend/node_modules/apache-arrow/recordbatch.mjs.map b/frontend/node_modules/apache-arrow/recordbatch.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..b945a34f637081ca18838205155c32f472f96237 --- /dev/null +++ b/frontend/node_modules/apache-arrow/recordbatch.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["recordbatch.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,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AC,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1E,CAAC;CACJ;AAED,cAAc;AACd,MAAM,mBAAoB,SAAQ,OAAO;IAAzC;;QACW,iBAAY,GAAG,IAAI,GAAG,EAAkB,CAAC;IAsBpD,CAAC;IArBU,MAAM,CAAC,OAAO,CAAwB,KAAQ;QACjD,OAAO,IAAI,mBAAmB,EAAE,CAAC,KAAK,CAClC,KAAK,CAAC,IAAI,EAAE,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAC9C,CAAC,YAAY,CAAC;IACnB,CAAC;IACM,KAAK,CAAC,IAAU,EAAE,IAAc;QACnC,IAAI,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE;YAC7B,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;SAC3C;aAAM;YACH,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAChC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;SACjD;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IACM,eAAe,CAAC,IAAU,EAAE,IAAgB;QAC/C,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QACnC,IAAI,UAAU,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;YACrC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;SAC9C;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ","file":"recordbatch.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from './data';\nimport { Table } from './table';\nimport { Vector } from './vector';\nimport { Visitor } from './visitor';\nimport { Schema, Field } from './schema';\nimport { isIterable } from './util/compat';\nimport { Chunked } from './vector/chunked';\nimport { selectFieldArgs } from './util/args';\nimport { DataType, Struct, Dictionary } from './type';\nimport { ensureSameLengthData } from './util/recordbatch';\nimport { Clonable, Sliceable, Applicative } from './vector';\nimport { StructVector, VectorBuilderOptions, VectorBuilderOptionsAsync } from './vector/index';\n\ntype VectorMap = { [key: string]: Vector };\ntype Fields = (keyof T)[] | Field[];\ntype ChildData = (Data | Vector)[];\n\nexport interface RecordBatch {\n concat(...others: Vector>[]): Table;\n slice(begin?: number, end?: number): RecordBatch;\n clone(data: Data>, children?: Vector[]): RecordBatch;\n}\n\nexport class RecordBatch\n extends StructVector\n implements Clonable>,\n Sliceable>,\n Applicative, Table> {\n\n public static from(options: VectorBuilderOptions, TNull>): Table;\n public static from(options: VectorBuilderOptionsAsync, TNull>): Promise>;\n /** @nocollapse */\n public static from(options: VectorBuilderOptions, TNull> | VectorBuilderOptionsAsync, TNull>) {\n if (isIterable<(Struct)['TValue'] | TNull>(options['values'])) {\n return Table.from(options as VectorBuilderOptions, TNull>);\n }\n return Table.from(options as VectorBuilderOptionsAsync, TNull>);\n }\n\n public static new(children: T): RecordBatch<{ [P in keyof T]: T[P]['type'] }>;\n public static new(children: ChildData, fields?: Fields): RecordBatch;\n /** @nocollapse */\n public static new(...args: any[]) {\n const [fs, xs] = selectFieldArgs(args);\n const vs = xs.filter((x): x is Vector => x instanceof Vector);\n return new RecordBatch(...ensureSameLengthData(new Schema(fs), vs.map((x) => x.data)));\n }\n\n protected _schema: Schema;\n protected _dictionaries?: Map;\n\n constructor(schema: Schema, length: number, children: (Data | Vector)[]);\n constructor(schema: Schema, data: Data>, children?: Vector[]);\n constructor(...args: any[]) {\n let data: Data>;\n let schema = args[0] as Schema;\n let children: Vector[] | undefined;\n if (args[1] instanceof Data) {\n [, data, children] = (args as [any, Data>, Vector[]?]);\n } else {\n const fields = schema.fields as Field[];\n const [, length, childData] = args as [any, number, Data[]];\n data = Data.Struct(new Struct(fields), 0, length, 0, null, childData);\n }\n super(data, children);\n this._schema = schema;\n }\n\n public clone(data: Data>, children = this._children) {\n return new RecordBatch(this._schema, data, children);\n }\n\n public concat(...others: Vector>[]): Table {\n const schema = this._schema, chunks = Chunked.flatten(this, ...others);\n return new Table(schema, chunks.map(({ data }) => new RecordBatch(schema, data)));\n }\n\n public get schema() { return this._schema; }\n public get numCols() { return this._schema.fields.length; }\n public get dictionaries() {\n return this._dictionaries || (this._dictionaries = DictionaryCollector.collect(this));\n }\n\n public select(...columnNames: K[]) {\n const nameToIndex = this._schema.fields.reduce((m, f, i) => m.set(f.name as K, i), new Map());\n return this.selectAt(...columnNames.map((columnName) => nameToIndex.get(columnName)!).filter((x) => x > -1));\n }\n public selectAt(...columnIndices: number[]) {\n const schema = this._schema.selectAt(...columnIndices);\n const childData = columnIndices.map((i) => this.data.childData[i]).filter(Boolean);\n return new RecordBatch<{ [key: string]: K }>(schema, this.length, childData);\n }\n}\n\n/**\n * An internal class used by the `RecordBatchReader` and `RecordBatchWriter`\n * implementations to differentiate between a stream with valid zero-length\n * RecordBatches, and a stream with a Schema message, but no RecordBatches.\n * @see https://github.com/apache/arrow/pull/4373\n * @ignore\n * @private\n */\n/* tslint:disable:class-name */\nexport class _InternalEmptyPlaceholderRecordBatch extends RecordBatch {\n constructor(schema: Schema) {\n super(schema, 0, schema.fields.map((f) => Data.new(f.type, 0, 0, 0)));\n }\n}\n\n/** @ignore */\nclass DictionaryCollector extends Visitor {\n public dictionaries = new Map();\n public static collect(batch: T) {\n return new DictionaryCollector().visit(\n batch.data, new Struct(batch.schema.fields)\n ).dictionaries;\n }\n public visit(data: Data, type: DataType) {\n if (DataType.isDictionary(type)) {\n return this.visitDictionary(data, type);\n } else {\n data.childData.forEach((child, i) =>\n this.visit(child, type.children[i].type));\n }\n return this;\n }\n public visitDictionary(data: Data, type: Dictionary) {\n const dictionary = data.dictionary;\n if (dictionary && dictionary.length > 0) {\n this.dictionaries.set(type.id, dictionary);\n }\n return this;\n }\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/schema.d.ts b/frontend/node_modules/apache-arrow/schema.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..5db845200a83b186a5ddfc6c1801db7e44ab21ac --- /dev/null +++ b/frontend/node_modules/apache-arrow/schema.d.ts @@ -0,0 +1,77 @@ +import { Data } from './data'; +import { Vector } from './vector'; +import { DataType } from './type'; +declare type VectorMap = { + [key: string]: Vector; +}; +declare type Fields = (keyof T)[] | Field[]; +declare type ChildData = T[keyof T][] | Data[] | Vector[]; +export declare class Schema { + static from(children: T): Schema; + static from(children: T): Schema<{ + [P in keyof T]: T[P]['type']; + }>; + static from(children: ChildData, fields?: Fields): Schema; + static new(children: T): Schema; + static new(children: T): Schema<{ + [P in keyof T]: T[P]['type']; + }>; + static new(children: ChildData, fields?: Fields): Schema; + readonly fields: Field[]; + readonly metadata: Map; + readonly dictionaries: Map; + constructor(fields?: Field[], metadata?: Map | null, dictionaries?: Map | null); + readonly [Symbol.toStringTag]: string; + toString(): string; + compareTo(other?: Schema | null): other is Schema; + select(...columnNames: K[]): Schema<{ [P in K]: T[P]; }>; + selectAt(...columnIndices: number[]): Schema<{ + [key: string]: K; + }>; + assign(schema: Schema): Schema; + assign(...fields: (Field | Field[])[]): Schema; +} +export declare class Field { + static new(props: { + name: string | number; + type: T; + nullable?: boolean; + metadata?: Map | null; + }): Field; + static new(name: string | number | Field, type: T, nullable?: boolean, metadata?: Map | null): Field; + readonly type: T; + readonly name: string; + readonly nullable: boolean; + readonly metadata: Map; + constructor(name: string, type: T, nullable?: boolean, metadata?: Map | null); + readonly typeId: import("./enum").Type; + readonly [Symbol.toStringTag]: string; + toString(): string; + compareTo(other?: Field | null): other is Field; + clone(props: { + name?: string | number; + type?: R; + nullable?: boolean; + metadata?: Map | null; + }): Field; + clone(name?: string | number | Field, type?: R, nullable?: boolean, metadata?: Map | null): Field; +} +export {}; diff --git a/frontend/node_modules/apache-arrow/schema.js b/frontend/node_modules/apache-arrow/schema.js new file mode 100644 index 0000000000000000000000000000000000000000..74c2a80db2d3ad9e21c7359595d9a557e8560a10 --- /dev/null +++ b/frontend/node_modules/apache-arrow/schema.js @@ -0,0 +1,136 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const type_1 = require("./type"); +const args_1 = require("./util/args"); +const args_2 = require("./util/args"); +const typecomparator_1 = require("./visitor/typecomparator"); +class Schema { + constructor(fields = [], metadata, dictionaries) { + this.fields = (fields || []); + this.metadata = metadata || new Map(); + if (!dictionaries) { + dictionaries = generateDictionaryMap(fields); + } + this.dictionaries = dictionaries; + } + /** @nocollapse */ + static from(...args) { + return Schema.new(args[0], args[1]); + } + /** @nocollapse */ + static new(...args) { + return new Schema(args_2.selectFieldArgs(args)[0]); + } + get [Symbol.toStringTag]() { return 'Schema'; } + toString() { + return `Schema<{ ${this.fields.map((f, i) => `${i}: ${f}`).join(', ')} }>`; + } + compareTo(other) { + return typecomparator_1.instance.compareSchemas(this, other); + } + select(...columnNames) { + const names = columnNames.reduce((xs, x) => (xs[x] = true) && xs, Object.create(null)); + return new Schema(this.fields.filter((f) => names[f.name]), this.metadata); + } + selectAt(...columnIndices) { + return new Schema(columnIndices.map((i) => this.fields[i]).filter(Boolean), this.metadata); + } + assign(...args) { + const other = args[0] instanceof Schema ? args[0] + : new Schema(args_1.selectArgs(Field, args)); + const curFields = [...this.fields]; + const metadata = mergeMaps(mergeMaps(new Map(), this.metadata), other.metadata); + const newFields = other.fields.filter((f2) => { + const i = curFields.findIndex((f) => f.name === f2.name); + return ~i ? (curFields[i] = f2.clone({ + metadata: mergeMaps(mergeMaps(new Map(), curFields[i].metadata), f2.metadata) + })) && false : true; + }); + const newDictionaries = generateDictionaryMap(newFields, new Map()); + return new Schema([...curFields, ...newFields], metadata, new Map([...this.dictionaries, ...newDictionaries])); + } +} +exports.Schema = Schema; +class Field { + constructor(name, type, nullable = false, metadata) { + this.name = name; + this.type = type; + this.nullable = nullable; + this.metadata = metadata || new Map(); + } + /** @nocollapse */ + static new(...args) { + let [name, type, nullable, metadata] = args; + if (args[0] && typeof args[0] === 'object') { + ({ name } = args[0]); + (type === undefined) && (type = args[0].type); + (nullable === undefined) && (nullable = args[0].nullable); + (metadata === undefined) && (metadata = args[0].metadata); + } + return new Field(`${name}`, type, nullable, metadata); + } + get typeId() { return this.type.typeId; } + get [Symbol.toStringTag]() { return 'Field'; } + toString() { return `${this.name}: ${this.type}`; } + compareTo(other) { + return typecomparator_1.instance.compareField(this, other); + } + clone(...args) { + let [name, type, nullable, metadata] = args; + (!args[0] || typeof args[0] !== 'object') + ? ([name = this.name, type = this.type, nullable = this.nullable, metadata = this.metadata] = args) + : ({ name = this.name, type = this.type, nullable = this.nullable, metadata = this.metadata } = args[0]); + return Field.new(name, type, nullable, metadata); + } +} +exports.Field = Field; +/** @ignore */ +function mergeMaps(m1, m2) { + return new Map([...(m1 || new Map()), ...(m2 || new Map())]); +} +/** @ignore */ +function generateDictionaryMap(fields, dictionaries = new Map()) { + for (let i = -1, n = fields.length; ++i < n;) { + const field = fields[i]; + const type = field.type; + if (type_1.DataType.isDictionary(type)) { + if (!dictionaries.has(type.id)) { + dictionaries.set(type.id, type.dictionary); + } + else if (dictionaries.get(type.id) !== type.dictionary) { + throw new Error(`Cannot create Schema containing two different dictionaries with the same Id`); + } + } + if (type.children && type.children.length > 0) { + generateDictionaryMap(type.children, dictionaries); + } + } + return dictionaries; +} +// Add these here so they're picked up by the externs creator +// in the build, and closure-compiler doesn't minify them away +Schema.prototype.fields = null; +Schema.prototype.metadata = null; +Schema.prototype.dictionaries = null; +Field.prototype.type = null; +Field.prototype.name = null; +Field.prototype.nullable = null; +Field.prototype.metadata = null; + +//# sourceMappingURL=schema.js.map diff --git a/frontend/node_modules/apache-arrow/schema.js.map b/frontend/node_modules/apache-arrow/schema.js.map new file mode 100644 index 0000000000000000000000000000000000000000..2e6acea65b67c4e8682e02cff0789877fb89be83 --- /dev/null +++ b/frontend/node_modules/apache-arrow/schema.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["schema.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAIrB,iCAAkC;AAClC,sCAAyC;AACzC,sCAA8C;AAC9C,6DAAgE;AAMhE,MAAa,MAAM;IAsBf,YAAY,SAAkB,EAAE,EACpB,QAAqC,EACrC,YAA2C;QACnD,IAAI,CAAC,MAAM,GAAG,CAAC,MAAM,IAAI,EAAE,CAAwB,CAAC;QACpD,IAAI,CAAC,QAAQ,GAAG,QAAQ,IAAI,IAAI,GAAG,EAAE,CAAC;QACtC,IAAI,CAAC,Y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AQ,GAAG,IAAI,CAAC;AACzC,MAAM,CAAC,SAAiB,CAAC,YAAY,GAAG,IAAI,CAAC;AAE7C,KAAK,CAAC,SAAiB,CAAC,IAAI,GAAG,IAAI,CAAC;AACpC,KAAK,CAAC,SAAiB,CAAC,IAAI,GAAG,IAAI,CAAC;AACpC,KAAK,CAAC,SAAiB,CAAC,QAAQ,GAAG,IAAI,CAAC;AACxC,KAAK,CAAC,SAAiB,CAAC,QAAQ,GAAG,IAAI,CAAC","file":"schema.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from './data';\nimport { Vector } from './vector';\nimport { DataType } from './type';\nimport { selectArgs } from './util/args';\nimport { selectFieldArgs } from './util/args';\nimport { instance as comparer } from './visitor/typecomparator';\n\ntype VectorMap = { [key: string]: Vector };\ntype Fields = (keyof T)[] | Field[];\ntype ChildData = T[keyof T][] | Data[] | Vector[];\n\nexport class Schema {\n\n public static from(children: T): Schema;\n public static from(children: T): Schema<{ [P in keyof T]: T[P]['type'] }>;\n public static from(children: ChildData, fields?: Fields): Schema;\n /** @nocollapse */\n public static from(...args: any[]) {\n return Schema.new(args[0], args[1]);\n }\n\n public static new(children: T): Schema;\n public static new(children: T): Schema<{ [P in keyof T]: T[P]['type'] }>;\n public static new(children: ChildData, fields?: Fields): Schema;\n /** @nocollapse */\n public static new(...args: any[]) {\n return new Schema(selectFieldArgs(args)[0]);\n }\n\n public readonly fields: Field[];\n public readonly metadata: Map;\n public readonly dictionaries: Map;\n\n constructor(fields: Field[] = [],\n metadata?: Map | null,\n dictionaries?: Map | null) {\n this.fields = (fields || []) as Field[];\n this.metadata = metadata || new Map();\n if (!dictionaries) {\n dictionaries = generateDictionaryMap(fields);\n }\n this.dictionaries = dictionaries;\n }\n public get [Symbol.toStringTag]() { return 'Schema'; }\n public toString() {\n return `Schema<{ ${this.fields.map((f, i) => `${i}: ${f}`).join(', ')} }>`;\n }\n\n public compareTo(other?: Schema | null): other is Schema {\n return comparer.compareSchemas(this, other);\n }\n\n public select(...columnNames: K[]) {\n const names = columnNames.reduce((xs, x) => (xs[x] = true) && xs, Object.create(null));\n return new Schema<{ [P in K]: T[P] }>(this.fields.filter((f) => names[f.name]), this.metadata);\n }\n public selectAt(...columnIndices: number[]) {\n return new Schema<{ [key: string]: K }>(columnIndices.map((i) => this.fields[i]).filter(Boolean), this.metadata);\n }\n\n public assign(schema: Schema): Schema;\n public assign(...fields: (Field | Field[])[]): Schema;\n public assign(...args: (Schema | Field | Field[])[]) {\n\n const other = args[0] instanceof Schema ? args[0] as Schema\n : new Schema(selectArgs>(Field, args));\n\n const curFields = [...this.fields] as Field[];\n const metadata = mergeMaps(mergeMaps(new Map(), this.metadata), other.metadata);\n const newFields = other.fields.filter((f2) => {\n const i = curFields.findIndex((f) => f.name === f2.name);\n return ~i ? (curFields[i] = f2.clone({\n metadata: mergeMaps(mergeMaps(new Map(), curFields[i].metadata), f2.metadata)\n })) && false : true;\n }) as Field[];\n\n const newDictionaries = generateDictionaryMap(newFields, new Map());\n\n return new Schema(\n [...curFields, ...newFields], metadata,\n new Map([...this.dictionaries, ...newDictionaries])\n );\n }\n}\n\nexport class Field {\n\n public static new(props: { name: string | number, type: T, nullable?: boolean, metadata?: Map | null }): Field;\n public static new(name: string | number | Field, type: T, nullable?: boolean, metadata?: Map | null): Field;\n /** @nocollapse */\n public static new(...args: any[]) {\n let [name, type, nullable, metadata] = args;\n if (args[0] && typeof args[0] === 'object') {\n ({ name } = args[0]);\n (type === undefined) && (type = args[0].type);\n (nullable === undefined) && (nullable = args[0].nullable);\n (metadata === undefined) && (metadata = args[0].metadata);\n }\n return new Field(`${name}`, type, nullable, metadata);\n }\n\n public readonly type: T;\n public readonly name: string;\n public readonly nullable: boolean;\n public readonly metadata: Map;\n\n constructor(name: string, type: T, nullable = false, metadata?: Map | null) {\n this.name = name;\n this.type = type;\n this.nullable = nullable;\n this.metadata = metadata || new Map();\n }\n\n public get typeId() { return this.type.typeId; }\n public get [Symbol.toStringTag]() { return 'Field'; }\n public toString() { return `${this.name}: ${this.type}`; }\n public compareTo(other?: Field | null): other is Field {\n return comparer.compareField(this, other);\n }\n public clone(props: { name?: string | number, type?: R, nullable?: boolean, metadata?: Map | null }): Field;\n public clone(name?: string | number | Field, type?: R, nullable?: boolean, metadata?: Map | null): Field;\n public clone(...args: any[]) {\n let [name, type, nullable, metadata] = args;\n (!args[0] || typeof args[0] !== 'object')\n ? ([name = this.name, type = this.type, nullable = this.nullable, metadata = this.metadata] = args)\n : ({name = this.name, type = this.type, nullable = this.nullable, metadata = this.metadata} = args[0]);\n return Field.new(name, type, nullable, metadata);\n }\n}\n\n/** @ignore */\nfunction mergeMaps(m1?: Map | null, m2?: Map | null): Map {\n return new Map([...(m1 || new Map()), ...(m2 || new Map())]);\n}\n\n/** @ignore */\nfunction generateDictionaryMap(fields: Field[], dictionaries = new Map()): Map {\n\n for (let i = -1, n = fields.length; ++i < n;) {\n const field = fields[i];\n const type = field.type;\n if (DataType.isDictionary(type)) {\n if (!dictionaries.has(type.id)) {\n dictionaries.set(type.id, type.dictionary);\n } else if (dictionaries.get(type.id) !== type.dictionary) {\n throw new Error(`Cannot create Schema containing two different dictionaries with the same Id`);\n }\n }\n if (type.children && type.children.length > 0) {\n generateDictionaryMap(type.children, dictionaries);\n }\n }\n\n return dictionaries;\n}\n\n// Add these here so they're picked up by the externs creator\n// in the build, and closure-compiler doesn't minify them away\n(Schema.prototype as any).fields = null;\n(Schema.prototype as any).metadata = null;\n(Schema.prototype as any).dictionaries = null;\n\n(Field.prototype as any).type = null;\n(Field.prototype as any).name = null;\n(Field.prototype as any).nullable = null;\n(Field.prototype as any).metadata = null;\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/schema.mjs b/frontend/node_modules/apache-arrow/schema.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d3052d6ff3fa20f618e32e3efbcb2b0a08b2f98f --- /dev/null +++ b/frontend/node_modules/apache-arrow/schema.mjs @@ -0,0 +1,132 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { DataType } from './type'; +import { selectArgs } from './util/args'; +import { selectFieldArgs } from './util/args'; +import { instance as comparer } from './visitor/typecomparator'; +export class Schema { + constructor(fields = [], metadata, dictionaries) { + this.fields = (fields || []); + this.metadata = metadata || new Map(); + if (!dictionaries) { + dictionaries = generateDictionaryMap(fields); + } + this.dictionaries = dictionaries; + } + /** @nocollapse */ + static from(...args) { + return Schema.new(args[0], args[1]); + } + /** @nocollapse */ + static new(...args) { + return new Schema(selectFieldArgs(args)[0]); + } + get [Symbol.toStringTag]() { return 'Schema'; } + toString() { + return `Schema<{ ${this.fields.map((f, i) => `${i}: ${f}`).join(', ')} }>`; + } + compareTo(other) { + return comparer.compareSchemas(this, other); + } + select(...columnNames) { + const names = columnNames.reduce((xs, x) => (xs[x] = true) && xs, Object.create(null)); + return new Schema(this.fields.filter((f) => names[f.name]), this.metadata); + } + selectAt(...columnIndices) { + return new Schema(columnIndices.map((i) => this.fields[i]).filter(Boolean), this.metadata); + } + assign(...args) { + const other = args[0] instanceof Schema ? args[0] + : new Schema(selectArgs(Field, args)); + const curFields = [...this.fields]; + const metadata = mergeMaps(mergeMaps(new Map(), this.metadata), other.metadata); + const newFields = other.fields.filter((f2) => { + const i = curFields.findIndex((f) => f.name === f2.name); + return ~i ? (curFields[i] = f2.clone({ + metadata: mergeMaps(mergeMaps(new Map(), curFields[i].metadata), f2.metadata) + })) && false : true; + }); + const newDictionaries = generateDictionaryMap(newFields, new Map()); + return new Schema([...curFields, ...newFields], metadata, new Map([...this.dictionaries, ...newDictionaries])); + } +} +export class Field { + constructor(name, type, nullable = false, metadata) { + this.name = name; + this.type = type; + this.nullable = nullable; + this.metadata = metadata || new Map(); + } + /** @nocollapse */ + static new(...args) { + let [name, type, nullable, metadata] = args; + if (args[0] && typeof args[0] === 'object') { + ({ name } = args[0]); + (type === undefined) && (type = args[0].type); + (nullable === undefined) && (nullable = args[0].nullable); + (metadata === undefined) && (metadata = args[0].metadata); + } + return new Field(`${name}`, type, nullable, metadata); + } + get typeId() { return this.type.typeId; } + get [Symbol.toStringTag]() { return 'Field'; } + toString() { return `${this.name}: ${this.type}`; } + compareTo(other) { + return comparer.compareField(this, other); + } + clone(...args) { + let [name, type, nullable, metadata] = args; + (!args[0] || typeof args[0] !== 'object') + ? ([name = this.name, type = this.type, nullable = this.nullable, metadata = this.metadata] = args) + : ({ name = this.name, type = this.type, nullable = this.nullable, metadata = this.metadata } = args[0]); + return Field.new(name, type, nullable, metadata); + } +} +/** @ignore */ +function mergeMaps(m1, m2) { + return new Map([...(m1 || new Map()), ...(m2 || new Map())]); +} +/** @ignore */ +function generateDictionaryMap(fields, dictionaries = new Map()) { + for (let i = -1, n = fields.length; ++i < n;) { + const field = fields[i]; + const type = field.type; + if (DataType.isDictionary(type)) { + if (!dictionaries.has(type.id)) { + dictionaries.set(type.id, type.dictionary); + } + else if (dictionaries.get(type.id) !== type.dictionary) { + throw new Error(`Cannot create Schema containing two different dictionaries with the same Id`); + } + } + if (type.children && type.children.length > 0) { + generateDictionaryMap(type.children, dictionaries); + } + } + return dictionaries; +} +// Add these here so they're picked up by the externs creator +// in the build, and closure-compiler doesn't minify them away +Schema.prototype.fields = null; +Schema.prototype.metadata = null; +Schema.prototype.dictionaries = null; +Field.prototype.type = null; +Field.prototype.name = null; +Field.prototype.nullable = null; +Field.prototype.metadata = null; + +//# sourceMappingURL=schema.mjs.map diff --git a/frontend/node_modules/apache-arrow/schema.mjs.map b/frontend/node_modules/apache-arrow/schema.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..c5b04d18b7cfb17c237cd9f80fa6f1d8a7ad6486 --- /dev/null +++ b/frontend/node_modules/apache-arrow/schema.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["schema.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAIrB,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,QAAQ,IAAI,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAMhE,MAAM,OAAO,MAAM;IAsBf,YAAY,SAAkB,EAAE,EACpB,QAAqC,EACrC,YAA2C;QACnD,IAAI,CAAC,MAAM,GAAG,CAAC,MAAM,IAAI,EAAE,CAAwB,CAAC;QACpD,IAAI,CAAC,QAAQ,GAAG,QAAQ,IAAI,IAAI,GAAG,EAAE,CAAC;QACtC,IAAI,CAAC,YAAY,EAAE;YACf,YAAY,GAAG,qBAAqB,CAAC,MAAM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C;AAE7C,KAAK,CAAC,SAAiB,CAAC,IAAI,GAAG,IAAI,CAAC;AACpC,KAAK,CAAC,SAAiB,CAAC,IAAI,GAAG,IAAI,CAAC;AACpC,KAAK,CAAC,SAAiB,CAAC,QAAQ,GAAG,IAAI,CAAC;AACxC,KAAK,CAAC,SAAiB,CAAC,QAAQ,GAAG,IAAI,CAAC","file":"schema.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from './data';\nimport { Vector } from './vector';\nimport { DataType } from './type';\nimport { selectArgs } from './util/args';\nimport { selectFieldArgs } from './util/args';\nimport { instance as comparer } from './visitor/typecomparator';\n\ntype VectorMap = { [key: string]: Vector };\ntype Fields = (keyof T)[] | Field[];\ntype ChildData = T[keyof T][] | Data[] | Vector[];\n\nexport class Schema {\n\n public static from(children: T): Schema;\n public static from(children: T): Schema<{ [P in keyof T]: T[P]['type'] }>;\n public static from(children: ChildData, fields?: Fields): Schema;\n /** @nocollapse */\n public static from(...args: any[]) {\n return Schema.new(args[0], args[1]);\n }\n\n public static new(children: T): Schema;\n public static new(children: T): Schema<{ [P in keyof T]: T[P]['type'] }>;\n public static new(children: ChildData, fields?: Fields): Schema;\n /** @nocollapse */\n public static new(...args: any[]) {\n return new Schema(selectFieldArgs(args)[0]);\n }\n\n public readonly fields: Field[];\n public readonly metadata: Map;\n public readonly dictionaries: Map;\n\n constructor(fields: Field[] = [],\n metadata?: Map | null,\n dictionaries?: Map | null) {\n this.fields = (fields || []) as Field[];\n this.metadata = metadata || new Map();\n if (!dictionaries) {\n dictionaries = generateDictionaryMap(fields);\n }\n this.dictionaries = dictionaries;\n }\n public get [Symbol.toStringTag]() { return 'Schema'; }\n public toString() {\n return `Schema<{ ${this.fields.map((f, i) => `${i}: ${f}`).join(', ')} }>`;\n }\n\n public compareTo(other?: Schema | null): other is Schema {\n return comparer.compareSchemas(this, other);\n }\n\n public select(...columnNames: K[]) {\n const names = columnNames.reduce((xs, x) => (xs[x] = true) && xs, Object.create(null));\n return new Schema<{ [P in K]: T[P] }>(this.fields.filter((f) => names[f.name]), this.metadata);\n }\n public selectAt(...columnIndices: number[]) {\n return new Schema<{ [key: string]: K }>(columnIndices.map((i) => this.fields[i]).filter(Boolean), this.metadata);\n }\n\n public assign(schema: Schema): Schema;\n public assign(...fields: (Field | Field[])[]): Schema;\n public assign(...args: (Schema | Field | Field[])[]) {\n\n const other = args[0] instanceof Schema ? args[0] as Schema\n : new Schema(selectArgs>(Field, args));\n\n const curFields = [...this.fields] as Field[];\n const metadata = mergeMaps(mergeMaps(new Map(), this.metadata), other.metadata);\n const newFields = other.fields.filter((f2) => {\n const i = curFields.findIndex((f) => f.name === f2.name);\n return ~i ? (curFields[i] = f2.clone({\n metadata: mergeMaps(mergeMaps(new Map(), curFields[i].metadata), f2.metadata)\n })) && false : true;\n }) as Field[];\n\n const newDictionaries = generateDictionaryMap(newFields, new Map());\n\n return new Schema(\n [...curFields, ...newFields], metadata,\n new Map([...this.dictionaries, ...newDictionaries])\n );\n }\n}\n\nexport class Field {\n\n public static new(props: { name: string | number, type: T, nullable?: boolean, metadata?: Map | null }): Field;\n public static new(name: string | number | Field, type: T, nullable?: boolean, metadata?: Map | null): Field;\n /** @nocollapse */\n public static new(...args: any[]) {\n let [name, type, nullable, metadata] = args;\n if (args[0] && typeof args[0] === 'object') {\n ({ name } = args[0]);\n (type === undefined) && (type = args[0].type);\n (nullable === undefined) && (nullable = args[0].nullable);\n (metadata === undefined) && (metadata = args[0].metadata);\n }\n return new Field(`${name}`, type, nullable, metadata);\n }\n\n public readonly type: T;\n public readonly name: string;\n public readonly nullable: boolean;\n public readonly metadata: Map;\n\n constructor(name: string, type: T, nullable = false, metadata?: Map | null) {\n this.name = name;\n this.type = type;\n this.nullable = nullable;\n this.metadata = metadata || new Map();\n }\n\n public get typeId() { return this.type.typeId; }\n public get [Symbol.toStringTag]() { return 'Field'; }\n public toString() { return `${this.name}: ${this.type}`; }\n public compareTo(other?: Field | null): other is Field {\n return comparer.compareField(this, other);\n }\n public clone(props: { name?: string | number, type?: R, nullable?: boolean, metadata?: Map | null }): Field;\n public clone(name?: string | number | Field, type?: R, nullable?: boolean, metadata?: Map | null): Field;\n public clone(...args: any[]) {\n let [name, type, nullable, metadata] = args;\n (!args[0] || typeof args[0] !== 'object')\n ? ([name = this.name, type = this.type, nullable = this.nullable, metadata = this.metadata] = args)\n : ({name = this.name, type = this.type, nullable = this.nullable, metadata = this.metadata} = args[0]);\n return Field.new(name, type, nullable, metadata);\n }\n}\n\n/** @ignore */\nfunction mergeMaps(m1?: Map | null, m2?: Map | null): Map {\n return new Map([...(m1 || new Map()), ...(m2 || new Map())]);\n}\n\n/** @ignore */\nfunction generateDictionaryMap(fields: Field[], dictionaries = new Map()): Map {\n\n for (let i = -1, n = fields.length; ++i < n;) {\n const field = fields[i];\n const type = field.type;\n if (DataType.isDictionary(type)) {\n if (!dictionaries.has(type.id)) {\n dictionaries.set(type.id, type.dictionary);\n } else if (dictionaries.get(type.id) !== type.dictionary) {\n throw new Error(`Cannot create Schema containing two different dictionaries with the same Id`);\n }\n }\n if (type.children && type.children.length > 0) {\n generateDictionaryMap(type.children, dictionaries);\n }\n }\n\n return dictionaries;\n}\n\n// Add these here so they're picked up by the externs creator\n// in the build, and closure-compiler doesn't minify them away\n(Schema.prototype as any).fields = null;\n(Schema.prototype as any).metadata = null;\n(Schema.prototype as any).dictionaries = null;\n\n(Field.prototype as any).type = null;\n(Field.prototype as any).name = null;\n(Field.prototype as any).nullable = null;\n(Field.prototype as any).metadata = null;\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/table.d.ts b/frontend/node_modules/apache-arrow/table.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ba3fca002bb81c2d3a9817d7b1501a81de234b9c --- /dev/null +++ b/frontend/node_modules/apache-arrow/table.d.ts @@ -0,0 +1,167 @@ +import { Data } from './data'; +import { Column } from './column'; +import { Schema, Field } from './schema'; +import { RecordBatch } from './recordbatch'; +import { DataFrame } from './compute/dataframe'; +import { RecordBatchReader } from './ipc/reader'; +import { DataType, RowLike, Struct } from './type'; +import { Clonable, Sliceable, Applicative } from './vector'; +import { Vector, Chunked, VectorBuilderOptions, VectorBuilderOptionsAsync } from './vector/index'; +declare type VectorMap = { + [key: string]: Vector; +}; +declare type Fields = (keyof T)[] | Field[]; +declare type ChildData = Data[] | Vector[]; +declare type Columns = Column[] | Column[][]; +export interface Table { + get(index: number): Struct['TValue']; + [Symbol.iterator](): IterableIterator>; + slice(begin?: number, end?: number): Table; + concat(...others: Vector>[]): Table; + clone(chunks?: RecordBatch[], offsets?: Uint32Array): Table; + scan(next: import('./compute/dataframe').NextFunc, bind?: import('./compute/dataframe').BindFunc): void; + scanReverse(next: import('./compute/dataframe').NextFunc, bind?: import('./compute/dataframe').BindFunc): void; + countBy(name: import('./compute/predicate').Col | string): import('./compute/dataframe').CountByResult; + filter(predicate: import('./compute/predicate').Predicate): import('./compute/dataframe').FilteredDataFrame; +} +export declare class Table extends Chunked> implements DataFrame, Clonable>, Sliceable>, Applicative, Table> { + /** @nocollapse */ + static empty(schema?: Schema): Table; + static from(): Table<{}>; + static from(source: RecordBatchReader): Table; + static from(source: import('./ipc/reader').FromArg0): Table; + static from(source: import('./ipc/reader').FromArg2): Table; + static from(source: import('./ipc/reader').FromArg1): Promise>; + static from(source: import('./ipc/reader').FromArg3): Promise>; + static from(source: import('./ipc/reader').FromArg4): Promise>; + static from(source: import('./ipc/reader').FromArg5): Promise>; + static from(source: PromiseLike>): Promise>; + static from(options: VectorBuilderOptions, TNull>): Table; + static from(options: VectorBuilderOptionsAsync, TNull>): Promise>; + /** @nocollapse */ + static fromAsync(source: import('./ipc/reader').FromArgs): Promise>; + /** @nocollapse */ + static fromStruct(vector: Vector>): Table; + /** + * @summary Create a new Table from a collection of Columns or Vectors, + * with an optional list of names or Fields. + * + * + * `Table.new` accepts an Object of + * Columns or Vectors, where the keys will be used as the field names + * for the Schema: + * ```ts + * const i32s = Int32Vector.from([1, 2, 3]); + * const f32s = Float32Vector.from([.1, .2, .3]); + * const table = Table.new({ i32: i32s, f32: f32s }); + * assert(table.schema.fields[0].name === 'i32'); + * ``` + * + * It also accepts a a list of Vectors with an optional list of names or + * Fields for the resulting Schema. If the list is omitted or a name is + * missing, the numeric index of each Vector will be used as the name: + * ```ts + * const i32s = Int32Vector.from([1, 2, 3]); + * const f32s = Float32Vector.from([.1, .2, .3]); + * const table = Table.new([i32s, f32s], ['i32']); + * assert(table.schema.fields[0].name === 'i32'); + * assert(table.schema.fields[1].name === '1'); + * ``` + * + * If the supplied arguments are Columns, `Table.new` will infer the Schema + * from the Columns: + * ```ts + * const i32s = Column.new('i32', Int32Vector.from([1, 2, 3])); + * const f32s = Column.new('f32', Float32Vector.from([.1, .2, .3])); + * const table = Table.new(i32s, f32s); + * assert(table.schema.fields[0].name === 'i32'); + * assert(table.schema.fields[1].name === 'f32'); + * ``` + * + * If the supplied Vector or Column lengths are unequal, `Table.new` will + * extend the lengths of the shorter Columns, allocating additional bytes + * to represent the additional null slots. The memory required to allocate + * these additional bitmaps can be computed as: + * ```ts + * let additionalBytes = 0; + * for (let vec in shorter_vectors) { + * additionalBytes += (((longestLength - vec.length) + 63) & ~63) >> 3; + * } + * ``` + * + * For example, an additional null bitmap for one million null values would require + * 125,000 bytes (`((1e6 + 63) & ~63) >> 3`), or approx. `0.11MiB` + */ + static new(...columns: Columns): Table; + static new(children: T): Table<{ + [P in keyof T]: T[P]['type']; + }>; + static new(children: ChildData, fields?: Fields): Table; + constructor(batches: RecordBatch[]); + constructor(...batches: RecordBatch[]); + constructor(schema: Schema, batches: RecordBatch[]); + constructor(schema: Schema, ...batches: RecordBatch[]); + protected _schema: Schema; + protected _chunks: RecordBatch[]; + protected _children?: Column[]; + readonly schema: Schema; + readonly length: number; + readonly chunks: RecordBatch[]; + readonly numCols: number; + getColumn(name: R): Column; + getColumnAt(index: number): Column | null; + getColumnIndex(name: R): number; + getChildAt(index: number): Column | null; + serialize(encoding?: string, stream?: boolean): any; + count(): number; + select(...columnNames: K[]): Table<{ + [key: string]: any; + }>; + selectAt(...columnIndices: number[]): Table<{ + [key: string]: K; + }>; + assign(other: Table): Table; +} +export {}; diff --git a/frontend/node_modules/apache-arrow/table.js b/frontend/node_modules/apache-arrow/table.js new file mode 100644 index 0000000000000000000000000000000000000000..cc697d605ec176f43d4597c73ab4a1dbfa9bcfe7 --- /dev/null +++ b/frontend/node_modules/apache-arrow/table.js @@ -0,0 +1,179 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const column_1 = require("./column"); +const schema_1 = require("./schema"); +const recordbatch_1 = require("./recordbatch"); +const reader_1 = require("./ipc/reader"); +const type_1 = require("./type"); +const args_1 = require("./util/args"); +const compat_1 = require("./util/compat"); +const writer_1 = require("./ipc/writer"); +const recordbatch_2 = require("./util/recordbatch"); +const index_1 = require("./vector/index"); +class Table extends index_1.Chunked { + constructor(...args) { + let schema = null; + if (args[0] instanceof schema_1.Schema) { + schema = args.shift(); + } + let chunks = args_1.selectArgs(recordbatch_1.RecordBatch, args); + if (!schema && !(schema = chunks[0] && chunks[0].schema)) { + throw new TypeError('Table must be initialized with a Schema or at least one RecordBatch'); + } + chunks[0] || (chunks[0] = new recordbatch_1._InternalEmptyPlaceholderRecordBatch(schema)); + super(new type_1.Struct(schema.fields), chunks); + this._schema = schema; + this._chunks = chunks; + } + /** @nocollapse */ + static empty(schema = new schema_1.Schema([])) { return new Table(schema, []); } + /** @nocollapse */ + static from(input) { + if (!input) { + return Table.empty(); + } + if (typeof input === 'object') { + let table = compat_1.isIterable(input['values']) ? tableFromIterable(input) + : compat_1.isAsyncIterable(input['values']) ? tableFromAsyncIterable(input) + : null; + if (table !== null) { + return table; + } + } + let reader = reader_1.RecordBatchReader.from(input); + if (compat_1.isPromise(reader)) { + return (async () => await Table.from(await reader))(); + } + if (reader.isSync() && (reader = reader.open())) { + return !reader.schema ? Table.empty() : new Table(reader.schema, [...reader]); + } + return (async (opening) => { + const reader = await opening; + const schema = reader.schema; + const batches = []; + if (schema) { + for await (let batch of reader) { + batches.push(batch); + } + return new Table(schema, batches); + } + return Table.empty(); + })(reader.open()); + } + /** @nocollapse */ + static async fromAsync(source) { + return await Table.from(source); + } + /** @nocollapse */ + static fromStruct(vector) { + return Table.new(vector.data.childData, vector.type.children); + } + /** @nocollapse */ + static new(...cols) { + return new Table(...recordbatch_2.distributeColumnsIntoRecordBatches(args_1.selectColumnArgs(cols))); + } + get schema() { return this._schema; } + get length() { return this._length; } + get chunks() { return this._chunks; } + get numCols() { return this._numChildren; } + clone(chunks = this._chunks) { + return new Table(this._schema, chunks); + } + getColumn(name) { + return this.getColumnAt(this.getColumnIndex(name)); + } + getColumnAt(index) { + return this.getChildAt(index); + } + getColumnIndex(name) { + return this._schema.fields.findIndex((f) => f.name === name); + } + getChildAt(index) { + if (index < 0 || index >= this.numChildren) { + return null; + } + let field, child; + const fields = this._schema.fields; + const columns = this._children || (this._children = []); + if (child = columns[index]) { + return child; + } + if (field = fields[index]) { + const chunks = this._chunks + .map((chunk) => chunk.getChildAt(index)) + .filter((vec) => vec != null); + if (chunks.length > 0) { + return (columns[index] = new column_1.Column(field, chunks)); + } + } + return null; + } + // @ts-ignore + serialize(encoding = 'binary', stream = true) { + const Writer = !stream + ? writer_1.RecordBatchFileWriter + : writer_1.RecordBatchStreamWriter; + return Writer.writeAll(this).toUint8Array(true); + } + count() { + return this._length; + } + select(...columnNames) { + const nameToIndex = this._schema.fields.reduce((m, f, i) => m.set(f.name, i), new Map()); + return this.selectAt(...columnNames.map((columnName) => nameToIndex.get(columnName)).filter((x) => x > -1)); + } + selectAt(...columnIndices) { + const schema = this._schema.selectAt(...columnIndices); + return new Table(schema, this._chunks.map(({ length, data: { childData } }) => { + return new recordbatch_1.RecordBatch(schema, length, columnIndices.map((i) => childData[i]).filter(Boolean)); + })); + } + assign(other) { + const fields = this._schema.fields; + const [indices, oldToNew] = other.schema.fields.reduce((memo, f2, newIdx) => { + const [indices, oldToNew] = memo; + const i = fields.findIndex((f) => f.name === f2.name); + ~i ? (oldToNew[i] = newIdx) : indices.push(newIdx); + return memo; + }, [[], []]); + const schema = this._schema.assign(other.schema); + const columns = [ + ...fields.map((_f, i, _fs, j = oldToNew[i]) => (j === undefined ? this.getColumnAt(i) : other.getColumnAt(j))), + ...indices.map((i) => other.getColumnAt(i)) + ].filter(Boolean); + return new Table(...recordbatch_2.distributeVectorsIntoRecordBatches(schema, columns)); + } +} +exports.Table = Table; +function tableFromIterable(input) { + const { type } = input; + if (type instanceof type_1.Struct) { + return Table.fromStruct(index_1.StructVector.from(input)); + } + return null; +} +function tableFromAsyncIterable(input) { + const { type } = input; + if (type instanceof type_1.Struct) { + return index_1.StructVector.from(input).then((vector) => Table.fromStruct(vector)); + } + return null; +} + +//# sourceMappingURL=table.js.map diff --git a/frontend/node_modules/apache-arrow/table.js.map b/frontend/node_modules/apache-arrow/table.js.map new file mode 100644 index 0000000000000000000000000000000000000000..31b7cf33c1ffa7595dd696538cb14ba43fbcf314 --- /dev/null +++ b/frontend/node_modules/apache-arrow/table.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["table.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAGrB,qCAAkC;AAClC,qCAAyC;AACzC,+CAAkF;AAElF,yCAAiD;AACjD,iCAAmD;AACnD,sCAA2D;AAE3D,0CAAuE;AACvE,yCAA8E;AAC9E,oDAA4G;AAC5G,0CAAgH;AAsBhH,MAAa,KACT,SAAQ,eAAkB;IA8H1B,YAAY,GAAG,IAAW;QAEtB,IAAI,MAAM,GAAc,IAAK,CAAC;QAE9B,IAAI,IAAI,CAAC,CAAC,CAAC,YAAY,eAAM,EAAE;YAAE,MAAM,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;SAAE;QAEzD,IAAI,MAAM,GAAG,iBAAU,CAAiB,yBAAW,EAAE,IAAI,CAAC,CAAC;QAE3D,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE;YACtD,MAAM,IAAI,SAAS,CAAC,qEAAqE,CAAC,CAAC;SAC9F;QAED,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,kDAAoC,CAAC,MAAM,CAAC,CAAC,CAAC;QAE5E,KAAK,CAAC,IAAI,aAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;QAEzC,IAAI,CAAC,OAAO,GAAG,MAAM,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,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAE,CAAC;YACpE,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAE,CAAC;SAC/C,CAAC,MAAM,CAAC,OAAO,CAAyC,CAAC;QAE1D,OAAO,IAAI,KAAK,CAAQ,GAAG,gDAAkC,CAAM,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACzF,CAAC;CACJ;AAlOD,sBAkOC;AAED,SAAS,iBAAiB,CAA2D,KAA6C;IAC9H,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IACvB,IAAI,IAAI,YAAY,aAAM,EAAE;QACxB,OAAO,KAAK,CAAC,UAAU,CAAC,oBAAY,CAAC,IAAI,CAAC,KAA+C,CAAC,CAAC,CAAC;KAC/F;IACD,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,SAAS,sBAAsB,CAA2D,KAAkD;IACxI,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IACvB,IAAI,IAAI,YAAY,aAAM,EAAE;QACxB,OAAO,oBAAY,CAAC,IAAI,CAAC,KAAoD,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;KAC7H;IACD,OAAO,IAAI,CAAC;AAChB,CAAC","file":"table.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from './data';\nimport { Column } from './column';\nimport { Schema, Field } from './schema';\nimport { RecordBatch, _InternalEmptyPlaceholderRecordBatch } from './recordbatch';\nimport { DataFrame } from './compute/dataframe';\nimport { RecordBatchReader } from './ipc/reader';\nimport { DataType, RowLike, Struct } from './type';\nimport { selectColumnArgs, selectArgs } from './util/args';\nimport { Clonable, Sliceable, Applicative } from './vector';\nimport { isPromise, isIterable, isAsyncIterable } from './util/compat';\nimport { RecordBatchFileWriter, RecordBatchStreamWriter } from './ipc/writer';\nimport { distributeColumnsIntoRecordBatches, distributeVectorsIntoRecordBatches } from './util/recordbatch';\nimport { Vector, Chunked, StructVector, VectorBuilderOptions, VectorBuilderOptionsAsync } from './vector/index';\n\ntype VectorMap = { [key: string]: Vector };\ntype Fields = (keyof T)[] | Field[];\ntype ChildData = Data[] | Vector[];\ntype Columns = Column[] | Column[][];\n\nexport interface Table {\n\n get(index: number): Struct['TValue'];\n [Symbol.iterator](): IterableIterator>;\n\n slice(begin?: number, end?: number): Table;\n concat(...others: Vector>[]): Table;\n clone(chunks?: RecordBatch[], offsets?: Uint32Array): Table;\n\n scan(next: import('./compute/dataframe').NextFunc, bind?: import('./compute/dataframe').BindFunc): void;\n scanReverse(next: import('./compute/dataframe').NextFunc, bind?: import('./compute/dataframe').BindFunc): void;\n countBy(name: import('./compute/predicate').Col | string): import('./compute/dataframe').CountByResult;\n filter(predicate: import('./compute/predicate').Predicate): import('./compute/dataframe').FilteredDataFrame;\n}\n\nexport class Table\n extends Chunked>\n implements DataFrame,\n Clonable>,\n Sliceable>,\n Applicative, Table> {\n\n /** @nocollapse */\n public static empty(schema = new Schema([])) { return new Table(schema, []); }\n\n public static from(): Table<{}>;\n public static from(source: RecordBatchReader): Table;\n public static from(source: import('./ipc/reader').FromArg0): Table;\n public static from(source: import('./ipc/reader').FromArg2): Table;\n public static from(source: import('./ipc/reader').FromArg1): Promise>;\n public static from(source: import('./ipc/reader').FromArg3): Promise>;\n public static from(source: import('./ipc/reader').FromArg4): Promise>;\n public static from(source: import('./ipc/reader').FromArg5): Promise>;\n public static from(source: PromiseLike>): Promise>;\n public static from(options: VectorBuilderOptions, TNull>): Table;\n public static from(options: VectorBuilderOptionsAsync, TNull>): Promise>;\n /** @nocollapse */\n public static from(input?: any) {\n\n if (!input) { return Table.empty(); }\n\n if (typeof input === 'object') {\n let table = isIterable(input['values']) ? tableFromIterable(input)\n : isAsyncIterable(input['values']) ? tableFromAsyncIterable(input)\n : null;\n if (table !== null) { return table; }\n }\n\n let reader = RecordBatchReader.from(input) as RecordBatchReader | Promise>;\n\n if (isPromise>(reader)) {\n return (async () => await Table.from(await reader))();\n }\n if (reader.isSync() && (reader = reader.open())) {\n return !reader.schema ? Table.empty() : new Table(reader.schema, [...reader]);\n }\n return (async (opening) => {\n const reader = await opening;\n const schema = reader.schema;\n const batches: RecordBatch[] = [];\n if (schema) {\n for await (let batch of reader) {\n batches.push(batch);\n }\n return new Table(schema, batches);\n }\n return Table.empty();\n })(reader.open());\n }\n\n /** @nocollapse */\n public static async fromAsync(source: import('./ipc/reader').FromArgs): Promise> {\n return await Table.from(source as any);\n }\n\n /** @nocollapse */\n public static fromStruct(vector: Vector>) {\n return Table.new(vector.data.childData as Data[], vector.type.children);\n }\n\n /**\n * @summary Create a new Table from a collection of Columns or Vectors,\n * with an optional list of names or Fields.\n *\n *\n * `Table.new` accepts an Object of\n * Columns or Vectors, where the keys will be used as the field names\n * for the Schema:\n * ```ts\n * const i32s = Int32Vector.from([1, 2, 3]);\n * const f32s = Float32Vector.from([.1, .2, .3]);\n * const table = Table.new({ i32: i32s, f32: f32s });\n * assert(table.schema.fields[0].name === 'i32');\n * ```\n *\n * It also accepts a a list of Vectors with an optional list of names or\n * Fields for the resulting Schema. If the list is omitted or a name is\n * missing, the numeric index of each Vector will be used as the name:\n * ```ts\n * const i32s = Int32Vector.from([1, 2, 3]);\n * const f32s = Float32Vector.from([.1, .2, .3]);\n * const table = Table.new([i32s, f32s], ['i32']);\n * assert(table.schema.fields[0].name === 'i32');\n * assert(table.schema.fields[1].name === '1');\n * ```\n *\n * If the supplied arguments are Columns, `Table.new` will infer the Schema\n * from the Columns:\n * ```ts\n * const i32s = Column.new('i32', Int32Vector.from([1, 2, 3]));\n * const f32s = Column.new('f32', Float32Vector.from([.1, .2, .3]));\n * const table = Table.new(i32s, f32s);\n * assert(table.schema.fields[0].name === 'i32');\n * assert(table.schema.fields[1].name === 'f32');\n * ```\n *\n * If the supplied Vector or Column lengths are unequal, `Table.new` will\n * extend the lengths of the shorter Columns, allocating additional bytes\n * to represent the additional null slots. The memory required to allocate\n * these additional bitmaps can be computed as:\n * ```ts\n * let additionalBytes = 0;\n * for (let vec in shorter_vectors) {\n * additionalBytes += (((longestLength - vec.length) + 63) & ~63) >> 3;\n * }\n * ```\n *\n * For example, an additional null bitmap for one million null values would require\n * 125,000 bytes (`((1e6 + 63) & ~63) >> 3`), or approx. `0.11MiB`\n */\n public static new(...columns: Columns): Table;\n public static new(children: T): Table<{ [P in keyof T]: T[P]['type'] }>;\n public static new(children: ChildData, fields?: Fields): Table;\n /** @nocollapse */\n public static new(...cols: any[]) {\n return new Table(...distributeColumnsIntoRecordBatches(selectColumnArgs(cols)));\n }\n\n constructor(batches: RecordBatch[]);\n constructor(...batches: RecordBatch[]);\n constructor(schema: Schema, batches: RecordBatch[]);\n constructor(schema: Schema, ...batches: RecordBatch[]);\n constructor(...args: any[]) {\n\n let schema: Schema = null!;\n\n if (args[0] instanceof Schema) { schema = args.shift(); }\n\n let chunks = selectArgs>(RecordBatch, args);\n\n if (!schema && !(schema = chunks[0] && chunks[0].schema)) {\n throw new TypeError('Table must be initialized with a Schema or at least one RecordBatch');\n }\n\n chunks[0] || (chunks[0] = new _InternalEmptyPlaceholderRecordBatch(schema));\n\n super(new Struct(schema.fields), chunks);\n\n this._schema = schema;\n this._chunks = chunks;\n }\n\n protected _schema: Schema;\n // List of inner RecordBatches\n protected _chunks: RecordBatch[];\n protected _children?: Column[];\n\n public get schema() { return this._schema; }\n public get length() { return this._length; }\n public get chunks() { return this._chunks; }\n public get numCols() { return this._numChildren; }\n\n public clone(chunks = this._chunks) {\n return new Table(this._schema, chunks);\n }\n\n public getColumn(name: R): Column {\n return this.getColumnAt(this.getColumnIndex(name)) as Column;\n }\n public getColumnAt(index: number): Column | null {\n return this.getChildAt(index);\n }\n public getColumnIndex(name: R) {\n return this._schema.fields.findIndex((f) => f.name === name);\n }\n public getChildAt(index: number): Column | null {\n if (index < 0 || index >= this.numChildren) { return null; }\n let field: Field, child: Column;\n const fields = (this._schema as Schema).fields;\n const columns = this._children || (this._children = []) as Column[];\n if (child = columns[index]) { return child as Column; }\n if (field = fields[index]) {\n const chunks = this._chunks\n .map((chunk) => chunk.getChildAt(index))\n .filter((vec): vec is Vector => vec != null);\n if (chunks.length > 0) {\n return (columns[index] = new Column(field, chunks));\n }\n }\n return null;\n }\n\n // @ts-ignore\n public serialize(encoding = 'binary', stream = true) {\n const Writer = !stream\n ? RecordBatchFileWriter\n : RecordBatchStreamWriter;\n return Writer.writeAll(this).toUint8Array(true);\n }\n public count(): number {\n return this._length;\n }\n public select(...columnNames: K[]) {\n const nameToIndex = this._schema.fields.reduce((m, f, i) => m.set(f.name as K, i), new Map());\n return this.selectAt(...columnNames.map((columnName) => nameToIndex.get(columnName)!).filter((x) => x > -1));\n }\n public selectAt(...columnIndices: number[]) {\n const schema = this._schema.selectAt(...columnIndices);\n return new Table(schema, this._chunks.map(({ length, data: { childData } }) => {\n return new RecordBatch(schema, length, columnIndices.map((i) => childData[i]).filter(Boolean));\n }));\n }\n public assign(other: Table) {\n\n const fields = this._schema.fields;\n const [indices, oldToNew] = other.schema.fields.reduce((memo, f2, newIdx) => {\n const [indices, oldToNew] = memo;\n const i = fields.findIndex((f) => f.name === f2.name);\n ~i ? (oldToNew[i] = newIdx) : indices.push(newIdx);\n return memo;\n }, [[], []] as number[][]);\n\n const schema = this._schema.assign(other.schema);\n const columns = [\n ...fields.map((_f, i, _fs, j = oldToNew[i]) =>\n (j === undefined ? this.getColumnAt(i) : other.getColumnAt(j))!),\n ...indices.map((i) => other.getColumnAt(i)!)\n ].filter(Boolean) as Column<(T & R)[keyof T | keyof R]>[];\n\n return new Table(...distributeVectorsIntoRecordBatches(schema, columns));\n }\n}\n\nfunction tableFromIterable(input: VectorBuilderOptions, TNull>) {\n const { type } = input;\n if (type instanceof Struct) {\n return Table.fromStruct(StructVector.from(input as VectorBuilderOptions, TNull>));\n }\n return null;\n}\n\nfunction tableFromAsyncIterable(input: VectorBuilderOptionsAsync, TNull>) {\n const { type } = input;\n if (type instanceof Struct) {\n return StructVector.from(input as VectorBuilderOptionsAsync, TNull>).then((vector) => Table.fromStruct(vector));\n }\n return null;\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/table.mjs b/frontend/node_modules/apache-arrow/table.mjs new file mode 100644 index 0000000000000000000000000000000000000000..fdafd50194bb16c4ce7659e9952bb67ebc20dcda --- /dev/null +++ b/frontend/node_modules/apache-arrow/table.mjs @@ -0,0 +1,176 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { Column } from './column'; +import { Schema } from './schema'; +import { RecordBatch, _InternalEmptyPlaceholderRecordBatch } from './recordbatch'; +import { RecordBatchReader } from './ipc/reader'; +import { Struct } from './type'; +import { selectColumnArgs, selectArgs } from './util/args'; +import { isPromise, isIterable, isAsyncIterable } from './util/compat'; +import { RecordBatchFileWriter, RecordBatchStreamWriter } from './ipc/writer'; +import { distributeColumnsIntoRecordBatches, distributeVectorsIntoRecordBatches } from './util/recordbatch'; +import { Chunked, StructVector } from './vector/index'; +export class Table extends Chunked { + constructor(...args) { + let schema = null; + if (args[0] instanceof Schema) { + schema = args.shift(); + } + let chunks = selectArgs(RecordBatch, args); + if (!schema && !(schema = chunks[0] && chunks[0].schema)) { + throw new TypeError('Table must be initialized with a Schema or at least one RecordBatch'); + } + chunks[0] || (chunks[0] = new _InternalEmptyPlaceholderRecordBatch(schema)); + super(new Struct(schema.fields), chunks); + this._schema = schema; + this._chunks = chunks; + } + /** @nocollapse */ + static empty(schema = new Schema([])) { return new Table(schema, []); } + /** @nocollapse */ + static from(input) { + if (!input) { + return Table.empty(); + } + if (typeof input === 'object') { + let table = isIterable(input['values']) ? tableFromIterable(input) + : isAsyncIterable(input['values']) ? tableFromAsyncIterable(input) + : null; + if (table !== null) { + return table; + } + } + let reader = RecordBatchReader.from(input); + if (isPromise(reader)) { + return (async () => await Table.from(await reader))(); + } + if (reader.isSync() && (reader = reader.open())) { + return !reader.schema ? Table.empty() : new Table(reader.schema, [...reader]); + } + return (async (opening) => { + const reader = await opening; + const schema = reader.schema; + const batches = []; + if (schema) { + for await (let batch of reader) { + batches.push(batch); + } + return new Table(schema, batches); + } + return Table.empty(); + })(reader.open()); + } + /** @nocollapse */ + static async fromAsync(source) { + return await Table.from(source); + } + /** @nocollapse */ + static fromStruct(vector) { + return Table.new(vector.data.childData, vector.type.children); + } + /** @nocollapse */ + static new(...cols) { + return new Table(...distributeColumnsIntoRecordBatches(selectColumnArgs(cols))); + } + get schema() { return this._schema; } + get length() { return this._length; } + get chunks() { return this._chunks; } + get numCols() { return this._numChildren; } + clone(chunks = this._chunks) { + return new Table(this._schema, chunks); + } + getColumn(name) { + return this.getColumnAt(this.getColumnIndex(name)); + } + getColumnAt(index) { + return this.getChildAt(index); + } + getColumnIndex(name) { + return this._schema.fields.findIndex((f) => f.name === name); + } + getChildAt(index) { + if (index < 0 || index >= this.numChildren) { + return null; + } + let field, child; + const fields = this._schema.fields; + const columns = this._children || (this._children = []); + if (child = columns[index]) { + return child; + } + if (field = fields[index]) { + const chunks = this._chunks + .map((chunk) => chunk.getChildAt(index)) + .filter((vec) => vec != null); + if (chunks.length > 0) { + return (columns[index] = new Column(field, chunks)); + } + } + return null; + } + // @ts-ignore + serialize(encoding = 'binary', stream = true) { + const Writer = !stream + ? RecordBatchFileWriter + : RecordBatchStreamWriter; + return Writer.writeAll(this).toUint8Array(true); + } + count() { + return this._length; + } + select(...columnNames) { + const nameToIndex = this._schema.fields.reduce((m, f, i) => m.set(f.name, i), new Map()); + return this.selectAt(...columnNames.map((columnName) => nameToIndex.get(columnName)).filter((x) => x > -1)); + } + selectAt(...columnIndices) { + const schema = this._schema.selectAt(...columnIndices); + return new Table(schema, this._chunks.map(({ length, data: { childData } }) => { + return new RecordBatch(schema, length, columnIndices.map((i) => childData[i]).filter(Boolean)); + })); + } + assign(other) { + const fields = this._schema.fields; + const [indices, oldToNew] = other.schema.fields.reduce((memo, f2, newIdx) => { + const [indices, oldToNew] = memo; + const i = fields.findIndex((f) => f.name === f2.name); + ~i ? (oldToNew[i] = newIdx) : indices.push(newIdx); + return memo; + }, [[], []]); + const schema = this._schema.assign(other.schema); + const columns = [ + ...fields.map((_f, i, _fs, j = oldToNew[i]) => (j === undefined ? this.getColumnAt(i) : other.getColumnAt(j))), + ...indices.map((i) => other.getColumnAt(i)) + ].filter(Boolean); + return new Table(...distributeVectorsIntoRecordBatches(schema, columns)); + } +} +function tableFromIterable(input) { + const { type } = input; + if (type instanceof Struct) { + return Table.fromStruct(StructVector.from(input)); + } + return null; +} +function tableFromAsyncIterable(input) { + const { type } = input; + if (type instanceof Struct) { + return StructVector.from(input).then((vector) => Table.fromStruct(vector)); + } + return null; +} + +//# sourceMappingURL=table.mjs.map diff --git a/frontend/node_modules/apache-arrow/table.mjs.map b/frontend/node_modules/apache-arrow/table.mjs.map new file mode 100644 index 0000000000000000000000000000000000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CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;KAC7H;IACD,OAAO,IAAI,CAAC;AAChB,CAAC","file":"table.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from './data';\nimport { Column } from './column';\nimport { Schema, Field } from './schema';\nimport { RecordBatch, _InternalEmptyPlaceholderRecordBatch } from './recordbatch';\nimport { DataFrame } from './compute/dataframe';\nimport { RecordBatchReader } from './ipc/reader';\nimport { DataType, RowLike, Struct } from './type';\nimport { selectColumnArgs, selectArgs } from './util/args';\nimport { Clonable, Sliceable, Applicative } from './vector';\nimport { isPromise, isIterable, isAsyncIterable } from './util/compat';\nimport { RecordBatchFileWriter, RecordBatchStreamWriter } from './ipc/writer';\nimport { distributeColumnsIntoRecordBatches, distributeVectorsIntoRecordBatches } from './util/recordbatch';\nimport { Vector, Chunked, StructVector, VectorBuilderOptions, VectorBuilderOptionsAsync } from './vector/index';\n\ntype VectorMap = { [key: string]: Vector };\ntype Fields = (keyof T)[] | Field[];\ntype ChildData = Data[] | Vector[];\ntype Columns = Column[] | Column[][];\n\nexport interface Table {\n\n get(index: number): Struct['TValue'];\n [Symbol.iterator](): IterableIterator>;\n\n slice(begin?: number, end?: number): Table;\n concat(...others: Vector>[]): Table;\n clone(chunks?: RecordBatch[], offsets?: Uint32Array): Table;\n\n scan(next: import('./compute/dataframe').NextFunc, bind?: import('./compute/dataframe').BindFunc): void;\n scanReverse(next: import('./compute/dataframe').NextFunc, bind?: import('./compute/dataframe').BindFunc): void;\n countBy(name: import('./compute/predicate').Col | string): import('./compute/dataframe').CountByResult;\n filter(predicate: import('./compute/predicate').Predicate): import('./compute/dataframe').FilteredDataFrame;\n}\n\nexport class Table\n extends Chunked>\n implements DataFrame,\n Clonable>,\n Sliceable>,\n Applicative, Table> {\n\n /** @nocollapse */\n public static empty(schema = new Schema([])) { return new Table(schema, []); }\n\n public static from(): Table<{}>;\n public static from(source: RecordBatchReader): Table;\n public static from(source: import('./ipc/reader').FromArg0): Table;\n public static from(source: import('./ipc/reader').FromArg2): Table;\n public static from(source: import('./ipc/reader').FromArg1): Promise>;\n public static from(source: import('./ipc/reader').FromArg3): Promise>;\n public static from(source: import('./ipc/reader').FromArg4): Promise>;\n public static from(source: import('./ipc/reader').FromArg5): Promise>;\n public static from(source: PromiseLike>): Promise>;\n public static from(options: VectorBuilderOptions, TNull>): Table;\n public static from(options: VectorBuilderOptionsAsync, TNull>): Promise>;\n /** @nocollapse */\n public static from(input?: any) {\n\n if (!input) { return Table.empty(); }\n\n if (typeof input === 'object') {\n let table = isIterable(input['values']) ? tableFromIterable(input)\n : isAsyncIterable(input['values']) ? tableFromAsyncIterable(input)\n : null;\n if (table !== null) { return table; }\n }\n\n let reader = RecordBatchReader.from(input) as RecordBatchReader | Promise>;\n\n if (isPromise>(reader)) {\n return (async () => await Table.from(await reader))();\n }\n if (reader.isSync() && (reader = reader.open())) {\n return !reader.schema ? Table.empty() : new Table(reader.schema, [...reader]);\n }\n return (async (opening) => {\n const reader = await opening;\n const schema = reader.schema;\n const batches: RecordBatch[] = [];\n if (schema) {\n for await (let batch of reader) {\n batches.push(batch);\n }\n return new Table(schema, batches);\n }\n return Table.empty();\n })(reader.open());\n }\n\n /** @nocollapse */\n public static async fromAsync(source: import('./ipc/reader').FromArgs): Promise> {\n return await Table.from(source as any);\n }\n\n /** @nocollapse */\n public static fromStruct(vector: Vector>) {\n return Table.new(vector.data.childData as Data[], vector.type.children);\n }\n\n /**\n * @summary Create a new Table from a collection of Columns or Vectors,\n * with an optional list of names or Fields.\n *\n *\n * `Table.new` accepts an Object of\n * Columns or Vectors, where the keys will be used as the field names\n * for the Schema:\n * ```ts\n * const i32s = Int32Vector.from([1, 2, 3]);\n * const f32s = Float32Vector.from([.1, .2, .3]);\n * const table = Table.new({ i32: i32s, f32: f32s });\n * assert(table.schema.fields[0].name === 'i32');\n * ```\n *\n * It also accepts a a list of Vectors with an optional list of names or\n * Fields for the resulting Schema. If the list is omitted or a name is\n * missing, the numeric index of each Vector will be used as the name:\n * ```ts\n * const i32s = Int32Vector.from([1, 2, 3]);\n * const f32s = Float32Vector.from([.1, .2, .3]);\n * const table = Table.new([i32s, f32s], ['i32']);\n * assert(table.schema.fields[0].name === 'i32');\n * assert(table.schema.fields[1].name === '1');\n * ```\n *\n * If the supplied arguments are Columns, `Table.new` will infer the Schema\n * from the Columns:\n * ```ts\n * const i32s = Column.new('i32', Int32Vector.from([1, 2, 3]));\n * const f32s = Column.new('f32', Float32Vector.from([.1, .2, .3]));\n * const table = Table.new(i32s, f32s);\n * assert(table.schema.fields[0].name === 'i32');\n * assert(table.schema.fields[1].name === 'f32');\n * ```\n *\n * If the supplied Vector or Column lengths are unequal, `Table.new` will\n * extend the lengths of the shorter Columns, allocating additional bytes\n * to represent the additional null slots. The memory required to allocate\n * these additional bitmaps can be computed as:\n * ```ts\n * let additionalBytes = 0;\n * for (let vec in shorter_vectors) {\n * additionalBytes += (((longestLength - vec.length) + 63) & ~63) >> 3;\n * }\n * ```\n *\n * For example, an additional null bitmap for one million null values would require\n * 125,000 bytes (`((1e6 + 63) & ~63) >> 3`), or approx. `0.11MiB`\n */\n public static new(...columns: Columns): Table;\n public static new(children: T): Table<{ [P in keyof T]: T[P]['type'] }>;\n public static new(children: ChildData, fields?: Fields): Table;\n /** @nocollapse */\n public static new(...cols: any[]) {\n return new Table(...distributeColumnsIntoRecordBatches(selectColumnArgs(cols)));\n }\n\n constructor(batches: RecordBatch[]);\n constructor(...batches: RecordBatch[]);\n constructor(schema: Schema, batches: RecordBatch[]);\n constructor(schema: Schema, ...batches: RecordBatch[]);\n constructor(...args: any[]) {\n\n let schema: Schema = null!;\n\n if (args[0] instanceof Schema) { schema = args.shift(); }\n\n let chunks = selectArgs>(RecordBatch, args);\n\n if (!schema && !(schema = chunks[0] && chunks[0].schema)) {\n throw new TypeError('Table must be initialized with a Schema or at least one RecordBatch');\n }\n\n chunks[0] || (chunks[0] = new _InternalEmptyPlaceholderRecordBatch(schema));\n\n super(new Struct(schema.fields), chunks);\n\n this._schema = schema;\n this._chunks = chunks;\n }\n\n protected _schema: Schema;\n // List of inner RecordBatches\n protected _chunks: RecordBatch[];\n protected _children?: Column[];\n\n public get schema() { return this._schema; }\n public get length() { return this._length; }\n public get chunks() { return this._chunks; }\n public get numCols() { return this._numChildren; }\n\n public clone(chunks = this._chunks) {\n return new Table(this._schema, chunks);\n }\n\n public getColumn(name: R): Column {\n return this.getColumnAt(this.getColumnIndex(name)) as Column;\n }\n public getColumnAt(index: number): Column | null {\n return this.getChildAt(index);\n }\n public getColumnIndex(name: R) {\n return this._schema.fields.findIndex((f) => f.name === name);\n }\n public getChildAt(index: number): Column | null {\n if (index < 0 || index >= this.numChildren) { return null; }\n let field: Field, child: Column;\n const fields = (this._schema as Schema).fields;\n const columns = this._children || (this._children = []) as Column[];\n if (child = columns[index]) { return child as Column; }\n if (field = fields[index]) {\n const chunks = this._chunks\n .map((chunk) => chunk.getChildAt(index))\n .filter((vec): vec is Vector => vec != null);\n if (chunks.length > 0) {\n return (columns[index] = new Column(field, chunks));\n }\n }\n return null;\n }\n\n // @ts-ignore\n public serialize(encoding = 'binary', stream = true) {\n const Writer = !stream\n ? RecordBatchFileWriter\n : RecordBatchStreamWriter;\n return Writer.writeAll(this).toUint8Array(true);\n }\n public count(): number {\n return this._length;\n }\n public select(...columnNames: K[]) {\n const nameToIndex = this._schema.fields.reduce((m, f, i) => m.set(f.name as K, i), new Map());\n return this.selectAt(...columnNames.map((columnName) => nameToIndex.get(columnName)!).filter((x) => x > -1));\n }\n public selectAt(...columnIndices: number[]) {\n const schema = this._schema.selectAt(...columnIndices);\n return new Table(schema, this._chunks.map(({ length, data: { childData } }) => {\n return new RecordBatch(schema, length, columnIndices.map((i) => childData[i]).filter(Boolean));\n }));\n }\n public assign(other: Table) {\n\n const fields = this._schema.fields;\n const [indices, oldToNew] = other.schema.fields.reduce((memo, f2, newIdx) => {\n const [indices, oldToNew] = memo;\n const i = fields.findIndex((f) => f.name === f2.name);\n ~i ? (oldToNew[i] = newIdx) : indices.push(newIdx);\n return memo;\n }, [[], []] as number[][]);\n\n const schema = this._schema.assign(other.schema);\n const columns = [\n ...fields.map((_f, i, _fs, j = oldToNew[i]) =>\n (j === undefined ? this.getColumnAt(i) : other.getColumnAt(j))!),\n ...indices.map((i) => other.getColumnAt(i)!)\n ].filter(Boolean) as Column<(T & R)[keyof T | keyof R]>[];\n\n return new Table(...distributeVectorsIntoRecordBatches(schema, columns));\n }\n}\n\nfunction tableFromIterable(input: VectorBuilderOptions, TNull>) {\n const { type } = input;\n if (type instanceof Struct) {\n return Table.fromStruct(StructVector.from(input as VectorBuilderOptions, TNull>));\n }\n return null;\n}\n\nfunction tableFromAsyncIterable(input: VectorBuilderOptionsAsync, TNull>) {\n const { type } = input;\n if (type instanceof Struct) {\n return StructVector.from(input as VectorBuilderOptionsAsync, TNull>).then((vector) => Table.fromStruct(vector));\n }\n return null;\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/type.d.ts b/frontend/node_modules/apache-arrow/type.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c74c8963a00fd27e0b3ef0afbe40f74d3af0e1b2 --- /dev/null +++ b/frontend/node_modules/apache-arrow/type.d.ts @@ -0,0 +1,588 @@ +import { Field } from './schema'; +import { flatbuffers } from 'flatbuffers'; +import { TypedArrayConstructor } from './interfaces'; +import { VectorType as V, TypeToDataType } from './interfaces'; +import Long = flatbuffers.Long; +import { Type, Precision, UnionMode, DateUnit, TimeUnit, IntervalUnit } from './enum'; +/** @ignore */ +export declare type TimeBitWidth = 32 | 64; +/** @ignore */ +export declare type IntBitWidth = 8 | 16 | 32 | 64; +/** @ignore */ +export declare type IsSigned = { + 'true': true; + 'false': false; +}; +/** @ignore */ +export declare type RowLike = (Iterable<[string, T[keyof T]['TValue'] | null]>) & { + [P in keyof T]: T[P]['TValue'] | null; +} & { + get(key: K): T[K]['TValue'] | null; +} & { + set(key: K, val: T[K]['TValue'] | null): void; +}; +/** @ignore */ +export declare type MapLike = { + [P in K['TValue']]: V['TValue'] | null; +} & (Map); +export interface DataType { + readonly TType: TType; + readonly TArray: any; + readonly TValue: any; + readonly ArrayType: any; + readonly children: Field[]; +} +/** + * An abstract base class for classes that encapsulate metadata about each of + * the logical types that Arrow can represent. + */ +export declare abstract class DataType { + [Symbol.toStringTag]: string; + /** @nocollapse */ static isNull(x: any): x is Null; + /** @nocollapse */ static isInt(x: any): x is Int_; + /** @nocollapse */ static isFloat(x: any): x is Float; + /** @nocollapse */ static isBinary(x: any): x is Binary; + /** @nocollapse */ static isUtf8(x: any): x is Utf8; + /** @nocollapse */ static isBool(x: any): x is Bool; + /** @nocollapse */ static isDecimal(x: any): x is Decimal; + /** @nocollapse */ static isDate(x: any): x is Date_; + /** @nocollapse */ static isTime(x: any): x is Time_; + /** @nocollapse */ static isTimestamp(x: any): x is Timestamp_; + /** @nocollapse */ static isInterval(x: any): x is Interval_; + /** @nocollapse */ static isList(x: any): x is List; + /** @nocollapse */ static isStruct(x: any): x is Struct; + /** @nocollapse */ static isUnion(x: any): x is Union_; + /** @nocollapse */ static isFixedSizeBinary(x: any): x is FixedSizeBinary; + /** @nocollapse */ static isFixedSizeList(x: any): x is FixedSizeList; + /** @nocollapse */ static isMap(x: any): x is Map_; + /** @nocollapse */ static isDictionary(x: any): x is Dictionary; + readonly typeId: TType; + compareTo(other: DataType): other is TypeToDataType; + protected static [Symbol.toStringTag]: string; +} +/** @ignore */ +export interface Null extends DataType { + TArray: void; + TValue: null; +} +/** @ignore */ +export declare class Null extends DataType { + toString(): string; + readonly typeId: Type.Null; + protected static [Symbol.toStringTag]: string; +} +/** @ignore */ +declare type Ints = Type.Int | Type.Int8 | Type.Int16 | Type.Int32 | Type.Int64 | Type.Uint8 | Type.Uint16 | Type.Uint32 | Type.Uint64; +/** @ignore */ +declare type IType = { + [Type.Int]: { + bitWidth: IntBitWidth; + isSigned: true | false; + TArray: IntArray; + TValue: number | bigint | Int32Array | Uint32Array; + }; + [Type.Int8]: { + bitWidth: 8; + isSigned: true; + TArray: Int8Array; + TValue: number; + }; + [Type.Int16]: { + bitWidth: 16; + isSigned: true; + TArray: Int16Array; + TValue: number; + }; + [Type.Int32]: { + bitWidth: 32; + isSigned: true; + TArray: Int32Array; + TValue: number; + }; + [Type.Int64]: { + bitWidth: 64; + isSigned: true; + TArray: Int32Array; + TValue: bigint | Int32Array | Uint32Array; + }; + [Type.Uint8]: { + bitWidth: 8; + isSigned: false; + TArray: Uint8Array; + TValue: number; + }; + [Type.Uint16]: { + bitWidth: 16; + isSigned: false; + TArray: Uint16Array; + TValue: number; + }; + [Type.Uint32]: { + bitWidth: 32; + isSigned: false; + TArray: Uint32Array; + TValue: number; + }; + [Type.Uint64]: { + bitWidth: 64; + isSigned: false; + TArray: Uint32Array; + TValue: bigint | Int32Array | Uint32Array; + }; +}; +/** @ignore */ +interface Int_ extends DataType { + TArray: IType[T]['TArray']; + TValue: IType[T]['TValue']; +} +/** @ignore */ +declare class Int_ extends DataType { + readonly isSigned: IType[T]['isSigned']; + readonly bitWidth: IType[T]['bitWidth']; + constructor(isSigned: IType[T]['isSigned'], bitWidth: IType[T]['bitWidth']); + readonly typeId: T; + readonly ArrayType: TypedArrayConstructor; + toString(): string; + protected static [Symbol.toStringTag]: string; +} +export { Int_ as Int }; +/** @ignore */ +export declare class Int8 extends Int_ { + constructor(); +} +/** @ignore */ +export declare class Int16 extends Int_ { + constructor(); +} +/** @ignore */ +export declare class Int32 extends Int_ { + constructor(); +} +/** @ignore */ +export declare class Int64 extends Int_ { + constructor(); +} +/** @ignore */ +export declare class Uint8 extends Int_ { + constructor(); +} +/** @ignore */ +export declare class Uint16 extends Int_ { + constructor(); +} +/** @ignore */ +export declare class Uint32 extends Int_ { + constructor(); +} +/** @ignore */ +export declare class Uint64 extends Int_ { + constructor(); +} +/** @ignore */ +declare type Floats = Type.Float | Type.Float16 | Type.Float32 | Type.Float64; +/** @ignore */ +declare type FType = { + [Type.Float]: { + precision: Precision; + TArray: FloatArray; + TValue: number; + }; + [Type.Float16]: { + precision: Precision.HALF; + TArray: Uint16Array; + TValue: number; + }; + [Type.Float32]: { + precision: Precision.SINGLE; + TArray: Float32Array; + TValue: number; + }; + [Type.Float64]: { + precision: Precision.DOUBLE; + TArray: Float64Array; + TValue: number; + }; +}; +/** @ignore */ +export interface Float extends DataType { + TArray: FType[T]['TArray']; + TValue: number; +} +/** @ignore */ +export declare class Float extends DataType { + readonly precision: Precision; + constructor(precision: Precision); + readonly typeId: T; + readonly ArrayType: TypedArrayConstructor; + toString(): string; + protected static [Symbol.toStringTag]: string; +} +/** @ignore */ +export declare class Float16 extends Float { + constructor(); +} +/** @ignore */ +export declare class Float32 extends Float { + constructor(); +} +/** @ignore */ +export declare class Float64 extends Float { + constructor(); +} +/** @ignore */ +export interface Binary extends DataType { + TArray: Uint8Array; + TValue: Uint8Array; + ArrayType: TypedArrayConstructor; +} +/** @ignore */ +export declare class Binary extends DataType { + constructor(); + readonly typeId: Type.Binary; + toString(): string; + protected static [Symbol.toStringTag]: string; +} +/** @ignore */ +export interface Utf8 extends DataType { + TArray: Uint8Array; + TValue: string; + ArrayType: TypedArrayConstructor; +} +/** @ignore */ +export declare class Utf8 extends DataType { + constructor(); + readonly typeId: Type.Utf8; + toString(): string; + protected static [Symbol.toStringTag]: string; +} +/** @ignore */ +export interface Bool extends DataType { + TArray: Uint8Array; + TValue: boolean; + ArrayType: TypedArrayConstructor; +} +/** @ignore */ +export declare class Bool extends DataType { + constructor(); + readonly typeId: Type.Bool; + toString(): string; + protected static [Symbol.toStringTag]: string; +} +/** @ignore */ +export interface Decimal extends DataType { + TArray: Uint32Array; + TValue: Uint32Array; + ArrayType: TypedArrayConstructor; +} +/** @ignore */ +export declare class Decimal extends DataType { + readonly scale: number; + readonly precision: number; + constructor(scale: number, precision: number); + readonly typeId: Type.Decimal; + toString(): string; + protected static [Symbol.toStringTag]: string; +} +/** @ignore */ +export declare type Dates = Type.Date | Type.DateDay | Type.DateMillisecond; +/** @ignore */ +export interface Date_ extends DataType { + TArray: Int32Array; + TValue: Date; + ArrayType: TypedArrayConstructor; +} +/** @ignore */ +export declare class Date_ extends DataType { + readonly unit: DateUnit; + constructor(unit: DateUnit); + readonly typeId: T; + toString(): string; + protected static [Symbol.toStringTag]: string; +} +/** @ignore */ +export declare class DateDay extends Date_ { + constructor(); +} +/** @ignore */ +export declare class DateMillisecond extends Date_ { + constructor(); +} +/** @ignore */ +declare type Times = Type.Time | Type.TimeSecond | Type.TimeMillisecond | Type.TimeMicrosecond | Type.TimeNanosecond; +/** @ignore */ +declare type TimesType = { + [Type.Time]: { + unit: TimeUnit; + TValue: number | Int32Array; + }; + [Type.TimeSecond]: { + unit: TimeUnit.SECOND; + TValue: number; + }; + [Type.TimeMillisecond]: { + unit: TimeUnit.MILLISECOND; + TValue: number; + }; + [Type.TimeMicrosecond]: { + unit: TimeUnit.MICROSECOND; + TValue: Int32Array; + }; + [Type.TimeNanosecond]: { + unit: TimeUnit.NANOSECOND; + TValue: Int32Array; + }; +}; +/** @ignore */ +interface Time_ extends DataType { + TArray: Int32Array; + TValue: TimesType[T]['TValue']; + ArrayType: TypedArrayConstructor; +} +/** @ignore */ +declare class Time_ extends DataType { + readonly unit: TimesType[T]['unit']; + readonly bitWidth: TimeBitWidth; + constructor(unit: TimesType[T]['unit'], bitWidth: TimeBitWidth); + readonly typeId: T; + toString(): string; + protected static [Symbol.toStringTag]: string; +} +export { Time_ as Time }; +/** @ignore */ +export declare class TimeSecond extends Time_ { + constructor(); +} +/** @ignore */ +export declare class TimeMillisecond extends Time_ { + constructor(); +} +/** @ignore */ +export declare class TimeMicrosecond extends Time_ { + constructor(); +} +/** @ignore */ +export declare class TimeNanosecond extends Time_ { + constructor(); +} +/** @ignore */ +declare type Timestamps = Type.Timestamp | Type.TimestampSecond | Type.TimestampMillisecond | Type.TimestampMicrosecond | Type.TimestampNanosecond; +/** @ignore */ +interface Timestamp_ extends DataType { + TArray: Int32Array; + TValue: number; + ArrayType: TypedArrayConstructor; +} +/** @ignore */ +declare class Timestamp_ extends DataType { + readonly unit: TimeUnit; + readonly timezone?: string | null | undefined; + constructor(unit: TimeUnit, timezone?: string | null | undefined); + readonly typeId: T; + toString(): string; + protected static [Symbol.toStringTag]: string; +} +export { Timestamp_ as Timestamp }; +/** @ignore */ +export declare class TimestampSecond extends Timestamp_ { + constructor(timezone?: string | null); +} +/** @ignore */ +export declare class TimestampMillisecond extends Timestamp_ { + constructor(timezone?: string | null); +} +/** @ignore */ +export declare class TimestampMicrosecond extends Timestamp_ { + constructor(timezone?: string | null); +} +/** @ignore */ +export declare class TimestampNanosecond extends Timestamp_ { + constructor(timezone?: string | null); +} +/** @ignore */ +declare type Intervals = Type.Interval | Type.IntervalDayTime | Type.IntervalYearMonth; +/** @ignore */ +interface Interval_ extends DataType { + TArray: Int32Array; + TValue: Int32Array; + ArrayType: TypedArrayConstructor; +} +/** @ignore */ +declare class Interval_ extends DataType { + readonly unit: IntervalUnit; + constructor(unit: IntervalUnit); + readonly typeId: T; + toString(): string; + protected static [Symbol.toStringTag]: string; +} +export { Interval_ as Interval }; +/** @ignore */ +export declare class IntervalDayTime extends Interval_ { + constructor(); +} +/** @ignore */ +export declare class IntervalYearMonth extends Interval_ { + constructor(); +} +/** @ignore */ +export interface List extends DataType { + TArray: IterableArrayLike; + TValue: V; +} +/** @ignore */ +export declare class List extends DataType { + constructor(child: Field); + readonly children: Field[]; + readonly typeId: Type.List; + toString(): string; + readonly valueType: T; + readonly valueField: Field; + readonly ArrayType: T['ArrayType']; + protected static [Symbol.toStringTag]: string; +} +/** @ignore */ +export interface Struct extends DataType { + TArray: IterableArrayLike>; + TValue: RowLike; + dataTypes: T; +} +/** @ignore */ +export declare class Struct extends DataType { + readonly children: Field[]; + constructor(children: Field[]); + readonly typeId: Type.Struct; + toString(): string; + protected static [Symbol.toStringTag]: string; +} +/** @ignore */ +declare type Unions = Type.Union | Type.DenseUnion | Type.SparseUnion; +/** @ignore */ +interface Union_ extends DataType { + TArray: Int8Array; + TValue: any; + ArrayType: TypedArrayConstructor; +} +/** @ignore */ +declare class Union_ extends DataType { + readonly mode: UnionMode; + readonly typeIds: Int32Array; + readonly children: Field[]; + readonly typeIdToChildIndex: { + [key: number]: number; + }; + constructor(mode: UnionMode, typeIds: number[] | Int32Array, children: Field[]); + readonly typeId: T; + toString(): string; + protected static [Symbol.toStringTag]: string; +} +export { Union_ as Union }; +/** @ignore */ +export declare class DenseUnion extends Union_ { + constructor(typeIds: number[] | Int32Array, children: Field[]); +} +/** @ignore */ +export declare class SparseUnion extends Union_ { + constructor(typeIds: number[] | Int32Array, children: Field[]); +} +/** @ignore */ +export interface FixedSizeBinary extends DataType { + TArray: Uint8Array; + TValue: Uint8Array; + ArrayType: TypedArrayConstructor; +} +/** @ignore */ +export declare class FixedSizeBinary extends DataType { + readonly byteWidth: number; + constructor(byteWidth: number); + readonly typeId: Type.FixedSizeBinary; + toString(): string; + protected static [Symbol.toStringTag]: string; +} +/** @ignore */ +export interface FixedSizeList extends DataType { + TArray: IterableArrayLike; + TValue: V; +} +/** @ignore */ +export declare class FixedSizeList extends DataType { + readonly listSize: number; + readonly children: Field[]; + constructor(listSize: number, child: Field); + readonly typeId: Type.FixedSizeList; + readonly valueType: T; + readonly valueField: Field; + readonly ArrayType: T['ArrayType']; + toString(): string; + protected static [Symbol.toStringTag]: string; +} +/** @ignore */ +export interface Map_ extends DataType { + TArray: IterableArrayLike>; + TChild: Struct<{ + key: TKey; + value: TValue; + }>; + TValue: MapLike; +} +/** @ignore */ +export declare class Map_ extends DataType { + constructor(child: Field>, keysSorted?: boolean); + readonly keysSorted: boolean; + readonly children: Field>[]; + readonly typeId: Type.Map; + readonly keyType: TKey; + readonly valueType: TValue; + toString(): string; + protected static [Symbol.toStringTag]: string; +} +/** @ignore */ +export declare type TKeys = Int8 | Int16 | Int32 | Uint8 | Uint16 | Uint32; +/** @ignore */ +export interface Dictionary extends DataType { + TArray: TKey['TArray']; + TValue: T['TValue']; +} +/** @ignore */ +export declare class Dictionary extends DataType { + readonly id: number; + readonly indices: TKey; + readonly dictionary: T; + readonly isOrdered: boolean; + constructor(dictionary: T, indices: TKey, id?: Long | number | null, isOrdered?: boolean | null); + readonly typeId: Type.Dictionary; + readonly children: Field[]; + readonly valueType: T; + readonly ArrayType: T['ArrayType']; + toString(): string; + protected static [Symbol.toStringTag]: string; +} +/** @ignore */ +export interface IterableArrayLike extends ArrayLike, Iterable { +} +/** @ignore */ +export declare type FloatArray = Uint16Array | Float32Array | Float64Array; +/** @ignore */ +export declare type IntArray = Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array; +/** @ignore */ +export declare function strideForType(type: DataType): number; diff --git a/frontend/node_modules/apache-arrow/type.js b/frontend/node_modules/apache-arrow/type.js new file mode 100644 index 0000000000000000000000000000000000000000..523af1c454e56932c22b449353045f522d36efc2 --- /dev/null +++ b/frontend/node_modules/apache-arrow/type.js @@ -0,0 +1,521 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const typecomparator_1 = require("./visitor/typecomparator"); +const enum_1 = require("./enum"); +/** + * An abstract base class for classes that encapsulate metadata about each of + * the logical types that Arrow can represent. + */ +class DataType { + /** @nocollapse */ static isNull(x) { return x && x.typeId === enum_1.Type.Null; } + /** @nocollapse */ static isInt(x) { return x && x.typeId === enum_1.Type.Int; } + /** @nocollapse */ static isFloat(x) { return x && x.typeId === enum_1.Type.Float; } + /** @nocollapse */ static isBinary(x) { return x && x.typeId === enum_1.Type.Binary; } + /** @nocollapse */ static isUtf8(x) { return x && x.typeId === enum_1.Type.Utf8; } + /** @nocollapse */ static isBool(x) { return x && x.typeId === enum_1.Type.Bool; } + /** @nocollapse */ static isDecimal(x) { return x && x.typeId === enum_1.Type.Decimal; } + /** @nocollapse */ static isDate(x) { return x && x.typeId === enum_1.Type.Date; } + /** @nocollapse */ static isTime(x) { return x && x.typeId === enum_1.Type.Time; } + /** @nocollapse */ static isTimestamp(x) { return x && x.typeId === enum_1.Type.Timestamp; } + /** @nocollapse */ static isInterval(x) { return x && x.typeId === enum_1.Type.Interval; } + /** @nocollapse */ static isList(x) { return x && x.typeId === enum_1.Type.List; } + /** @nocollapse */ static isStruct(x) { return x && x.typeId === enum_1.Type.Struct; } + /** @nocollapse */ static isUnion(x) { return x && x.typeId === enum_1.Type.Union; } + /** @nocollapse */ static isFixedSizeBinary(x) { return x && x.typeId === enum_1.Type.FixedSizeBinary; } + /** @nocollapse */ static isFixedSizeList(x) { return x && x.typeId === enum_1.Type.FixedSizeList; } + /** @nocollapse */ static isMap(x) { return x && x.typeId === enum_1.Type.Map; } + /** @nocollapse */ static isDictionary(x) { return x && x.typeId === enum_1.Type.Dictionary; } + get typeId() { return enum_1.Type.NONE; } + compareTo(other) { + return typecomparator_1.instance.visit(this, other); + } +} +DataType[Symbol.toStringTag] = ((proto) => { + proto.children = null; + proto.ArrayType = Array; + return proto[Symbol.toStringTag] = 'DataType'; +})(DataType.prototype); +exports.DataType = DataType; +/** @ignore */ +class Null extends DataType { + toString() { return `Null`; } + get typeId() { return enum_1.Type.Null; } +} +Null[Symbol.toStringTag] = ((proto) => { + return proto[Symbol.toStringTag] = 'Null'; +})(Null.prototype); +exports.Null = Null; +/** @ignore */ +class Int_ extends DataType { + constructor(isSigned, bitWidth) { + super(); + this.isSigned = isSigned; + this.bitWidth = bitWidth; + } + get typeId() { return enum_1.Type.Int; } + get ArrayType() { + switch (this.bitWidth) { + case 8: return this.isSigned ? Int8Array : Uint8Array; + case 16: return this.isSigned ? Int16Array : Uint16Array; + case 32: return this.isSigned ? Int32Array : Uint32Array; + case 64: return this.isSigned ? Int32Array : Uint32Array; + } + throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`); + } + toString() { return `${this.isSigned ? `I` : `Ui`}nt${this.bitWidth}`; } +} +Int_[Symbol.toStringTag] = ((proto) => { + proto.isSigned = null; + proto.bitWidth = null; + return proto[Symbol.toStringTag] = 'Int'; +})(Int_.prototype); +exports.Int = Int_; +/** @ignore */ +class Int8 extends Int_ { + constructor() { super(true, 8); } +} +exports.Int8 = Int8; +/** @ignore */ +class Int16 extends Int_ { + constructor() { super(true, 16); } +} +exports.Int16 = Int16; +/** @ignore */ +class Int32 extends Int_ { + constructor() { super(true, 32); } +} +exports.Int32 = Int32; +/** @ignore */ +class Int64 extends Int_ { + constructor() { super(true, 64); } +} +exports.Int64 = Int64; +/** @ignore */ +class Uint8 extends Int_ { + constructor() { super(false, 8); } +} +exports.Uint8 = Uint8; +/** @ignore */ +class Uint16 extends Int_ { + constructor() { super(false, 16); } +} +exports.Uint16 = Uint16; +/** @ignore */ +class Uint32 extends Int_ { + constructor() { super(false, 32); } +} +exports.Uint32 = Uint32; +/** @ignore */ +class Uint64 extends Int_ { + constructor() { super(false, 64); } +} +exports.Uint64 = Uint64; +Object.defineProperty(Int8.prototype, 'ArrayType', { value: Int8Array }); +Object.defineProperty(Int16.prototype, 'ArrayType', { value: Int16Array }); +Object.defineProperty(Int32.prototype, 'ArrayType', { value: Int32Array }); +Object.defineProperty(Int64.prototype, 'ArrayType', { value: Int32Array }); +Object.defineProperty(Uint8.prototype, 'ArrayType', { value: Uint8Array }); +Object.defineProperty(Uint16.prototype, 'ArrayType', { value: Uint16Array }); +Object.defineProperty(Uint32.prototype, 'ArrayType', { value: Uint32Array }); +Object.defineProperty(Uint64.prototype, 'ArrayType', { value: Uint32Array }); +/** @ignore */ +class Float extends DataType { + constructor(precision) { + super(); + this.precision = precision; + } + get typeId() { return enum_1.Type.Float; } + get ArrayType() { + switch (this.precision) { + case enum_1.Precision.HALF: return Uint16Array; + case enum_1.Precision.SINGLE: return Float32Array; + case enum_1.Precision.DOUBLE: return Float64Array; + } + throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`); + } + toString() { return `Float${(this.precision << 5) || 16}`; } +} +Float[Symbol.toStringTag] = ((proto) => { + proto.precision = null; + return proto[Symbol.toStringTag] = 'Float'; +})(Float.prototype); +exports.Float = Float; +/** @ignore */ +class Float16 extends Float { + constructor() { super(enum_1.Precision.HALF); } +} +exports.Float16 = Float16; +/** @ignore */ +class Float32 extends Float { + constructor() { super(enum_1.Precision.SINGLE); } +} +exports.Float32 = Float32; +/** @ignore */ +class Float64 extends Float { + constructor() { super(enum_1.Precision.DOUBLE); } +} +exports.Float64 = Float64; +Object.defineProperty(Float16.prototype, 'ArrayType', { value: Uint16Array }); +Object.defineProperty(Float32.prototype, 'ArrayType', { value: Float32Array }); +Object.defineProperty(Float64.prototype, 'ArrayType', { value: Float64Array }); +/** @ignore */ +class Binary extends DataType { + constructor() { + super(); + } + get typeId() { return enum_1.Type.Binary; } + toString() { return `Binary`; } +} +Binary[Symbol.toStringTag] = ((proto) => { + proto.ArrayType = Uint8Array; + return proto[Symbol.toStringTag] = 'Binary'; +})(Binary.prototype); +exports.Binary = Binary; +/** @ignore */ +class Utf8 extends DataType { + constructor() { + super(); + } + get typeId() { return enum_1.Type.Utf8; } + toString() { return `Utf8`; } +} +Utf8[Symbol.toStringTag] = ((proto) => { + proto.ArrayType = Uint8Array; + return proto[Symbol.toStringTag] = 'Utf8'; +})(Utf8.prototype); +exports.Utf8 = Utf8; +/** @ignore */ +class Bool extends DataType { + constructor() { + super(); + } + get typeId() { return enum_1.Type.Bool; } + toString() { return `Bool`; } +} +Bool[Symbol.toStringTag] = ((proto) => { + proto.ArrayType = Uint8Array; + return proto[Symbol.toStringTag] = 'Bool'; +})(Bool.prototype); +exports.Bool = Bool; +/** @ignore */ +class Decimal extends DataType { + constructor(scale, precision) { + super(); + this.scale = scale; + this.precision = precision; + } + get typeId() { return enum_1.Type.Decimal; } + toString() { return `Decimal[${this.precision}e${this.scale > 0 ? `+` : ``}${this.scale}]`; } +} +Decimal[Symbol.toStringTag] = ((proto) => { + proto.scale = null; + proto.precision = null; + proto.ArrayType = Uint32Array; + return proto[Symbol.toStringTag] = 'Decimal'; +})(Decimal.prototype); +exports.Decimal = Decimal; +/** @ignore */ +class Date_ extends DataType { + constructor(unit) { + super(); + this.unit = unit; + } + get typeId() { return enum_1.Type.Date; } + toString() { return `Date${(this.unit + 1) * 32}<${enum_1.DateUnit[this.unit]}>`; } +} +Date_[Symbol.toStringTag] = ((proto) => { + proto.unit = null; + proto.ArrayType = Int32Array; + return proto[Symbol.toStringTag] = 'Date'; +})(Date_.prototype); +exports.Date_ = Date_; +/** @ignore */ +class DateDay extends Date_ { + constructor() { super(enum_1.DateUnit.DAY); } +} +exports.DateDay = DateDay; +/** @ignore */ +class DateMillisecond extends Date_ { + constructor() { super(enum_1.DateUnit.MILLISECOND); } +} +exports.DateMillisecond = DateMillisecond; +/** @ignore */ +class Time_ extends DataType { + constructor(unit, bitWidth) { + super(); + this.unit = unit; + this.bitWidth = bitWidth; + } + get typeId() { return enum_1.Type.Time; } + toString() { return `Time${this.bitWidth}<${enum_1.TimeUnit[this.unit]}>`; } +} +Time_[Symbol.toStringTag] = ((proto) => { + proto.unit = null; + proto.bitWidth = null; + proto.ArrayType = Int32Array; + return proto[Symbol.toStringTag] = 'Time'; +})(Time_.prototype); +exports.Time = Time_; +/** @ignore */ +class TimeSecond extends Time_ { + constructor() { super(enum_1.TimeUnit.SECOND, 32); } +} +exports.TimeSecond = TimeSecond; +/** @ignore */ +class TimeMillisecond extends Time_ { + constructor() { super(enum_1.TimeUnit.MILLISECOND, 32); } +} +exports.TimeMillisecond = TimeMillisecond; +/** @ignore */ +class TimeMicrosecond extends Time_ { + constructor() { super(enum_1.TimeUnit.MICROSECOND, 64); } +} +exports.TimeMicrosecond = TimeMicrosecond; +/** @ignore */ +class TimeNanosecond extends Time_ { + constructor() { super(enum_1.TimeUnit.NANOSECOND, 64); } +} +exports.TimeNanosecond = TimeNanosecond; +/** @ignore */ +class Timestamp_ extends DataType { + constructor(unit, timezone) { + super(); + this.unit = unit; + this.timezone = timezone; + } + get typeId() { return enum_1.Type.Timestamp; } + toString() { return `Timestamp<${enum_1.TimeUnit[this.unit]}${this.timezone ? `, ${this.timezone}` : ``}>`; } +} +Timestamp_[Symbol.toStringTag] = ((proto) => { + proto.unit = null; + proto.timezone = null; + proto.ArrayType = Int32Array; + return proto[Symbol.toStringTag] = 'Timestamp'; +})(Timestamp_.prototype); +exports.Timestamp = Timestamp_; +/** @ignore */ +class TimestampSecond extends Timestamp_ { + constructor(timezone) { super(enum_1.TimeUnit.SECOND, timezone); } +} +exports.TimestampSecond = TimestampSecond; +/** @ignore */ +class TimestampMillisecond extends Timestamp_ { + constructor(timezone) { super(enum_1.TimeUnit.MILLISECOND, timezone); } +} +exports.TimestampMillisecond = TimestampMillisecond; +/** @ignore */ +class TimestampMicrosecond extends Timestamp_ { + constructor(timezone) { super(enum_1.TimeUnit.MICROSECOND, timezone); } +} +exports.TimestampMicrosecond = TimestampMicrosecond; +/** @ignore */ +class TimestampNanosecond extends Timestamp_ { + constructor(timezone) { super(enum_1.TimeUnit.NANOSECOND, timezone); } +} +exports.TimestampNanosecond = TimestampNanosecond; +/** @ignore */ +class Interval_ extends DataType { + constructor(unit) { + super(); + this.unit = unit; + } + get typeId() { return enum_1.Type.Interval; } + toString() { return `Interval<${enum_1.IntervalUnit[this.unit]}>`; } +} +Interval_[Symbol.toStringTag] = ((proto) => { + proto.unit = null; + proto.ArrayType = Int32Array; + return proto[Symbol.toStringTag] = 'Interval'; +})(Interval_.prototype); +exports.Interval = Interval_; +/** @ignore */ +class IntervalDayTime extends Interval_ { + constructor() { super(enum_1.IntervalUnit.DAY_TIME); } +} +exports.IntervalDayTime = IntervalDayTime; +/** @ignore */ +class IntervalYearMonth extends Interval_ { + constructor() { super(enum_1.IntervalUnit.YEAR_MONTH); } +} +exports.IntervalYearMonth = IntervalYearMonth; +/** @ignore */ +class List extends DataType { + constructor(child) { + super(); + this.children = [child]; + } + get typeId() { return enum_1.Type.List; } + toString() { return `List<${this.valueType}>`; } + get valueType() { return this.children[0].type; } + get valueField() { return this.children[0]; } + get ArrayType() { return this.valueType.ArrayType; } +} +List[Symbol.toStringTag] = ((proto) => { + proto.children = null; + return proto[Symbol.toStringTag] = 'List'; +})(List.prototype); +exports.List = List; +/** @ignore */ +class Struct extends DataType { + constructor(children) { + super(); + this.children = children; + } + get typeId() { return enum_1.Type.Struct; } + toString() { return `Struct<{${this.children.map((f) => `${f.name}:${f.type}`).join(`, `)}}>`; } +} +Struct[Symbol.toStringTag] = ((proto) => { + proto.children = null; + return proto[Symbol.toStringTag] = 'Struct'; +})(Struct.prototype); +exports.Struct = Struct; +/** @ignore */ +class Union_ extends DataType { + constructor(mode, typeIds, children) { + super(); + this.mode = mode; + this.children = children; + this.typeIds = typeIds = Int32Array.from(typeIds); + this.typeIdToChildIndex = typeIds.reduce((typeIdToChildIndex, typeId, idx) => { + return (typeIdToChildIndex[typeId] = idx) && typeIdToChildIndex || typeIdToChildIndex; + }, Object.create(null)); + } + get typeId() { return enum_1.Type.Union; } + toString() { + return `${this[Symbol.toStringTag]}<${this.children.map((x) => `${x.type}`).join(` | `)}>`; + } +} +Union_[Symbol.toStringTag] = ((proto) => { + proto.mode = null; + proto.typeIds = null; + proto.children = null; + proto.typeIdToChildIndex = null; + proto.ArrayType = Int8Array; + return proto[Symbol.toStringTag] = 'Union'; +})(Union_.prototype); +exports.Union = Union_; +/** @ignore */ +class DenseUnion extends Union_ { + constructor(typeIds, children) { + super(enum_1.UnionMode.Dense, typeIds, children); + } +} +exports.DenseUnion = DenseUnion; +/** @ignore */ +class SparseUnion extends Union_ { + constructor(typeIds, children) { + super(enum_1.UnionMode.Sparse, typeIds, children); + } +} +exports.SparseUnion = SparseUnion; +/** @ignore */ +class FixedSizeBinary extends DataType { + constructor(byteWidth) { + super(); + this.byteWidth = byteWidth; + } + get typeId() { return enum_1.Type.FixedSizeBinary; } + toString() { return `FixedSizeBinary[${this.byteWidth}]`; } +} +FixedSizeBinary[Symbol.toStringTag] = ((proto) => { + proto.byteWidth = null; + proto.ArrayType = Uint8Array; + return proto[Symbol.toStringTag] = 'FixedSizeBinary'; +})(FixedSizeBinary.prototype); +exports.FixedSizeBinary = FixedSizeBinary; +/** @ignore */ +class FixedSizeList extends DataType { + constructor(listSize, child) { + super(); + this.listSize = listSize; + this.children = [child]; + } + get typeId() { return enum_1.Type.FixedSizeList; } + get valueType() { return this.children[0].type; } + get valueField() { return this.children[0]; } + get ArrayType() { return this.valueType.ArrayType; } + toString() { return `FixedSizeList[${this.listSize}]<${this.valueType}>`; } +} +FixedSizeList[Symbol.toStringTag] = ((proto) => { + proto.children = null; + proto.listSize = null; + return proto[Symbol.toStringTag] = 'FixedSizeList'; +})(FixedSizeList.prototype); +exports.FixedSizeList = FixedSizeList; +/** @ignore */ +class Map_ extends DataType { + constructor(child, keysSorted = false) { + super(); + this.children = [child]; + this.keysSorted = keysSorted; + } + get typeId() { return enum_1.Type.Map; } + get keyType() { return this.children[0].type.children[0].type; } + get valueType() { return this.children[0].type.children[1].type; } + toString() { return `Map<{${this.children[0].type.children.map((f) => `${f.name}:${f.type}`).join(`, `)}}>`; } +} +Map_[Symbol.toStringTag] = ((proto) => { + proto.children = null; + proto.keysSorted = null; + return proto[Symbol.toStringTag] = 'Map_'; +})(Map_.prototype); +exports.Map_ = Map_; +/** @ignore */ +const getId = ((atomicDictionaryId) => () => ++atomicDictionaryId)(-1); +/** @ignore */ +class Dictionary extends DataType { + constructor(dictionary, indices, id, isOrdered) { + super(); + this.indices = indices; + this.dictionary = dictionary; + this.isOrdered = isOrdered || false; + this.id = id == null ? getId() : typeof id === 'number' ? id : id.low; + } + get typeId() { return enum_1.Type.Dictionary; } + get children() { return this.dictionary.children; } + get valueType() { return this.dictionary; } + get ArrayType() { return this.dictionary.ArrayType; } + toString() { return `Dictionary<${this.indices}, ${this.dictionary}>`; } +} +Dictionary[Symbol.toStringTag] = ((proto) => { + proto.id = null; + proto.indices = null; + proto.isOrdered = null; + proto.dictionary = null; + return proto[Symbol.toStringTag] = 'Dictionary'; +})(Dictionary.prototype); +exports.Dictionary = Dictionary; +/** @ignore */ +function strideForType(type) { + let t = type; + switch (type.typeId) { + case enum_1.Type.Decimal: return 4; + case enum_1.Type.Timestamp: return 2; + case enum_1.Type.Date: return 1 + t.unit; + case enum_1.Type.Interval: return 1 + t.unit; + case enum_1.Type.Int: return 1 + +(t.bitWidth > 32); + case enum_1.Type.Time: return 1 + +(t.bitWidth > 32); + case enum_1.Type.FixedSizeList: return t.listSize; + case enum_1.Type.FixedSizeBinary: return t.byteWidth; + default: return 1; + } +} +exports.strideForType = strideForType; + +//# sourceMappingURL=type.js.map diff --git a/frontend/node_modules/apache-arrow/type.js.map b/frontend/node_modules/apache-arrow/type.js.map new file mode 100644 index 0000000000000000000000000000000000000000..3aa2eba827ce084280246fd729d1debbd056630c --- /dev/null +++ b/frontend/node_modules/apache-arrow/type.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["type.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6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CAAC;AAvB7B,gCAwBC;AASD,cAAc;AACd,SAAgB,aAAa,CAAC,IAAc;IACxC,IAAI,CAAC,GAAQ,IAAI,CAAC;IAClB,QAAQ,IAAI,CAAC,MAAM,EAAE;QACjB,KAAK,WAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;QAC5B,KAAK,WAAI,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC;QAC9B,KAAK,WAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,GAAI,CAAW,CAAC,IAAI,CAAC;QAC7C,KAAK,WAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,GAAI,CAAe,CAAC,IAAI,CAAC;QACrD,KAAK,WAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAE,CAAU,CAAC,QAAQ,GAAG,EAAE,CAAC,CAAC;QACvD,KAAK,WAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAE,CAAW,CAAC,QAAQ,GAAG,EAAE,CAAC,CAAC;QACzD,KAAK,WAAI,CAAC,aAAa,CAAC,CAAC,OAAQ,CAAmB,CAAC,QAAQ,CAAC;QAC9D,KAAK,WAAI,CAAC,eAAe,CAAC,CAAC,OAAQ,CAAqB,CAAC,SAAS,CAAC;QACnE,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;KACrB;AACL,CAAC;AAbD,sCAaC","file":"type.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n/* tslint:disable:class-name */\n\nimport { Field } from './schema';\nimport { flatbuffers } from 'flatbuffers';\nimport { TypedArrayConstructor } from './interfaces';\nimport { VectorType as V, TypeToDataType } from './interfaces';\nimport { instance as comparer } from './visitor/typecomparator';\n\nimport Long = flatbuffers.Long;\nimport {\n Type,\n Precision, UnionMode,\n DateUnit, TimeUnit, IntervalUnit\n} from './enum';\n\n/** @ignore */\nexport type TimeBitWidth = 32 | 64;\n/** @ignore */\nexport type IntBitWidth = 8 | 16 | 32 | 64;\n/** @ignore */\nexport type IsSigned = { 'true': true; 'false': false };\n/** @ignore */\nexport type RowLike =\n ( Iterable<[string, T[keyof T]['TValue'] | null]> )\n & { [P in keyof T]: T[P]['TValue'] | null }\n & { get(key: K): T[K]['TValue'] | null; }\n & { set(key: K, val: T[K]['TValue'] | null): void; }\n ;\n\n/** @ignore */\nexport type MapLike =\n { [P in K['TValue']]: V['TValue'] | null }\n & ( Map )\n ;\n\nexport interface DataType {\n readonly TType: TType;\n readonly TArray: any;\n readonly TValue: any;\n readonly ArrayType: any;\n readonly children: Field[];\n}\n\n/**\n * An abstract base class for classes that encapsulate metadata about each of\n * the logical types that Arrow can represent.\n */\nexport abstract class DataType {\n\n // @ts-ignore\n public [Symbol.toStringTag]: string;\n\n /** @nocollapse */ static isNull (x: any): x is Null { return x && x.typeId === Type.Null; }\n /** @nocollapse */ static isInt (x: any): x is Int_ { return x && x.typeId === Type.Int; }\n /** @nocollapse */ static isFloat (x: any): x is Float { return x && x.typeId === Type.Float; }\n /** @nocollapse */ static isBinary (x: any): x is Binary { return x && x.typeId === Type.Binary; }\n /** @nocollapse */ static isUtf8 (x: any): x is Utf8 { return x && x.typeId === Type.Utf8; }\n /** @nocollapse */ static isBool (x: any): x is Bool { return x && x.typeId === Type.Bool; }\n /** @nocollapse */ static isDecimal (x: any): x is Decimal { return x && x.typeId === Type.Decimal; }\n /** @nocollapse */ static isDate (x: any): x is Date_ { return x && x.typeId === Type.Date; }\n /** @nocollapse */ static isTime (x: any): x is Time_ { return x && x.typeId === Type.Time; }\n /** @nocollapse */ static isTimestamp (x: any): x is Timestamp_ { return x && x.typeId === Type.Timestamp; }\n /** @nocollapse */ static isInterval (x: any): x is Interval_ { return x && x.typeId === Type.Interval; }\n /** @nocollapse */ static isList (x: any): x is List { return x && x.typeId === Type.List; }\n /** @nocollapse */ static isStruct (x: any): x is Struct { return x && x.typeId === Type.Struct; }\n /** @nocollapse */ static isUnion (x: any): x is Union_ { return x && x.typeId === Type.Union; }\n /** @nocollapse */ static isFixedSizeBinary (x: any): x is FixedSizeBinary { return x && x.typeId === Type.FixedSizeBinary; }\n /** @nocollapse */ static isFixedSizeList (x: any): x is FixedSizeList { return x && x.typeId === Type.FixedSizeList; }\n /** @nocollapse */ static isMap (x: any): x is Map_ { return x && x.typeId === Type.Map; }\n /** @nocollapse */ static isDictionary (x: any): x is Dictionary { return x && x.typeId === Type.Dictionary; }\n\n public get typeId(): TType { return Type.NONE; }\n public compareTo(other: DataType): other is TypeToDataType {\n return comparer.visit(this, other);\n }\n\n protected static [Symbol.toStringTag] = ((proto: DataType) => {\n ( proto).children = null;\n ( proto).ArrayType = Array;\n return proto[Symbol.toStringTag] = 'DataType';\n })(DataType.prototype);\n}\n\n/** @ignore */\nexport interface Null extends DataType { TArray: void; TValue: null; }\n/** @ignore */\nexport class Null extends DataType {\n public toString() { return `Null`; }\n public get typeId() { return Type.Null as Type.Null; }\n protected static [Symbol.toStringTag] = ((proto: Null) => {\n return proto[Symbol.toStringTag] = 'Null';\n })(Null.prototype);\n}\n\n/** @ignore */\ntype Ints = Type.Int | Type.Int8 | Type.Int16 | Type.Int32 | Type.Int64 | Type.Uint8 | Type.Uint16 | Type.Uint32 | Type.Uint64;\n/** @ignore */\ntype IType = {\n [Type.Int ]: { bitWidth: IntBitWidth; isSigned: true | false; TArray: IntArray; TValue: number | bigint | Int32Array | Uint32Array; };\n [Type.Int8 ]: { bitWidth: 8; isSigned: true; TArray: Int8Array; TValue: number; };\n [Type.Int16 ]: { bitWidth: 16; isSigned: true; TArray: Int16Array; TValue: number; };\n [Type.Int32 ]: { bitWidth: 32; isSigned: true; TArray: Int32Array; TValue: number; };\n [Type.Int64 ]: { bitWidth: 64; isSigned: true; TArray: Int32Array; TValue: bigint | Int32Array | Uint32Array; };\n [Type.Uint8 ]: { bitWidth: 8; isSigned: false; TArray: Uint8Array; TValue: number; };\n [Type.Uint16]: { bitWidth: 16; isSigned: false; TArray: Uint16Array; TValue: number; };\n [Type.Uint32]: { bitWidth: 32; isSigned: false; TArray: Uint32Array; TValue: number; };\n [Type.Uint64]: { bitWidth: 64; isSigned: false; TArray: Uint32Array; TValue: bigint | Int32Array | Uint32Array; };\n};\n\n/** @ignore */\ninterface Int_ extends DataType { TArray: IType[T]['TArray']; TValue: IType[T]['TValue']; }\n/** @ignore */\nclass Int_ extends DataType {\n constructor(public readonly isSigned: IType[T]['isSigned'],\n public readonly bitWidth: IType[T]['bitWidth']) {\n super();\n }\n public get typeId() { return Type.Int as T; }\n public get ArrayType(): TypedArrayConstructor {\n switch (this.bitWidth) {\n case 8: return this.isSigned ? Int8Array : Uint8Array;\n case 16: return this.isSigned ? Int16Array : Uint16Array;\n case 32: return this.isSigned ? Int32Array : Uint32Array;\n case 64: return this.isSigned ? Int32Array : Uint32Array;\n }\n throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`);\n }\n public toString() { return `${this.isSigned ? `I` : `Ui`}nt${this.bitWidth}`; }\n protected static [Symbol.toStringTag] = ((proto: Int_) => {\n ( proto).isSigned = null;\n ( proto).bitWidth = null;\n return proto[Symbol.toStringTag] = 'Int';\n })(Int_.prototype);\n}\n\nexport { Int_ as Int };\n\n/** @ignore */\nexport class Int8 extends Int_ { constructor() { super(true, 8); } }\n/** @ignore */\nexport class Int16 extends Int_ { constructor() { super(true, 16); } }\n/** @ignore */\nexport class Int32 extends Int_ { constructor() { super(true, 32); } }\n/** @ignore */\nexport class Int64 extends Int_ { constructor() { super(true, 64); } }\n/** @ignore */\nexport class Uint8 extends Int_ { constructor() { super(false, 8); } }\n/** @ignore */\nexport class Uint16 extends Int_ { constructor() { super(false, 16); } }\n/** @ignore */\nexport class Uint32 extends Int_ { constructor() { super(false, 32); } }\n/** @ignore */\nexport class Uint64 extends Int_ { constructor() { super(false, 64); } }\n\nObject.defineProperty(Int8.prototype, 'ArrayType', { value: Int8Array });\nObject.defineProperty(Int16.prototype, 'ArrayType', { value: Int16Array });\nObject.defineProperty(Int32.prototype, 'ArrayType', { value: Int32Array });\nObject.defineProperty(Int64.prototype, 'ArrayType', { value: Int32Array });\nObject.defineProperty(Uint8.prototype, 'ArrayType', { value: Uint8Array });\nObject.defineProperty(Uint16.prototype, 'ArrayType', { value: Uint16Array });\nObject.defineProperty(Uint32.prototype, 'ArrayType', { value: Uint32Array });\nObject.defineProperty(Uint64.prototype, 'ArrayType', { value: Uint32Array });\n\n/** @ignore */\ntype Floats = Type.Float | Type.Float16 | Type.Float32 | Type.Float64;\n/** @ignore */\ntype FType = {\n [Type.Float ]: { precision: Precision; TArray: FloatArray; TValue: number; };\n [Type.Float16]: { precision: Precision.HALF; TArray: Uint16Array; TValue: number; };\n [Type.Float32]: { precision: Precision.SINGLE; TArray: Float32Array; TValue: number; };\n [Type.Float64]: { precision: Precision.DOUBLE; TArray: Float64Array; TValue: number; };\n};\n\n/** @ignore */\nexport interface Float extends DataType { TArray: FType[T]['TArray']; TValue: number; }\n/** @ignore */\nexport class Float extends DataType {\n constructor(public readonly precision: Precision) {\n super();\n }\n public get typeId() { return Type.Float as T; }\n public get ArrayType(): TypedArrayConstructor {\n switch (this.precision) {\n case Precision.HALF: return Uint16Array;\n case Precision.SINGLE: return Float32Array;\n case Precision.DOUBLE: return Float64Array;\n }\n throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`);\n }\n public toString() { return `Float${(this.precision << 5) || 16}`; }\n protected static [Symbol.toStringTag] = ((proto: Float) => {\n ( proto).precision = null;\n return proto[Symbol.toStringTag] = 'Float';\n })(Float.prototype);\n}\n\n/** @ignore */\nexport class Float16 extends Float { constructor() { super(Precision.HALF); } }\n/** @ignore */\nexport class Float32 extends Float { constructor() { super(Precision.SINGLE); } }\n/** @ignore */\nexport class Float64 extends Float { constructor() { super(Precision.DOUBLE); } }\n\nObject.defineProperty(Float16.prototype, 'ArrayType', { value: Uint16Array });\nObject.defineProperty(Float32.prototype, 'ArrayType', { value: Float32Array });\nObject.defineProperty(Float64.prototype, 'ArrayType', { value: Float64Array });\n\n/** @ignore */\nexport interface Binary extends DataType { TArray: Uint8Array; TValue: Uint8Array; ArrayType: TypedArrayConstructor; }\n/** @ignore */\nexport class Binary extends DataType {\n constructor() {\n super();\n }\n public get typeId() { return Type.Binary as Type.Binary; }\n public toString() { return `Binary`; }\n protected static [Symbol.toStringTag] = ((proto: Binary) => {\n ( proto).ArrayType = Uint8Array;\n return proto[Symbol.toStringTag] = 'Binary';\n })(Binary.prototype);\n}\n\n/** @ignore */\nexport interface Utf8 extends DataType { TArray: Uint8Array; TValue: string; ArrayType: TypedArrayConstructor; }\n/** @ignore */\nexport class Utf8 extends DataType {\n constructor() {\n super();\n }\n public get typeId() { return Type.Utf8 as Type.Utf8; }\n public toString() { return `Utf8`; }\n protected static [Symbol.toStringTag] = ((proto: Utf8) => {\n ( proto).ArrayType = Uint8Array;\n return proto[Symbol.toStringTag] = 'Utf8';\n })(Utf8.prototype);\n}\n\n/** @ignore */\nexport interface Bool extends DataType { TArray: Uint8Array; TValue: boolean; ArrayType: TypedArrayConstructor; }\n/** @ignore */\nexport class Bool extends DataType {\n constructor() {\n super();\n }\n public get typeId() { return Type.Bool as Type.Bool; }\n public toString() { return `Bool`; }\n protected static [Symbol.toStringTag] = ((proto: Bool) => {\n ( proto).ArrayType = Uint8Array;\n return proto[Symbol.toStringTag] = 'Bool';\n })(Bool.prototype);\n}\n\n/** @ignore */\nexport interface Decimal extends DataType { TArray: Uint32Array; TValue: Uint32Array; ArrayType: TypedArrayConstructor; }\n/** @ignore */\nexport class Decimal extends DataType {\n constructor(public readonly scale: number,\n public readonly precision: number) {\n super();\n }\n public get typeId() { return Type.Decimal as Type.Decimal; }\n public toString() { return `Decimal[${this.precision}e${this.scale > 0 ? `+` : ``}${this.scale}]`; }\n protected static [Symbol.toStringTag] = ((proto: Decimal) => {\n ( proto).scale = null;\n ( proto).precision = null;\n ( proto).ArrayType = Uint32Array;\n return proto[Symbol.toStringTag] = 'Decimal';\n })(Decimal.prototype);\n}\n\n/** @ignore */\nexport type Dates = Type.Date | Type.DateDay | Type.DateMillisecond;\n/** @ignore */\nexport interface Date_ extends DataType { TArray: Int32Array; TValue: Date; ArrayType: TypedArrayConstructor; }\n/** @ignore */\nexport class Date_ extends DataType {\n constructor(public readonly unit: DateUnit) {\n super();\n }\n public get typeId() { return Type.Date as T; }\n public toString() { return `Date${(this.unit + 1) * 32}<${DateUnit[this.unit]}>`; }\n protected static [Symbol.toStringTag] = ((proto: Date_) => {\n ( proto).unit = null;\n ( proto).ArrayType = Int32Array;\n return proto[Symbol.toStringTag] = 'Date';\n })(Date_.prototype);\n}\n\n/** @ignore */\nexport class DateDay extends Date_ { constructor() { super(DateUnit.DAY); } }\n/** @ignore */\nexport class DateMillisecond extends Date_ { constructor() { super(DateUnit.MILLISECOND); } }\n\n/** @ignore */\ntype Times = Type.Time | Type.TimeSecond | Type.TimeMillisecond | Type.TimeMicrosecond | Type.TimeNanosecond;\n/** @ignore */\ntype TimesType = {\n [Type.Time ]: { unit: TimeUnit; TValue: number | Int32Array };\n [Type.TimeSecond ]: { unit: TimeUnit.SECOND; TValue: number; };\n [Type.TimeMillisecond]: { unit: TimeUnit.MILLISECOND; TValue: number; };\n [Type.TimeMicrosecond]: { unit: TimeUnit.MICROSECOND; TValue: Int32Array; };\n [Type.TimeNanosecond ]: { unit: TimeUnit.NANOSECOND; TValue: Int32Array; };\n};\n\n/** @ignore */\ninterface Time_ extends DataType { TArray: Int32Array; TValue: TimesType[T]['TValue']; ArrayType: TypedArrayConstructor; }\n/** @ignore */\nclass Time_ extends DataType {\n constructor(public readonly unit: TimesType[T]['unit'],\n public readonly bitWidth: TimeBitWidth) {\n super();\n }\n public get typeId() { return Type.Time as T; }\n public toString() { return `Time${this.bitWidth}<${TimeUnit[this.unit]}>`; }\n protected static [Symbol.toStringTag] = ((proto: Time_) => {\n ( proto).unit = null;\n ( proto).bitWidth = null;\n ( proto).ArrayType = Int32Array;\n return proto[Symbol.toStringTag] = 'Time';\n })(Time_.prototype);\n}\n\nexport { Time_ as Time };\n\n/** @ignore */\nexport class TimeSecond extends Time_ { constructor() { super(TimeUnit.SECOND, 32); } }\n/** @ignore */\nexport class TimeMillisecond extends Time_ { constructor() { super(TimeUnit.MILLISECOND, 32); } }\n/** @ignore */\nexport class TimeMicrosecond extends Time_ { constructor() { super(TimeUnit.MICROSECOND, 64); } }\n/** @ignore */\nexport class TimeNanosecond extends Time_ { constructor() { super(TimeUnit.NANOSECOND, 64); } }\n\n/** @ignore */\ntype Timestamps = Type.Timestamp | Type.TimestampSecond | Type.TimestampMillisecond | Type.TimestampMicrosecond | Type.TimestampNanosecond;\n/** @ignore */\ninterface Timestamp_ extends DataType { TArray: Int32Array; TValue: number; ArrayType: TypedArrayConstructor; }\n/** @ignore */\nclass Timestamp_ extends DataType {\n constructor(public readonly unit: TimeUnit,\n public readonly timezone?: string | null) {\n super();\n }\n public get typeId() { return Type.Timestamp as T; }\n public toString() { return `Timestamp<${TimeUnit[this.unit]}${this.timezone ? `, ${this.timezone}` : ``}>`; }\n protected static [Symbol.toStringTag] = ((proto: Timestamp_) => {\n ( proto).unit = null;\n ( proto).timezone = null;\n ( proto).ArrayType = Int32Array;\n return proto[Symbol.toStringTag] = 'Timestamp';\n })(Timestamp_.prototype);\n}\n\nexport { Timestamp_ as Timestamp };\n\n/** @ignore */\nexport class TimestampSecond extends Timestamp_ { constructor(timezone?: string | null) { super(TimeUnit.SECOND, timezone); } }\n/** @ignore */\nexport class TimestampMillisecond extends Timestamp_ { constructor(timezone?: string | null) { super(TimeUnit.MILLISECOND, timezone); } }\n/** @ignore */\nexport class TimestampMicrosecond extends Timestamp_ { constructor(timezone?: string | null) { super(TimeUnit.MICROSECOND, timezone); } }\n/** @ignore */\nexport class TimestampNanosecond extends Timestamp_ { constructor(timezone?: string | null) { super(TimeUnit.NANOSECOND, timezone); } }\n\n/** @ignore */\ntype Intervals = Type.Interval | Type.IntervalDayTime | Type.IntervalYearMonth;\n/** @ignore */\ninterface Interval_ extends DataType { TArray: Int32Array; TValue: Int32Array; ArrayType: TypedArrayConstructor; }\n/** @ignore */\nclass Interval_ extends DataType {\n constructor(public readonly unit: IntervalUnit) {\n super();\n }\n public get typeId() { return Type.Interval as T; }\n public toString() { return `Interval<${IntervalUnit[this.unit]}>`; }\n protected static [Symbol.toStringTag] = ((proto: Interval_) => {\n ( proto).unit = null;\n ( proto).ArrayType = Int32Array;\n return proto[Symbol.toStringTag] = 'Interval';\n })(Interval_.prototype);\n}\n\nexport { Interval_ as Interval };\n\n/** @ignore */\nexport class IntervalDayTime extends Interval_ { constructor() { super(IntervalUnit.DAY_TIME); } }\n/** @ignore */\nexport class IntervalYearMonth extends Interval_ { constructor() { super(IntervalUnit.YEAR_MONTH); } }\n\n/** @ignore */\nexport interface List extends DataType { TArray: IterableArrayLike; TValue: V; }\n/** @ignore */\nexport class List extends DataType {\n constructor(child: Field) {\n super();\n this.children = [child];\n }\n public readonly children: Field[];\n public get typeId() { return Type.List as Type.List; }\n public toString() { return `List<${this.valueType}>`; }\n public get valueType(): T { return this.children[0].type as T; }\n public get valueField(): Field { return this.children[0] as Field; }\n public get ArrayType(): T['ArrayType'] { return this.valueType.ArrayType; }\n protected static [Symbol.toStringTag] = ((proto: List) => {\n ( proto).children = null;\n return proto[Symbol.toStringTag] = 'List';\n })(List.prototype);\n}\n\n/** @ignore */\nexport interface Struct extends DataType { TArray: IterableArrayLike>; TValue: RowLike; dataTypes: T; }\n/** @ignore */\nexport class Struct extends DataType {\n public readonly children: Field[];\n constructor(children: Field[]) {\n super();\n this.children = children;\n }\n public get typeId() { return Type.Struct as Type.Struct; }\n public toString() { return `Struct<{${this.children.map((f) => `${f.name}:${f.type}`).join(`, `)}}>`; }\n protected static [Symbol.toStringTag] = ((proto: Struct) => {\n ( proto).children = null;\n return proto[Symbol.toStringTag] = 'Struct';\n })(Struct.prototype);\n}\n\n/** @ignore */\ntype Unions = Type.Union | Type.DenseUnion | Type.SparseUnion;\n/** @ignore */\ninterface Union_ extends DataType { TArray: Int8Array; TValue: any; ArrayType: TypedArrayConstructor; }\n/** @ignore */\nclass Union_ extends DataType {\n public readonly mode: UnionMode;\n public readonly typeIds: Int32Array;\n public readonly children: Field[];\n public readonly typeIdToChildIndex: { [key: number]: number };\n constructor(mode: UnionMode,\n typeIds: number[] | Int32Array,\n children: Field[]) {\n super();\n this.mode = mode;\n this.children = children;\n this.typeIds = typeIds = Int32Array.from(typeIds);\n this.typeIdToChildIndex = typeIds.reduce((typeIdToChildIndex, typeId, idx) => {\n return (typeIdToChildIndex[typeId] = idx) && typeIdToChildIndex || typeIdToChildIndex;\n }, Object.create(null) as { [key: number]: number });\n }\n public get typeId() { return Type.Union as T; }\n public toString() { return `${this[Symbol.toStringTag]}<${\n this.children.map((x) => `${x.type}`).join(` | `)\n }>`; }\n protected static [Symbol.toStringTag] = ((proto: Union_) => {\n ( proto).mode = null;\n ( proto).typeIds = null;\n ( proto).children = null;\n ( proto).typeIdToChildIndex = null;\n ( proto).ArrayType = Int8Array;\n return proto[Symbol.toStringTag] = 'Union';\n })(Union_.prototype);\n}\n\nexport { Union_ as Union };\n\n/** @ignore */\nexport class DenseUnion extends Union_ {\n constructor(typeIds: number[] | Int32Array, children: Field[]) {\n super(UnionMode.Dense, typeIds, children);\n }\n}\n\n/** @ignore */\nexport class SparseUnion extends Union_ {\n constructor(typeIds: number[] | Int32Array, children: Field[]) {\n super(UnionMode.Sparse, typeIds, children);\n }\n}\n\n/** @ignore */\nexport interface FixedSizeBinary extends DataType { TArray: Uint8Array; TValue: Uint8Array; ArrayType: TypedArrayConstructor; }\n/** @ignore */\nexport class FixedSizeBinary extends DataType {\n constructor(public readonly byteWidth: number) {\n super();\n }\n public get typeId() { return Type.FixedSizeBinary as Type.FixedSizeBinary; }\n public toString() { return `FixedSizeBinary[${this.byteWidth}]`; }\n protected static [Symbol.toStringTag] = ((proto: FixedSizeBinary) => {\n ( proto).byteWidth = null;\n ( proto).ArrayType = Uint8Array;\n return proto[Symbol.toStringTag] = 'FixedSizeBinary';\n })(FixedSizeBinary.prototype);\n}\n\n/** @ignore */\nexport interface FixedSizeList extends DataType { TArray: IterableArrayLike; TValue: V; }\n/** @ignore */\nexport class FixedSizeList extends DataType {\n public readonly children: Field[];\n constructor(public readonly listSize: number, child: Field) {\n super();\n this.children = [child];\n }\n public get typeId() { return Type.FixedSizeList as Type.FixedSizeList; }\n public get valueType(): T { return this.children[0].type as T; }\n public get valueField(): Field { return this.children[0] as Field; }\n public get ArrayType(): T['ArrayType'] { return this.valueType.ArrayType; }\n public toString() { return `FixedSizeList[${this.listSize}]<${this.valueType}>`; }\n protected static [Symbol.toStringTag] = ((proto: FixedSizeList) => {\n ( proto).children = null;\n ( proto).listSize = null;\n return proto[Symbol.toStringTag] = 'FixedSizeList';\n })(FixedSizeList.prototype);\n}\n\n/** @ignore */\nexport interface Map_ extends DataType {\n TArray: IterableArrayLike>;\n TChild: Struct<{ key: TKey, value: TValue }>;\n TValue: MapLike;\n}\n\n/** @ignore */\nexport class Map_ extends DataType {\n constructor(child: Field>, keysSorted = false) {\n super();\n this.children = [child];\n this.keysSorted = keysSorted;\n }\n public readonly keysSorted: boolean;\n public readonly children: Field>[];\n public get typeId() { return Type.Map as Type.Map; }\n public get keyType(): TKey { return this.children[0].type.children[0].type as TKey; }\n public get valueType(): TValue { return this.children[0].type.children[1].type as TValue; }\n public toString() { return `Map<{${this.children[0].type.children.map((f) => `${f.name}:${f.type}`).join(`, `)}}>`; }\n protected static [Symbol.toStringTag] = ((proto: Map_) => {\n ( proto).children = null;\n ( proto).keysSorted = null;\n return proto[Symbol.toStringTag] = 'Map_';\n })(Map_.prototype);\n}\n\n/** @ignore */\nconst getId = ((atomicDictionaryId) => () => ++atomicDictionaryId)(-1);\n\n/** @ignore */\nexport type TKeys = Int8 | Int16 | Int32 | Uint8 | Uint16 | Uint32;\n\n/** @ignore */\nexport interface Dictionary extends DataType { TArray: TKey['TArray']; TValue: T['TValue']; }\n/** @ignore */\nexport class Dictionary extends DataType {\n public readonly id: number;\n public readonly indices: TKey;\n public readonly dictionary: T;\n public readonly isOrdered: boolean;\n constructor(dictionary: T, indices: TKey, id?: Long | number | null, isOrdered?: boolean | null) {\n super();\n this.indices = indices;\n this.dictionary = dictionary;\n this.isOrdered = isOrdered || false;\n this.id = id == null ? getId() : typeof id === 'number' ? id : id.low;\n }\n public get typeId() { return Type.Dictionary as Type.Dictionary; }\n public get children() { return this.dictionary.children; }\n public get valueType(): T { return this.dictionary as T; }\n public get ArrayType(): T['ArrayType'] { return this.dictionary.ArrayType; }\n public toString() { return `Dictionary<${this.indices}, ${this.dictionary}>`; }\n protected static [Symbol.toStringTag] = ((proto: Dictionary) => {\n ( proto).id = null;\n ( proto).indices = null;\n ( proto).isOrdered = null;\n ( proto).dictionary = null;\n return proto[Symbol.toStringTag] = 'Dictionary';\n })(Dictionary.prototype);\n}\n\n/** @ignore */\nexport interface IterableArrayLike extends ArrayLike, Iterable {}\n/** @ignore */\nexport type FloatArray = Uint16Array | Float32Array | Float64Array;\n/** @ignore */\nexport type IntArray = Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array;\n\n/** @ignore */\nexport function strideForType(type: DataType) {\n let t: any = type;\n switch (type.typeId) {\n case Type.Decimal: return 4;\n case Type.Timestamp: return 2;\n case Type.Date: return 1 + (t as Date_).unit;\n case Type.Interval: return 1 + (t as Interval_).unit;\n case Type.Int: return 1 + +((t as Int_).bitWidth > 32);\n case Type.Time: return 1 + +((t as Time_).bitWidth > 32);\n case Type.FixedSizeList: return (t as FixedSizeList).listSize;\n case Type.FixedSizeBinary: return (t as FixedSizeBinary).byteWidth;\n default: return 1;\n }\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/type.mjs b/frontend/node_modules/apache-arrow/type.mjs new file mode 100644 index 0000000000000000000000000000000000000000..a5087dfb60bc45602e71cf5c088edb475db735ce --- /dev/null +++ b/frontend/node_modules/apache-arrow/type.mjs @@ -0,0 +1,479 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { instance as comparer } from './visitor/typecomparator'; +import { Type, Precision, UnionMode, DateUnit, TimeUnit, IntervalUnit } from './enum'; +/** + * An abstract base class for classes that encapsulate metadata about each of + * the logical types that Arrow can represent. + */ +export class DataType { + /** @nocollapse */ static isNull(x) { return x && x.typeId === Type.Null; } + /** @nocollapse */ static isInt(x) { return x && x.typeId === Type.Int; } + /** @nocollapse */ static isFloat(x) { return x && x.typeId === Type.Float; } + /** @nocollapse */ static isBinary(x) { return x && x.typeId === Type.Binary; } + /** @nocollapse */ static isUtf8(x) { return x && x.typeId === Type.Utf8; } + /** @nocollapse */ static isBool(x) { return x && x.typeId === Type.Bool; } + /** @nocollapse */ static isDecimal(x) { return x && x.typeId === Type.Decimal; } + /** @nocollapse */ static isDate(x) { return x && x.typeId === Type.Date; } + /** @nocollapse */ static isTime(x) { return x && x.typeId === Type.Time; } + /** @nocollapse */ static isTimestamp(x) { return x && x.typeId === Type.Timestamp; } + /** @nocollapse */ static isInterval(x) { return x && x.typeId === Type.Interval; } + /** @nocollapse */ static isList(x) { return x && x.typeId === Type.List; } + /** @nocollapse */ static isStruct(x) { return x && x.typeId === Type.Struct; } + /** @nocollapse */ static isUnion(x) { return x && x.typeId === Type.Union; } + /** @nocollapse */ static isFixedSizeBinary(x) { return x && x.typeId === Type.FixedSizeBinary; } + /** @nocollapse */ static isFixedSizeList(x) { return x && x.typeId === Type.FixedSizeList; } + /** @nocollapse */ static isMap(x) { return x && x.typeId === Type.Map; } + /** @nocollapse */ static isDictionary(x) { return x && x.typeId === Type.Dictionary; } + get typeId() { return Type.NONE; } + compareTo(other) { + return comparer.visit(this, other); + } +} +DataType[Symbol.toStringTag] = ((proto) => { + proto.children = null; + proto.ArrayType = Array; + return proto[Symbol.toStringTag] = 'DataType'; +})(DataType.prototype); +/** @ignore */ +export class Null extends DataType { + toString() { return `Null`; } + get typeId() { return Type.Null; } +} +Null[Symbol.toStringTag] = ((proto) => { + return proto[Symbol.toStringTag] = 'Null'; +})(Null.prototype); +/** @ignore */ +class Int_ extends DataType { + constructor(isSigned, bitWidth) { + super(); + this.isSigned = isSigned; + this.bitWidth = bitWidth; + } + get typeId() { return Type.Int; } + get ArrayType() { + switch (this.bitWidth) { + case 8: return this.isSigned ? Int8Array : Uint8Array; + case 16: return this.isSigned ? Int16Array : Uint16Array; + case 32: return this.isSigned ? Int32Array : Uint32Array; + case 64: return this.isSigned ? Int32Array : Uint32Array; + } + throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`); + } + toString() { return `${this.isSigned ? `I` : `Ui`}nt${this.bitWidth}`; } +} +Int_[Symbol.toStringTag] = ((proto) => { + proto.isSigned = null; + proto.bitWidth = null; + return proto[Symbol.toStringTag] = 'Int'; +})(Int_.prototype); +export { Int_ as Int }; +/** @ignore */ +export class Int8 extends Int_ { + constructor() { super(true, 8); } +} +/** @ignore */ +export class Int16 extends Int_ { + constructor() { super(true, 16); } +} +/** @ignore */ +export class Int32 extends Int_ { + constructor() { super(true, 32); } +} +/** @ignore */ +export class Int64 extends Int_ { + constructor() { super(true, 64); } +} +/** @ignore */ +export class Uint8 extends Int_ { + constructor() { super(false, 8); } +} +/** @ignore */ +export class Uint16 extends Int_ { + constructor() { super(false, 16); } +} +/** @ignore */ +export class Uint32 extends Int_ { + constructor() { super(false, 32); } +} +/** @ignore */ +export class Uint64 extends Int_ { + constructor() { super(false, 64); } +} +Object.defineProperty(Int8.prototype, 'ArrayType', { value: Int8Array }); +Object.defineProperty(Int16.prototype, 'ArrayType', { value: Int16Array }); +Object.defineProperty(Int32.prototype, 'ArrayType', { value: Int32Array }); +Object.defineProperty(Int64.prototype, 'ArrayType', { value: Int32Array }); +Object.defineProperty(Uint8.prototype, 'ArrayType', { value: Uint8Array }); +Object.defineProperty(Uint16.prototype, 'ArrayType', { value: Uint16Array }); +Object.defineProperty(Uint32.prototype, 'ArrayType', { value: Uint32Array }); +Object.defineProperty(Uint64.prototype, 'ArrayType', { value: Uint32Array }); +/** @ignore */ +export class Float extends DataType { + constructor(precision) { + super(); + this.precision = precision; + } + get typeId() { return Type.Float; } + get ArrayType() { + switch (this.precision) { + case Precision.HALF: return Uint16Array; + case Precision.SINGLE: return Float32Array; + case Precision.DOUBLE: return Float64Array; + } + throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`); + } + toString() { return `Float${(this.precision << 5) || 16}`; } +} +Float[Symbol.toStringTag] = ((proto) => { + proto.precision = null; + return proto[Symbol.toStringTag] = 'Float'; +})(Float.prototype); +/** @ignore */ +export class Float16 extends Float { + constructor() { super(Precision.HALF); } +} +/** @ignore */ +export class Float32 extends Float { + constructor() { super(Precision.SINGLE); } +} +/** @ignore */ +export class Float64 extends Float { + constructor() { super(Precision.DOUBLE); } +} +Object.defineProperty(Float16.prototype, 'ArrayType', { value: Uint16Array }); +Object.defineProperty(Float32.prototype, 'ArrayType', { value: Float32Array }); +Object.defineProperty(Float64.prototype, 'ArrayType', { value: Float64Array }); +/** @ignore */ +export class Binary extends DataType { + constructor() { + super(); + } + get typeId() { return Type.Binary; } + toString() { return `Binary`; } +} +Binary[Symbol.toStringTag] = ((proto) => { + proto.ArrayType = Uint8Array; + return proto[Symbol.toStringTag] = 'Binary'; +})(Binary.prototype); +/** @ignore */ +export class Utf8 extends DataType { + constructor() { + super(); + } + get typeId() { return Type.Utf8; } + toString() { return `Utf8`; } +} +Utf8[Symbol.toStringTag] = ((proto) => { + proto.ArrayType = Uint8Array; + return proto[Symbol.toStringTag] = 'Utf8'; +})(Utf8.prototype); +/** @ignore */ +export class Bool extends DataType { + constructor() { + super(); + } + get typeId() { return Type.Bool; } + toString() { return `Bool`; } +} +Bool[Symbol.toStringTag] = ((proto) => { + proto.ArrayType = Uint8Array; + return proto[Symbol.toStringTag] = 'Bool'; +})(Bool.prototype); +/** @ignore */ +export class Decimal extends DataType { + constructor(scale, precision) { + super(); + this.scale = scale; + this.precision = precision; + } + get typeId() { return Type.Decimal; } + toString() { return `Decimal[${this.precision}e${this.scale > 0 ? `+` : ``}${this.scale}]`; } +} +Decimal[Symbol.toStringTag] = ((proto) => { + proto.scale = null; + proto.precision = null; + proto.ArrayType = Uint32Array; + return proto[Symbol.toStringTag] = 'Decimal'; +})(Decimal.prototype); +/** @ignore */ +export class Date_ extends DataType { + constructor(unit) { + super(); + this.unit = unit; + } + get typeId() { return Type.Date; } + toString() { return `Date${(this.unit + 1) * 32}<${DateUnit[this.unit]}>`; } +} +Date_[Symbol.toStringTag] = ((proto) => { + proto.unit = null; + proto.ArrayType = Int32Array; + return proto[Symbol.toStringTag] = 'Date'; +})(Date_.prototype); +/** @ignore */ +export class DateDay extends Date_ { + constructor() { super(DateUnit.DAY); } +} +/** @ignore */ +export class DateMillisecond extends Date_ { + constructor() { super(DateUnit.MILLISECOND); } +} +/** @ignore */ +class Time_ extends DataType { + constructor(unit, bitWidth) { + super(); + this.unit = unit; + this.bitWidth = bitWidth; + } + get typeId() { return Type.Time; } + toString() { return `Time${this.bitWidth}<${TimeUnit[this.unit]}>`; } +} +Time_[Symbol.toStringTag] = ((proto) => { + proto.unit = null; + proto.bitWidth = null; + proto.ArrayType = Int32Array; + return proto[Symbol.toStringTag] = 'Time'; +})(Time_.prototype); +export { Time_ as Time }; +/** @ignore */ +export class TimeSecond extends Time_ { + constructor() { super(TimeUnit.SECOND, 32); } +} +/** @ignore */ +export class TimeMillisecond extends Time_ { + constructor() { super(TimeUnit.MILLISECOND, 32); } +} +/** @ignore */ +export class TimeMicrosecond extends Time_ { + constructor() { super(TimeUnit.MICROSECOND, 64); } +} +/** @ignore */ +export class TimeNanosecond extends Time_ { + constructor() { super(TimeUnit.NANOSECOND, 64); } +} +/** @ignore */ +class Timestamp_ extends DataType { + constructor(unit, timezone) { + super(); + this.unit = unit; + this.timezone = timezone; + } + get typeId() { return Type.Timestamp; } + toString() { return `Timestamp<${TimeUnit[this.unit]}${this.timezone ? `, ${this.timezone}` : ``}>`; } +} +Timestamp_[Symbol.toStringTag] = ((proto) => { + proto.unit = null; + proto.timezone = null; + proto.ArrayType = Int32Array; + return proto[Symbol.toStringTag] = 'Timestamp'; +})(Timestamp_.prototype); +export { Timestamp_ as Timestamp }; +/** @ignore */ +export class TimestampSecond extends Timestamp_ { + constructor(timezone) { super(TimeUnit.SECOND, timezone); } +} +/** @ignore */ +export class TimestampMillisecond extends Timestamp_ { + constructor(timezone) { super(TimeUnit.MILLISECOND, timezone); } +} +/** @ignore */ +export class TimestampMicrosecond extends Timestamp_ { + constructor(timezone) { super(TimeUnit.MICROSECOND, timezone); } +} +/** @ignore */ +export class TimestampNanosecond extends Timestamp_ { + constructor(timezone) { super(TimeUnit.NANOSECOND, timezone); } +} +/** @ignore */ +class Interval_ extends DataType { + constructor(unit) { + super(); + this.unit = unit; + } + get typeId() { return Type.Interval; } + toString() { return `Interval<${IntervalUnit[this.unit]}>`; } +} +Interval_[Symbol.toStringTag] = ((proto) => { + proto.unit = null; + proto.ArrayType = Int32Array; + return proto[Symbol.toStringTag] = 'Interval'; +})(Interval_.prototype); +export { Interval_ as Interval }; +/** @ignore */ +export class IntervalDayTime extends Interval_ { + constructor() { super(IntervalUnit.DAY_TIME); } +} +/** @ignore */ +export class IntervalYearMonth extends Interval_ { + constructor() { super(IntervalUnit.YEAR_MONTH); } +} +/** @ignore */ +export class List extends DataType { + constructor(child) { + super(); + this.children = [child]; + } + get typeId() { return Type.List; } + toString() { return `List<${this.valueType}>`; } + get valueType() { return this.children[0].type; } + get valueField() { return this.children[0]; } + get ArrayType() { return this.valueType.ArrayType; } +} +List[Symbol.toStringTag] = ((proto) => { + proto.children = null; + return proto[Symbol.toStringTag] = 'List'; +})(List.prototype); +/** @ignore */ +export class Struct extends DataType { + constructor(children) { + super(); + this.children = children; + } + get typeId() { return Type.Struct; } + toString() { return `Struct<{${this.children.map((f) => `${f.name}:${f.type}`).join(`, `)}}>`; } +} +Struct[Symbol.toStringTag] = ((proto) => { + proto.children = null; + return proto[Symbol.toStringTag] = 'Struct'; +})(Struct.prototype); +/** @ignore */ +class Union_ extends DataType { + constructor(mode, typeIds, children) { + super(); + this.mode = mode; + this.children = children; + this.typeIds = typeIds = Int32Array.from(typeIds); + this.typeIdToChildIndex = typeIds.reduce((typeIdToChildIndex, typeId, idx) => { + return (typeIdToChildIndex[typeId] = idx) && typeIdToChildIndex || typeIdToChildIndex; + }, Object.create(null)); + } + get typeId() { return Type.Union; } + toString() { + return `${this[Symbol.toStringTag]}<${this.children.map((x) => `${x.type}`).join(` | `)}>`; + } +} +Union_[Symbol.toStringTag] = ((proto) => { + proto.mode = null; + proto.typeIds = null; + proto.children = null; + proto.typeIdToChildIndex = null; + proto.ArrayType = Int8Array; + return proto[Symbol.toStringTag] = 'Union'; +})(Union_.prototype); +export { Union_ as Union }; +/** @ignore */ +export class DenseUnion extends Union_ { + constructor(typeIds, children) { + super(UnionMode.Dense, typeIds, children); + } +} +/** @ignore */ +export class SparseUnion extends Union_ { + constructor(typeIds, children) { + super(UnionMode.Sparse, typeIds, children); + } +} +/** @ignore */ +export class FixedSizeBinary extends DataType { + constructor(byteWidth) { + super(); + this.byteWidth = byteWidth; + } + get typeId() { return Type.FixedSizeBinary; } + toString() { return `FixedSizeBinary[${this.byteWidth}]`; } +} +FixedSizeBinary[Symbol.toStringTag] = ((proto) => { + proto.byteWidth = null; + proto.ArrayType = Uint8Array; + return proto[Symbol.toStringTag] = 'FixedSizeBinary'; +})(FixedSizeBinary.prototype); +/** @ignore */ +export class FixedSizeList extends DataType { + constructor(listSize, child) { + super(); + this.listSize = listSize; + this.children = [child]; + } + get typeId() { return Type.FixedSizeList; } + get valueType() { return this.children[0].type; } + get valueField() { return this.children[0]; } + get ArrayType() { return this.valueType.ArrayType; } + toString() { return `FixedSizeList[${this.listSize}]<${this.valueType}>`; } +} +FixedSizeList[Symbol.toStringTag] = ((proto) => { + proto.children = null; + proto.listSize = null; + return proto[Symbol.toStringTag] = 'FixedSizeList'; +})(FixedSizeList.prototype); +/** @ignore */ +export class Map_ extends DataType { + constructor(child, keysSorted = false) { + super(); + this.children = [child]; + this.keysSorted = keysSorted; + } + get typeId() { return Type.Map; } + get keyType() { return this.children[0].type.children[0].type; } + get valueType() { return this.children[0].type.children[1].type; } + toString() { return `Map<{${this.children[0].type.children.map((f) => `${f.name}:${f.type}`).join(`, `)}}>`; } +} +Map_[Symbol.toStringTag] = ((proto) => { + proto.children = null; + proto.keysSorted = null; + return proto[Symbol.toStringTag] = 'Map_'; +})(Map_.prototype); +/** @ignore */ +const getId = ((atomicDictionaryId) => () => ++atomicDictionaryId)(-1); +/** @ignore */ +export class Dictionary extends DataType { + constructor(dictionary, indices, id, isOrdered) { + super(); + this.indices = indices; + this.dictionary = dictionary; + this.isOrdered = isOrdered || false; + this.id = id == null ? getId() : typeof id === 'number' ? id : id.low; + } + get typeId() { return Type.Dictionary; } + get children() { return this.dictionary.children; } + get valueType() { return this.dictionary; } + get ArrayType() { return this.dictionary.ArrayType; } + toString() { return `Dictionary<${this.indices}, ${this.dictionary}>`; } +} +Dictionary[Symbol.toStringTag] = ((proto) => { + proto.id = null; + proto.indices = null; + proto.isOrdered = null; + proto.dictionary = null; + return proto[Symbol.toStringTag] = 'Dictionary'; +})(Dictionary.prototype); +/** @ignore */ +export function strideForType(type) { + let t = type; + switch (type.typeId) { + case Type.Decimal: return 4; + case Type.Timestamp: return 2; + case Type.Date: return 1 + t.unit; + case Type.Interval: return 1 + t.unit; + case Type.Int: return 1 + +(t.bitWidth > 32); + case Type.Time: return 1 + +(t.bitWidth > 32); + case Type.FixedSizeList: return t.listSize; + case Type.FixedSizeBinary: return t.byteWidth; + default: return 1; + } +} + +//# sourceMappingURL=type.mjs.map diff --git a/frontend/node_modules/apache-arrow/type.mjs.map b/frontend/node_modules/apache-arrow/type.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..8f5f1140c0f5cbffe47c1fea5f59655d54116eba --- /dev/null +++ b/frontend/node_modules/apache-arrow/type.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["type.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAQrB,OAAO,EAAE,QAAQ,IAAI,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGhE,OAAO,EACH,IAAI,EACJ,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAAE,YAAY,EACnC,MAAM,QAAQ,CAAC;AA8BhB;;;GAGG;AACH,MAAM,OAAgB,QAAQ;IAK1B,kBAAkB,CAAC,MAAM,CAAY,MAAM,CAAE,CAAM,IAA0B,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,IAAI,CAAC,IAAI,CAAC,CAAY,CAAC;IAC7H,kBAAkB,CAAC,MAAM,CAAa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C;QACvD,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAE,CAAW,CAAC,QAAQ,GAAG,EAAE,CAAC,CAAC;QACzD,KAAK,IAAI,CAAC,aAAa,CAAC,CAAC,OAAQ,CAAmB,CAAC,QAAQ,CAAC;QAC9D,KAAK,IAAI,CAAC,eAAe,CAAC,CAAC,OAAQ,CAAqB,CAAC,SAAS,CAAC;QACnE,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;KACrB;AACL,CAAC","file":"type.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n/* tslint:disable:class-name */\n\nimport { Field } from './schema';\nimport { flatbuffers } from 'flatbuffers';\nimport { TypedArrayConstructor } from './interfaces';\nimport { VectorType as V, TypeToDataType } from './interfaces';\nimport { instance as comparer } from './visitor/typecomparator';\n\nimport Long = flatbuffers.Long;\nimport {\n Type,\n Precision, UnionMode,\n DateUnit, TimeUnit, IntervalUnit\n} from './enum';\n\n/** @ignore */\nexport type TimeBitWidth = 32 | 64;\n/** @ignore */\nexport type IntBitWidth = 8 | 16 | 32 | 64;\n/** @ignore */\nexport type IsSigned = { 'true': true; 'false': false };\n/** @ignore */\nexport type RowLike =\n ( Iterable<[string, T[keyof T]['TValue'] | null]> )\n & { [P in keyof T]: T[P]['TValue'] | null }\n & { get(key: K): T[K]['TValue'] | null; }\n & { set(key: K, val: T[K]['TValue'] | null): void; }\n ;\n\n/** @ignore */\nexport type MapLike =\n { [P in K['TValue']]: V['TValue'] | null }\n & ( Map )\n ;\n\nexport interface DataType {\n readonly TType: TType;\n readonly TArray: any;\n readonly TValue: any;\n readonly ArrayType: any;\n readonly children: Field[];\n}\n\n/**\n * An abstract base class for classes that encapsulate metadata about each of\n * the logical types that Arrow can represent.\n */\nexport abstract class DataType {\n\n // @ts-ignore\n public [Symbol.toStringTag]: string;\n\n /** @nocollapse */ static isNull (x: any): x is Null { return x && x.typeId === Type.Null; }\n /** @nocollapse */ static isInt (x: any): x is Int_ { return x && x.typeId === Type.Int; }\n /** @nocollapse */ static isFloat (x: any): x is Float { return x && x.typeId === Type.Float; }\n /** @nocollapse */ static isBinary (x: any): x is Binary { return x && x.typeId === Type.Binary; }\n /** @nocollapse */ static isUtf8 (x: any): x is Utf8 { return x && x.typeId === Type.Utf8; }\n /** @nocollapse */ static isBool (x: any): x is Bool { return x && x.typeId === Type.Bool; }\n /** @nocollapse */ static isDecimal (x: any): x is Decimal { return x && x.typeId === Type.Decimal; }\n /** @nocollapse */ static isDate (x: any): x is Date_ { return x && x.typeId === Type.Date; }\n /** @nocollapse */ static isTime (x: any): x is Time_ { return x && x.typeId === Type.Time; }\n /** @nocollapse */ static isTimestamp (x: any): x is Timestamp_ { return x && x.typeId === Type.Timestamp; }\n /** @nocollapse */ static isInterval (x: any): x is Interval_ { return x && x.typeId === Type.Interval; }\n /** @nocollapse */ static isList (x: any): x is List { return x && x.typeId === Type.List; }\n /** @nocollapse */ static isStruct (x: any): x is Struct { return x && x.typeId === Type.Struct; }\n /** @nocollapse */ static isUnion (x: any): x is Union_ { return x && x.typeId === Type.Union; }\n /** @nocollapse */ static isFixedSizeBinary (x: any): x is FixedSizeBinary { return x && x.typeId === Type.FixedSizeBinary; }\n /** @nocollapse */ static isFixedSizeList (x: any): x is FixedSizeList { return x && x.typeId === Type.FixedSizeList; }\n /** @nocollapse */ static isMap (x: any): x is Map_ { return x && x.typeId === Type.Map; }\n /** @nocollapse */ static isDictionary (x: any): x is Dictionary { return x && x.typeId === Type.Dictionary; }\n\n public get typeId(): TType { return Type.NONE; }\n public compareTo(other: DataType): other is TypeToDataType {\n return comparer.visit(this, other);\n }\n\n protected static [Symbol.toStringTag] = ((proto: DataType) => {\n ( proto).children = null;\n ( proto).ArrayType = Array;\n return proto[Symbol.toStringTag] = 'DataType';\n })(DataType.prototype);\n}\n\n/** @ignore */\nexport interface Null extends DataType { TArray: void; TValue: null; }\n/** @ignore */\nexport class Null extends DataType {\n public toString() { return `Null`; }\n public get typeId() { return Type.Null as Type.Null; }\n protected static [Symbol.toStringTag] = ((proto: Null) => {\n return proto[Symbol.toStringTag] = 'Null';\n })(Null.prototype);\n}\n\n/** @ignore */\ntype Ints = Type.Int | Type.Int8 | Type.Int16 | Type.Int32 | Type.Int64 | Type.Uint8 | Type.Uint16 | Type.Uint32 | Type.Uint64;\n/** @ignore */\ntype IType = {\n [Type.Int ]: { bitWidth: IntBitWidth; isSigned: true | false; TArray: IntArray; TValue: number | bigint | Int32Array | Uint32Array; };\n [Type.Int8 ]: { bitWidth: 8; isSigned: true; TArray: Int8Array; TValue: number; };\n [Type.Int16 ]: { bitWidth: 16; isSigned: true; TArray: Int16Array; TValue: number; };\n [Type.Int32 ]: { bitWidth: 32; isSigned: true; TArray: Int32Array; TValue: number; };\n [Type.Int64 ]: { bitWidth: 64; isSigned: true; TArray: Int32Array; TValue: bigint | Int32Array | Uint32Array; };\n [Type.Uint8 ]: { bitWidth: 8; isSigned: false; TArray: Uint8Array; TValue: number; };\n [Type.Uint16]: { bitWidth: 16; isSigned: false; TArray: Uint16Array; TValue: number; };\n [Type.Uint32]: { bitWidth: 32; isSigned: false; TArray: Uint32Array; TValue: number; };\n [Type.Uint64]: { bitWidth: 64; isSigned: false; TArray: Uint32Array; TValue: bigint | Int32Array | Uint32Array; };\n};\n\n/** @ignore */\ninterface Int_ extends DataType { TArray: IType[T]['TArray']; TValue: IType[T]['TValue']; }\n/** @ignore */\nclass Int_ extends DataType {\n constructor(public readonly isSigned: IType[T]['isSigned'],\n public readonly bitWidth: IType[T]['bitWidth']) {\n super();\n }\n public get typeId() { return Type.Int as T; }\n public get ArrayType(): TypedArrayConstructor {\n switch (this.bitWidth) {\n case 8: return this.isSigned ? Int8Array : Uint8Array;\n case 16: return this.isSigned ? Int16Array : Uint16Array;\n case 32: return this.isSigned ? Int32Array : Uint32Array;\n case 64: return this.isSigned ? Int32Array : Uint32Array;\n }\n throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`);\n }\n public toString() { return `${this.isSigned ? `I` : `Ui`}nt${this.bitWidth}`; }\n protected static [Symbol.toStringTag] = ((proto: Int_) => {\n ( proto).isSigned = null;\n ( proto).bitWidth = null;\n return proto[Symbol.toStringTag] = 'Int';\n })(Int_.prototype);\n}\n\nexport { Int_ as Int };\n\n/** @ignore */\nexport class Int8 extends Int_ { constructor() { super(true, 8); } }\n/** @ignore */\nexport class Int16 extends Int_ { constructor() { super(true, 16); } }\n/** @ignore */\nexport class Int32 extends Int_ { constructor() { super(true, 32); } }\n/** @ignore */\nexport class Int64 extends Int_ { constructor() { super(true, 64); } }\n/** @ignore */\nexport class Uint8 extends Int_ { constructor() { super(false, 8); } }\n/** @ignore */\nexport class Uint16 extends Int_ { constructor() { super(false, 16); } }\n/** @ignore */\nexport class Uint32 extends Int_ { constructor() { super(false, 32); } }\n/** @ignore */\nexport class Uint64 extends Int_ { constructor() { super(false, 64); } }\n\nObject.defineProperty(Int8.prototype, 'ArrayType', { value: Int8Array });\nObject.defineProperty(Int16.prototype, 'ArrayType', { value: Int16Array });\nObject.defineProperty(Int32.prototype, 'ArrayType', { value: Int32Array });\nObject.defineProperty(Int64.prototype, 'ArrayType', { value: Int32Array });\nObject.defineProperty(Uint8.prototype, 'ArrayType', { value: Uint8Array });\nObject.defineProperty(Uint16.prototype, 'ArrayType', { value: Uint16Array });\nObject.defineProperty(Uint32.prototype, 'ArrayType', { value: Uint32Array });\nObject.defineProperty(Uint64.prototype, 'ArrayType', { value: Uint32Array });\n\n/** @ignore */\ntype Floats = Type.Float | Type.Float16 | Type.Float32 | Type.Float64;\n/** @ignore */\ntype FType = {\n [Type.Float ]: { precision: Precision; TArray: FloatArray; TValue: number; };\n [Type.Float16]: { precision: Precision.HALF; TArray: Uint16Array; TValue: number; };\n [Type.Float32]: { precision: Precision.SINGLE; TArray: Float32Array; TValue: number; };\n [Type.Float64]: { precision: Precision.DOUBLE; TArray: Float64Array; TValue: number; };\n};\n\n/** @ignore */\nexport interface Float extends DataType { TArray: FType[T]['TArray']; TValue: number; }\n/** @ignore */\nexport class Float extends DataType {\n constructor(public readonly precision: Precision) {\n super();\n }\n public get typeId() { return Type.Float as T; }\n public get ArrayType(): TypedArrayConstructor {\n switch (this.precision) {\n case Precision.HALF: return Uint16Array;\n case Precision.SINGLE: return Float32Array;\n case Precision.DOUBLE: return Float64Array;\n }\n throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`);\n }\n public toString() { return `Float${(this.precision << 5) || 16}`; }\n protected static [Symbol.toStringTag] = ((proto: Float) => {\n ( proto).precision = null;\n return proto[Symbol.toStringTag] = 'Float';\n })(Float.prototype);\n}\n\n/** @ignore */\nexport class Float16 extends Float { constructor() { super(Precision.HALF); } }\n/** @ignore */\nexport class Float32 extends Float { constructor() { super(Precision.SINGLE); } }\n/** @ignore */\nexport class Float64 extends Float { constructor() { super(Precision.DOUBLE); } }\n\nObject.defineProperty(Float16.prototype, 'ArrayType', { value: Uint16Array });\nObject.defineProperty(Float32.prototype, 'ArrayType', { value: Float32Array });\nObject.defineProperty(Float64.prototype, 'ArrayType', { value: Float64Array });\n\n/** @ignore */\nexport interface Binary extends DataType { TArray: Uint8Array; TValue: Uint8Array; ArrayType: TypedArrayConstructor; }\n/** @ignore */\nexport class Binary extends DataType {\n constructor() {\n super();\n }\n public get typeId() { return Type.Binary as Type.Binary; }\n public toString() { return `Binary`; }\n protected static [Symbol.toStringTag] = ((proto: Binary) => {\n ( proto).ArrayType = Uint8Array;\n return proto[Symbol.toStringTag] = 'Binary';\n })(Binary.prototype);\n}\n\n/** @ignore */\nexport interface Utf8 extends DataType { TArray: Uint8Array; TValue: string; ArrayType: TypedArrayConstructor; }\n/** @ignore */\nexport class Utf8 extends DataType {\n constructor() {\n super();\n }\n public get typeId() { return Type.Utf8 as Type.Utf8; }\n public toString() { return `Utf8`; }\n protected static [Symbol.toStringTag] = ((proto: Utf8) => {\n ( proto).ArrayType = Uint8Array;\n return proto[Symbol.toStringTag] = 'Utf8';\n })(Utf8.prototype);\n}\n\n/** @ignore */\nexport interface Bool extends DataType { TArray: Uint8Array; TValue: boolean; ArrayType: TypedArrayConstructor; }\n/** @ignore */\nexport class Bool extends DataType {\n constructor() {\n super();\n }\n public get typeId() { return Type.Bool as Type.Bool; }\n public toString() { return `Bool`; }\n protected static [Symbol.toStringTag] = ((proto: Bool) => {\n ( proto).ArrayType = Uint8Array;\n return proto[Symbol.toStringTag] = 'Bool';\n })(Bool.prototype);\n}\n\n/** @ignore */\nexport interface Decimal extends DataType { TArray: Uint32Array; TValue: Uint32Array; ArrayType: TypedArrayConstructor; }\n/** @ignore */\nexport class Decimal extends DataType {\n constructor(public readonly scale: number,\n public readonly precision: number) {\n super();\n }\n public get typeId() { return Type.Decimal as Type.Decimal; }\n public toString() { return `Decimal[${this.precision}e${this.scale > 0 ? `+` : ``}${this.scale}]`; }\n protected static [Symbol.toStringTag] = ((proto: Decimal) => {\n ( proto).scale = null;\n ( proto).precision = null;\n ( proto).ArrayType = Uint32Array;\n return proto[Symbol.toStringTag] = 'Decimal';\n })(Decimal.prototype);\n}\n\n/** @ignore */\nexport type Dates = Type.Date | Type.DateDay | Type.DateMillisecond;\n/** @ignore */\nexport interface Date_ extends DataType { TArray: Int32Array; TValue: Date; ArrayType: TypedArrayConstructor; }\n/** @ignore */\nexport class Date_ extends DataType {\n constructor(public readonly unit: DateUnit) {\n super();\n }\n public get typeId() { return Type.Date as T; }\n public toString() { return `Date${(this.unit + 1) * 32}<${DateUnit[this.unit]}>`; }\n protected static [Symbol.toStringTag] = ((proto: Date_) => {\n ( proto).unit = null;\n ( proto).ArrayType = Int32Array;\n return proto[Symbol.toStringTag] = 'Date';\n })(Date_.prototype);\n}\n\n/** @ignore */\nexport class DateDay extends Date_ { constructor() { super(DateUnit.DAY); } }\n/** @ignore */\nexport class DateMillisecond extends Date_ { constructor() { super(DateUnit.MILLISECOND); } }\n\n/** @ignore */\ntype Times = Type.Time | Type.TimeSecond | Type.TimeMillisecond | Type.TimeMicrosecond | Type.TimeNanosecond;\n/** @ignore */\ntype TimesType = {\n [Type.Time ]: { unit: TimeUnit; TValue: number | Int32Array };\n [Type.TimeSecond ]: { unit: TimeUnit.SECOND; TValue: number; };\n [Type.TimeMillisecond]: { unit: TimeUnit.MILLISECOND; TValue: number; };\n [Type.TimeMicrosecond]: { unit: TimeUnit.MICROSECOND; TValue: Int32Array; };\n [Type.TimeNanosecond ]: { unit: TimeUnit.NANOSECOND; TValue: Int32Array; };\n};\n\n/** @ignore */\ninterface Time_ extends DataType { TArray: Int32Array; TValue: TimesType[T]['TValue']; ArrayType: TypedArrayConstructor; }\n/** @ignore */\nclass Time_ extends DataType {\n constructor(public readonly unit: TimesType[T]['unit'],\n public readonly bitWidth: TimeBitWidth) {\n super();\n }\n public get typeId() { return Type.Time as T; }\n public toString() { return `Time${this.bitWidth}<${TimeUnit[this.unit]}>`; }\n protected static [Symbol.toStringTag] = ((proto: Time_) => {\n ( proto).unit = null;\n ( proto).bitWidth = null;\n ( proto).ArrayType = Int32Array;\n return proto[Symbol.toStringTag] = 'Time';\n })(Time_.prototype);\n}\n\nexport { Time_ as Time };\n\n/** @ignore */\nexport class TimeSecond extends Time_ { constructor() { super(TimeUnit.SECOND, 32); } }\n/** @ignore */\nexport class TimeMillisecond extends Time_ { constructor() { super(TimeUnit.MILLISECOND, 32); } }\n/** @ignore */\nexport class TimeMicrosecond extends Time_ { constructor() { super(TimeUnit.MICROSECOND, 64); } }\n/** @ignore */\nexport class TimeNanosecond extends Time_ { constructor() { super(TimeUnit.NANOSECOND, 64); } }\n\n/** @ignore */\ntype Timestamps = Type.Timestamp | Type.TimestampSecond | Type.TimestampMillisecond | Type.TimestampMicrosecond | Type.TimestampNanosecond;\n/** @ignore */\ninterface Timestamp_ extends DataType { TArray: Int32Array; TValue: number; ArrayType: TypedArrayConstructor; }\n/** @ignore */\nclass Timestamp_ extends DataType {\n constructor(public readonly unit: TimeUnit,\n public readonly timezone?: string | null) {\n super();\n }\n public get typeId() { return Type.Timestamp as T; }\n public toString() { return `Timestamp<${TimeUnit[this.unit]}${this.timezone ? `, ${this.timezone}` : ``}>`; }\n protected static [Symbol.toStringTag] = ((proto: Timestamp_) => {\n ( proto).unit = null;\n ( proto).timezone = null;\n ( proto).ArrayType = Int32Array;\n return proto[Symbol.toStringTag] = 'Timestamp';\n })(Timestamp_.prototype);\n}\n\nexport { Timestamp_ as Timestamp };\n\n/** @ignore */\nexport class TimestampSecond extends Timestamp_ { constructor(timezone?: string | null) { super(TimeUnit.SECOND, timezone); } }\n/** @ignore */\nexport class TimestampMillisecond extends Timestamp_ { constructor(timezone?: string | null) { super(TimeUnit.MILLISECOND, timezone); } }\n/** @ignore */\nexport class TimestampMicrosecond extends Timestamp_ { constructor(timezone?: string | null) { super(TimeUnit.MICROSECOND, timezone); } }\n/** @ignore */\nexport class TimestampNanosecond extends Timestamp_ { constructor(timezone?: string | null) { super(TimeUnit.NANOSECOND, timezone); } }\n\n/** @ignore */\ntype Intervals = Type.Interval | Type.IntervalDayTime | Type.IntervalYearMonth;\n/** @ignore */\ninterface Interval_ extends DataType { TArray: Int32Array; TValue: Int32Array; ArrayType: TypedArrayConstructor; }\n/** @ignore */\nclass Interval_ extends DataType {\n constructor(public readonly unit: IntervalUnit) {\n super();\n }\n public get typeId() { return Type.Interval as T; }\n public toString() { return `Interval<${IntervalUnit[this.unit]}>`; }\n protected static [Symbol.toStringTag] = ((proto: Interval_) => {\n ( proto).unit = null;\n ( proto).ArrayType = Int32Array;\n return proto[Symbol.toStringTag] = 'Interval';\n })(Interval_.prototype);\n}\n\nexport { Interval_ as Interval };\n\n/** @ignore */\nexport class IntervalDayTime extends Interval_ { constructor() { super(IntervalUnit.DAY_TIME); } }\n/** @ignore */\nexport class IntervalYearMonth extends Interval_ { constructor() { super(IntervalUnit.YEAR_MONTH); } }\n\n/** @ignore */\nexport interface List extends DataType { TArray: IterableArrayLike; TValue: V; }\n/** @ignore */\nexport class List extends DataType {\n constructor(child: Field) {\n super();\n this.children = [child];\n }\n public readonly children: Field[];\n public get typeId() { return Type.List as Type.List; }\n public toString() { return `List<${this.valueType}>`; }\n public get valueType(): T { return this.children[0].type as T; }\n public get valueField(): Field { return this.children[0] as Field; }\n public get ArrayType(): T['ArrayType'] { return this.valueType.ArrayType; }\n protected static [Symbol.toStringTag] = ((proto: List) => {\n ( proto).children = null;\n return proto[Symbol.toStringTag] = 'List';\n })(List.prototype);\n}\n\n/** @ignore */\nexport interface Struct extends DataType { TArray: IterableArrayLike>; TValue: RowLike; dataTypes: T; }\n/** @ignore */\nexport class Struct extends DataType {\n public readonly children: Field[];\n constructor(children: Field[]) {\n super();\n this.children = children;\n }\n public get typeId() { return Type.Struct as Type.Struct; }\n public toString() { return `Struct<{${this.children.map((f) => `${f.name}:${f.type}`).join(`, `)}}>`; }\n protected static [Symbol.toStringTag] = ((proto: Struct) => {\n ( proto).children = null;\n return proto[Symbol.toStringTag] = 'Struct';\n })(Struct.prototype);\n}\n\n/** @ignore */\ntype Unions = Type.Union | Type.DenseUnion | Type.SparseUnion;\n/** @ignore */\ninterface Union_ extends DataType { TArray: Int8Array; TValue: any; ArrayType: TypedArrayConstructor; }\n/** @ignore */\nclass Union_ extends DataType {\n public readonly mode: UnionMode;\n public readonly typeIds: Int32Array;\n public readonly children: Field[];\n public readonly typeIdToChildIndex: { [key: number]: number };\n constructor(mode: UnionMode,\n typeIds: number[] | Int32Array,\n children: Field[]) {\n super();\n this.mode = mode;\n this.children = children;\n this.typeIds = typeIds = Int32Array.from(typeIds);\n this.typeIdToChildIndex = typeIds.reduce((typeIdToChildIndex, typeId, idx) => {\n return (typeIdToChildIndex[typeId] = idx) && typeIdToChildIndex || typeIdToChildIndex;\n }, Object.create(null) as { [key: number]: number });\n }\n public get typeId() { return Type.Union as T; }\n public toString() { return `${this[Symbol.toStringTag]}<${\n this.children.map((x) => `${x.type}`).join(` | `)\n }>`; }\n protected static [Symbol.toStringTag] = ((proto: Union_) => {\n ( proto).mode = null;\n ( proto).typeIds = null;\n ( proto).children = null;\n ( proto).typeIdToChildIndex = null;\n ( proto).ArrayType = Int8Array;\n return proto[Symbol.toStringTag] = 'Union';\n })(Union_.prototype);\n}\n\nexport { Union_ as Union };\n\n/** @ignore */\nexport class DenseUnion extends Union_ {\n constructor(typeIds: number[] | Int32Array, children: Field[]) {\n super(UnionMode.Dense, typeIds, children);\n }\n}\n\n/** @ignore */\nexport class SparseUnion extends Union_ {\n constructor(typeIds: number[] | Int32Array, children: Field[]) {\n super(UnionMode.Sparse, typeIds, children);\n }\n}\n\n/** @ignore */\nexport interface FixedSizeBinary extends DataType { TArray: Uint8Array; TValue: Uint8Array; ArrayType: TypedArrayConstructor; }\n/** @ignore */\nexport class FixedSizeBinary extends DataType {\n constructor(public readonly byteWidth: number) {\n super();\n }\n public get typeId() { return Type.FixedSizeBinary as Type.FixedSizeBinary; }\n public toString() { return `FixedSizeBinary[${this.byteWidth}]`; }\n protected static [Symbol.toStringTag] = ((proto: FixedSizeBinary) => {\n ( proto).byteWidth = null;\n ( proto).ArrayType = Uint8Array;\n return proto[Symbol.toStringTag] = 'FixedSizeBinary';\n })(FixedSizeBinary.prototype);\n}\n\n/** @ignore */\nexport interface FixedSizeList extends DataType { TArray: IterableArrayLike; TValue: V; }\n/** @ignore */\nexport class FixedSizeList extends DataType {\n public readonly children: Field[];\n constructor(public readonly listSize: number, child: Field) {\n super();\n this.children = [child];\n }\n public get typeId() { return Type.FixedSizeList as Type.FixedSizeList; }\n public get valueType(): T { return this.children[0].type as T; }\n public get valueField(): Field { return this.children[0] as Field; }\n public get ArrayType(): T['ArrayType'] { return this.valueType.ArrayType; }\n public toString() { return `FixedSizeList[${this.listSize}]<${this.valueType}>`; }\n protected static [Symbol.toStringTag] = ((proto: FixedSizeList) => {\n ( proto).children = null;\n ( proto).listSize = null;\n return proto[Symbol.toStringTag] = 'FixedSizeList';\n })(FixedSizeList.prototype);\n}\n\n/** @ignore */\nexport interface Map_ extends DataType {\n TArray: IterableArrayLike>;\n TChild: Struct<{ key: TKey, value: TValue }>;\n TValue: MapLike;\n}\n\n/** @ignore */\nexport class Map_ extends DataType {\n constructor(child: Field>, keysSorted = false) {\n super();\n this.children = [child];\n this.keysSorted = keysSorted;\n }\n public readonly keysSorted: boolean;\n public readonly children: Field>[];\n public get typeId() { return Type.Map as Type.Map; }\n public get keyType(): TKey { return this.children[0].type.children[0].type as TKey; }\n public get valueType(): TValue { return this.children[0].type.children[1].type as TValue; }\n public toString() { return `Map<{${this.children[0].type.children.map((f) => `${f.name}:${f.type}`).join(`, `)}}>`; }\n protected static [Symbol.toStringTag] = ((proto: Map_) => {\n ( proto).children = null;\n ( proto).keysSorted = null;\n return proto[Symbol.toStringTag] = 'Map_';\n })(Map_.prototype);\n}\n\n/** @ignore */\nconst getId = ((atomicDictionaryId) => () => ++atomicDictionaryId)(-1);\n\n/** @ignore */\nexport type TKeys = Int8 | Int16 | Int32 | Uint8 | Uint16 | Uint32;\n\n/** @ignore */\nexport interface Dictionary extends DataType { TArray: TKey['TArray']; TValue: T['TValue']; }\n/** @ignore */\nexport class Dictionary extends DataType {\n public readonly id: number;\n public readonly indices: TKey;\n public readonly dictionary: T;\n public readonly isOrdered: boolean;\n constructor(dictionary: T, indices: TKey, id?: Long | number | null, isOrdered?: boolean | null) {\n super();\n this.indices = indices;\n this.dictionary = dictionary;\n this.isOrdered = isOrdered || false;\n this.id = id == null ? getId() : typeof id === 'number' ? id : id.low;\n }\n public get typeId() { return Type.Dictionary as Type.Dictionary; }\n public get children() { return this.dictionary.children; }\n public get valueType(): T { return this.dictionary as T; }\n public get ArrayType(): T['ArrayType'] { return this.dictionary.ArrayType; }\n public toString() { return `Dictionary<${this.indices}, ${this.dictionary}>`; }\n protected static [Symbol.toStringTag] = ((proto: Dictionary) => {\n ( proto).id = null;\n ( proto).indices = null;\n ( proto).isOrdered = null;\n ( proto).dictionary = null;\n return proto[Symbol.toStringTag] = 'Dictionary';\n })(Dictionary.prototype);\n}\n\n/** @ignore */\nexport interface IterableArrayLike extends ArrayLike, Iterable {}\n/** @ignore */\nexport type FloatArray = Uint16Array | Float32Array | Float64Array;\n/** @ignore */\nexport type IntArray = Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array;\n\n/** @ignore */\nexport function strideForType(type: DataType) {\n let t: any = type;\n switch (type.typeId) {\n case Type.Decimal: return 4;\n case Type.Timestamp: return 2;\n case Type.Date: return 1 + (t as Date_).unit;\n case Type.Interval: return 1 + (t as Interval_).unit;\n case Type.Int: return 1 + +((t as Int_).bitWidth > 32);\n case Type.Time: return 1 + +((t as Time_).bitWidth > 32);\n case Type.FixedSizeList: return (t as FixedSizeList).listSize;\n case Type.FixedSizeBinary: return (t as FixedSizeBinary).byteWidth;\n default: return 1;\n }\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/util/args.d.ts b/frontend/node_modules/apache-arrow/util/args.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..54dc33c8743dedf77a9d2dbbfe6c234d953f9f35 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/args.d.ts @@ -0,0 +1,20 @@ +import { Field } from '../schema'; +import { Column } from '../column'; +import { Vector } from '../vector'; +import { DataType } from '../type'; +/** @ignore */ +export declare const selectArgs: (Ctor: any, vals: any[]) => T[]; +/** @ignore */ +export declare const selectColumnArgs: ; +}>(args: any[]) => Column[]; +/** @ignore */ +export declare const selectFieldArgs: ; +}>(args: any[]) => [Field[], (T[keyof T] | Vector)[]]; +/** @ignore */ +export declare const selectChunkArgs: (Ctor: any, vals: any[]) => T[]; +/** @ignore */ +export declare const selectVectorChildrenArgs: >(Ctor: typeof import("../recordbatch").RecordBatch, vals: any[]) => T[]; +/** @ignore */ +export declare const selectColumnChildrenArgs: >(Ctor: typeof import("../recordbatch").RecordBatch, vals: any[]) => T[]; diff --git a/frontend/node_modules/apache-arrow/util/args.js b/frontend/node_modules/apache-arrow/util/args.js new file mode 100644 index 0000000000000000000000000000000000000000..e0c4c42cbcc1a76ba3423e4e5ba0b7cebd847734 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/args.js @@ -0,0 +1,157 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const data_1 = require("../data"); +const schema_1 = require("../schema"); +const column_1 = require("../column"); +const vector_1 = require("../vector"); +const type_1 = require("../type"); +const chunked_1 = require("../vector/chunked"); +const isArray = Array.isArray; +/** @ignore */ +exports.selectArgs = (Ctor, vals) => _selectArgs(Ctor, vals, [], 0); +/** @ignore */ +exports.selectColumnArgs = (args) => { + const [fields, values] = _selectFieldArgs(args, [[], []]); + return values.map((x, i) => x instanceof column_1.Column ? column_1.Column.new(x.field.clone(fields[i]), x) : + x instanceof vector_1.Vector ? column_1.Column.new(fields[i], x) : + column_1.Column.new(fields[i], [])); +}; +/** @ignore */ +exports.selectFieldArgs = (args) => _selectFieldArgs(args, [[], []]); +/** @ignore */ +exports.selectChunkArgs = (Ctor, vals) => _selectChunkArgs(Ctor, vals, [], 0); +/** @ignore */ +exports.selectVectorChildrenArgs = (Ctor, vals) => _selectVectorChildrenArgs(Ctor, vals, [], 0); +/** @ignore */ +exports.selectColumnChildrenArgs = (Ctor, vals) => _selectColumnChildrenArgs(Ctor, vals, [], 0); +/** @ignore */ +function _selectArgs(Ctor, vals, res, idx) { + let value, j = idx; + let i = -1, n = vals.length; + while (++i < n) { + if (isArray(value = vals[i])) { + j = _selectArgs(Ctor, value, res, j).length; + } + else if (value instanceof Ctor) { + res[j++] = value; + } + } + return res; +} +/** @ignore */ +function _selectChunkArgs(Ctor, vals, res, idx) { + let value, j = idx; + let i = -1, n = vals.length; + while (++i < n) { + if (isArray(value = vals[i])) { + j = _selectChunkArgs(Ctor, value, res, j).length; + } + else if (value instanceof chunked_1.Chunked) { + j = _selectChunkArgs(Ctor, value.chunks, res, j).length; + } + else if (value instanceof Ctor) { + res[j++] = value; + } + } + return res; +} +/** @ignore */ +function _selectVectorChildrenArgs(Ctor, vals, res, idx) { + let value, j = idx; + let i = -1, n = vals.length; + while (++i < n) { + if (isArray(value = vals[i])) { + j = _selectVectorChildrenArgs(Ctor, value, res, j).length; + } + else if (value instanceof Ctor) { + j = _selectArgs(vector_1.Vector, value.schema.fields.map((_, i) => value.getChildAt(i)), res, j).length; + } + else if (value instanceof vector_1.Vector) { + res[j++] = value; + } + } + return res; +} +/** @ignore */ +function _selectColumnChildrenArgs(Ctor, vals, res, idx) { + let value, j = idx; + let i = -1, n = vals.length; + while (++i < n) { + if (isArray(value = vals[i])) { + j = _selectColumnChildrenArgs(Ctor, value, res, j).length; + } + else if (value instanceof Ctor) { + j = _selectArgs(column_1.Column, value.schema.fields.map((f, i) => column_1.Column.new(f, value.getChildAt(i))), res, j).length; + } + else if (value instanceof column_1.Column) { + res[j++] = value; + } + } + return res; +} +/** @ignore */ +const toKeysAndValues = (xs, [k, v], i) => (xs[0][i] = k, xs[1][i] = v, xs); +/** @ignore */ +function _selectFieldArgs(vals, ret) { + let keys, n; + switch (n = vals.length) { + case 0: return ret; + case 1: + keys = ret[0]; + if (!(vals[0])) { + return ret; + } + if (isArray(vals[0])) { + return _selectFieldArgs(vals[0], ret); + } + if (!(vals[0] instanceof data_1.Data || vals[0] instanceof vector_1.Vector || vals[0] instanceof type_1.DataType)) { + [keys, vals] = Object.entries(vals[0]).reduce(toKeysAndValues, ret); + } + break; + default: + !isArray(keys = vals[n - 1]) + ? (vals = isArray(vals[0]) ? vals[0] : vals, keys = []) + : (vals = isArray(vals[0]) ? vals[0] : vals.slice(0, n - 1)); + } + let fieldIndex = -1; + let valueIndex = -1; + let idx = -1, len = vals.length; + let field; + let val; + let [fields, values] = ret; + while (++idx < len) { + val = vals[idx]; + if (val instanceof column_1.Column && (values[++valueIndex] = val)) { + fields[++fieldIndex] = val.field.clone(keys[idx], val.type, true); + } + else { + ({ [idx]: field = idx } = keys); + if (val instanceof type_1.DataType && (values[++valueIndex] = val)) { + fields[++fieldIndex] = schema_1.Field.new(field, val, true); + } + else if (val && val.type && (values[++valueIndex] = val)) { + val instanceof data_1.Data && (values[valueIndex] = val = vector_1.Vector.new(val)); + fields[++fieldIndex] = schema_1.Field.new(field, val.type, true); + } + } + } + return ret; +} + +//# sourceMappingURL=args.js.map diff --git a/frontend/node_modules/apache-arrow/util/args.js.map b/frontend/node_modules/apache-arrow/util/args.js.map new file mode 100644 index 0000000000000000000000000000000000000000..0b2e9881010aada399362c36b269497acacb53e0 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/args.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["util/args.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,kCAA+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cesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Field } from '../schema';\nimport { Column } from '../column';\nimport { Vector } from '../vector';\nimport { DataType } from '../type';\nimport { Chunked } from '../vector/chunked';\n\ntype RecordBatchCtor = typeof import('../recordbatch').RecordBatch;\n\nconst isArray = Array.isArray;\n\n/** @ignore */\nexport const selectArgs = (Ctor: any, vals: any[]) => _selectArgs(Ctor, vals, [], 0) as T[];\n/** @ignore */\nexport const selectColumnArgs = (args: any[]) => {\n const [fields, values] = _selectFieldArgs(args, [[], []]);\n return values.map((x, i) =>\n x instanceof Column ? Column.new(x.field.clone(fields[i]), x) :\n x instanceof Vector ? Column.new(fields[i], x) as Column :\n Column.new(fields[i], [] as Vector[]));\n};\n\n/** @ignore */\nexport const selectFieldArgs = (args: any[]) => _selectFieldArgs(args, [[], []]);\n/** @ignore */\nexport const selectChunkArgs = (Ctor: any, vals: any[]) => _selectChunkArgs(Ctor, vals, [], 0) as T[];\n/** @ignore */\nexport const selectVectorChildrenArgs = (Ctor: RecordBatchCtor, vals: any[]) => _selectVectorChildrenArgs(Ctor, vals, [], 0) as T[];\n/** @ignore */\nexport const selectColumnChildrenArgs = (Ctor: RecordBatchCtor, vals: any[]) => _selectColumnChildrenArgs(Ctor, vals, [], 0) as T[];\n\n/** @ignore */\nfunction _selectArgs(Ctor: any, vals: any[], res: T[], idx: number) {\n let value: any, j = idx;\n let i = -1, n = vals.length;\n while (++i < n) {\n if (isArray(value = vals[i])) {\n j = _selectArgs(Ctor, value, res, j).length;\n } else if (value instanceof Ctor) { res[j++] = value; }\n }\n return res;\n}\n\n/** @ignore */\nfunction _selectChunkArgs(Ctor: any, vals: any[], res: T[], idx: number) {\n let value: any, j = idx;\n let i = -1, n = vals.length;\n while (++i < n) {\n if (isArray(value = vals[i])) {\n j = _selectChunkArgs(Ctor, value, res, j).length;\n } else if (value instanceof Chunked) {\n j = _selectChunkArgs(Ctor, value.chunks, res, j).length;\n } else if (value instanceof Ctor) { res[j++] = value; }\n }\n return res;\n}\n\n/** @ignore */\nfunction _selectVectorChildrenArgs(Ctor: RecordBatchCtor, vals: any[], res: T[], idx: number) {\n let value: any, j = idx;\n let i = -1, n = vals.length;\n while (++i < n) {\n if (isArray(value = vals[i])) {\n j = _selectVectorChildrenArgs(Ctor, value, res, j).length;\n } else if (value instanceof Ctor) {\n j = _selectArgs(Vector, value.schema.fields.map((_, i) => value.getChildAt(i)!), res, j).length;\n } else if (value instanceof Vector) { res[j++] = value as T; }\n }\n return res;\n}\n\n/** @ignore */\nfunction _selectColumnChildrenArgs(Ctor: RecordBatchCtor, vals: any[], res: T[], idx: number) {\n let value: any, j = idx;\n let i = -1, n = vals.length;\n while (++i < n) {\n if (isArray(value = vals[i])) {\n j = _selectColumnChildrenArgs(Ctor, value, res, j).length;\n } else if (value instanceof Ctor) {\n j = _selectArgs(Column, value.schema.fields.map((f, i) => Column.new(f, value.getChildAt(i)!)), res, j).length;\n } else if (value instanceof Column) { res[j++] = value as T; }\n }\n return res;\n}\n\n/** @ignore */\nconst toKeysAndValues = (xs: [any[], any[]], [k, v]: [any, any], i: number) => (xs[0][i] = k, xs[1][i] = v, xs);\n\n/** @ignore */\nfunction _selectFieldArgs(vals: any[], ret: [Field[], Vector[]]): [Field[], (T[keyof T] | Vector)[]] {\n let keys: any[], n: number;\n switch (n = vals.length) {\n case 0: return ret;\n case 1:\n keys = ret[0];\n if (!(vals[0])) { return ret; }\n if (isArray(vals[0])) { return _selectFieldArgs(vals[0], ret); }\n if (!(vals[0] instanceof Data || vals[0] instanceof Vector || vals[0] instanceof DataType)) {\n [keys, vals] = Object.entries(vals[0]).reduce(toKeysAndValues, ret);\n }\n break;\n default:\n !isArray(keys = vals[n - 1])\n ? (vals = isArray(vals[0]) ? vals[0] : vals, keys = [])\n : (vals = isArray(vals[0]) ? vals[0] : vals.slice(0, n - 1));\n }\n\n let fieldIndex = -1;\n let valueIndex = -1;\n let idx = -1, len = vals.length;\n let field: number | string | Field;\n let val: Vector | Data;\n let [fields, values] = ret as [Field[], any[]];\n\n while (++idx < len) {\n val = vals[idx];\n if (val instanceof Column && (values[++valueIndex] = val)) {\n fields[++fieldIndex] = val.field.clone(keys[idx], val.type, true);\n } else {\n ({ [idx]: field = idx } = keys);\n if (val instanceof DataType && (values[++valueIndex] = val)) {\n fields[++fieldIndex] = Field.new(field, val as DataType, true) as Field;\n } else if (val && val.type && (values[++valueIndex] = val)) {\n val instanceof Data && (values[valueIndex] = val = Vector.new(val) as Vector);\n fields[++fieldIndex] = Field.new(field, val.type, true) as Field;\n }\n }\n }\n return ret;\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/util/args.mjs b/frontend/node_modules/apache-arrow/util/args.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b6dc621ed75c009c5ce15bd435a83417919b4b52 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/args.mjs @@ -0,0 +1,155 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { Data } from '../data'; +import { Field } from '../schema'; +import { Column } from '../column'; +import { Vector } from '../vector'; +import { DataType } from '../type'; +import { Chunked } from '../vector/chunked'; +const isArray = Array.isArray; +/** @ignore */ +export const selectArgs = (Ctor, vals) => _selectArgs(Ctor, vals, [], 0); +/** @ignore */ +export const selectColumnArgs = (args) => { + const [fields, values] = _selectFieldArgs(args, [[], []]); + return values.map((x, i) => x instanceof Column ? Column.new(x.field.clone(fields[i]), x) : + x instanceof Vector ? Column.new(fields[i], x) : + Column.new(fields[i], [])); +}; +/** @ignore */ +export const selectFieldArgs = (args) => _selectFieldArgs(args, [[], []]); +/** @ignore */ +export const selectChunkArgs = (Ctor, vals) => _selectChunkArgs(Ctor, vals, [], 0); +/** @ignore */ +export const selectVectorChildrenArgs = (Ctor, vals) => _selectVectorChildrenArgs(Ctor, vals, [], 0); +/** @ignore */ +export const selectColumnChildrenArgs = (Ctor, vals) => _selectColumnChildrenArgs(Ctor, vals, [], 0); +/** @ignore */ +function _selectArgs(Ctor, vals, res, idx) { + let value, j = idx; + let i = -1, n = vals.length; + while (++i < n) { + if (isArray(value = vals[i])) { + j = _selectArgs(Ctor, value, res, j).length; + } + else if (value instanceof Ctor) { + res[j++] = value; + } + } + return res; +} +/** @ignore */ +function _selectChunkArgs(Ctor, vals, res, idx) { + let value, j = idx; + let i = -1, n = vals.length; + while (++i < n) { + if (isArray(value = vals[i])) { + j = _selectChunkArgs(Ctor, value, res, j).length; + } + else if (value instanceof Chunked) { + j = _selectChunkArgs(Ctor, value.chunks, res, j).length; + } + else if (value instanceof Ctor) { + res[j++] = value; + } + } + return res; +} +/** @ignore */ +function _selectVectorChildrenArgs(Ctor, vals, res, idx) { + let value, j = idx; + let i = -1, n = vals.length; + while (++i < n) { + if (isArray(value = vals[i])) { + j = _selectVectorChildrenArgs(Ctor, value, res, j).length; + } + else if (value instanceof Ctor) { + j = _selectArgs(Vector, value.schema.fields.map((_, i) => value.getChildAt(i)), res, j).length; + } + else if (value instanceof Vector) { + res[j++] = value; + } + } + return res; +} +/** @ignore */ +function _selectColumnChildrenArgs(Ctor, vals, res, idx) { + let value, j = idx; + let i = -1, n = vals.length; + while (++i < n) { + if (isArray(value = vals[i])) { + j = _selectColumnChildrenArgs(Ctor, value, res, j).length; + } + else if (value instanceof Ctor) { + j = _selectArgs(Column, value.schema.fields.map((f, i) => Column.new(f, value.getChildAt(i))), res, j).length; + } + else if (value instanceof Column) { + res[j++] = value; + } + } + return res; +} +/** @ignore */ +const toKeysAndValues = (xs, [k, v], i) => (xs[0][i] = k, xs[1][i] = v, xs); +/** @ignore */ +function _selectFieldArgs(vals, ret) { + let keys, n; + switch (n = vals.length) { + case 0: return ret; + case 1: + keys = ret[0]; + if (!(vals[0])) { + return ret; + } + if (isArray(vals[0])) { + return _selectFieldArgs(vals[0], ret); + } + if (!(vals[0] instanceof Data || vals[0] instanceof Vector || vals[0] instanceof DataType)) { + [keys, vals] = Object.entries(vals[0]).reduce(toKeysAndValues, ret); + } + break; + default: + !isArray(keys = vals[n - 1]) + ? (vals = isArray(vals[0]) ? vals[0] : vals, keys = []) + : (vals = isArray(vals[0]) ? vals[0] : vals.slice(0, n - 1)); + } + let fieldIndex = -1; + let valueIndex = -1; + let idx = -1, len = vals.length; + let field; + let val; + let [fields, values] = ret; + while (++idx < len) { + val = vals[idx]; + if (val instanceof Column && (values[++valueIndex] = val)) { + fields[++fieldIndex] = val.field.clone(keys[idx], val.type, true); + } + else { + ({ [idx]: field = idx } = keys); + if (val instanceof DataType && (values[++valueIndex] = val)) { + fields[++fieldIndex] = Field.new(field, val, true); + } + else if (val && val.type && (values[++valueIndex] = val)) { + val instanceof Data && (values[valueIndex] = val = Vector.new(val)); + fields[++fieldIndex] = Field.new(field, val.type, true); + } + } + } + return ret; +} + +//# sourceMappingURL=args.mjs.map diff --git a/frontend/node_modules/apache-arrow/util/args.mjs.map b/frontend/node_modules/apache-arrow/util/args.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..d1993f78de9b45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CAAC;YAChC,IAAI,GAAG,YAAY,QAAQ,IAAI,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG,GAAG,CAAC,EAAE;gBACzD,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,GAAe,EAAE,IAAI,CAAsB,CAAC;aACvF;iBAAM,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG,GAAG,CAAC,EAAE;gBACxD,GAAG,YAAY,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAW,CAAC,CAAC;gBAC9E,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,IAAI,CAAsB,CAAC;aAChF;SACJ;KACJ;IACD,OAAO,GAAG,CAAC;AACf,CAAC","file":"args.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Field } from '../schema';\nimport { Column } from '../column';\nimport { Vector } from '../vector';\nimport { DataType } from '../type';\nimport { Chunked } from '../vector/chunked';\n\ntype RecordBatchCtor = typeof import('../recordbatch').RecordBatch;\n\nconst isArray = Array.isArray;\n\n/** @ignore */\nexport const selectArgs = (Ctor: any, vals: any[]) => _selectArgs(Ctor, vals, [], 0) as T[];\n/** @ignore */\nexport const selectColumnArgs = (args: any[]) => {\n const [fields, values] = _selectFieldArgs(args, [[], []]);\n return values.map((x, i) =>\n x instanceof Column ? Column.new(x.field.clone(fields[i]), x) :\n x instanceof Vector ? Column.new(fields[i], x) as Column :\n Column.new(fields[i], [] as Vector[]));\n};\n\n/** @ignore */\nexport const selectFieldArgs = (args: any[]) => _selectFieldArgs(args, [[], []]);\n/** @ignore */\nexport const selectChunkArgs = (Ctor: any, vals: any[]) => _selectChunkArgs(Ctor, vals, [], 0) as T[];\n/** @ignore */\nexport const selectVectorChildrenArgs = (Ctor: RecordBatchCtor, vals: any[]) => _selectVectorChildrenArgs(Ctor, vals, [], 0) as T[];\n/** @ignore */\nexport const selectColumnChildrenArgs = (Ctor: RecordBatchCtor, vals: any[]) => _selectColumnChildrenArgs(Ctor, vals, [], 0) as T[];\n\n/** @ignore */\nfunction _selectArgs(Ctor: any, vals: any[], res: T[], idx: number) {\n let value: any, j = idx;\n let i = -1, n = vals.length;\n while (++i < n) {\n if (isArray(value = vals[i])) {\n j = _selectArgs(Ctor, value, res, j).length;\n } else if (value instanceof Ctor) { res[j++] = value; }\n }\n return res;\n}\n\n/** @ignore */\nfunction _selectChunkArgs(Ctor: any, vals: any[], res: T[], idx: number) {\n let value: any, j = idx;\n let i = -1, n = vals.length;\n while (++i < n) {\n if (isArray(value = vals[i])) {\n j = _selectChunkArgs(Ctor, value, res, j).length;\n } else if (value instanceof Chunked) {\n j = _selectChunkArgs(Ctor, value.chunks, res, j).length;\n } else if (value instanceof Ctor) { res[j++] = value; }\n }\n return res;\n}\n\n/** @ignore */\nfunction _selectVectorChildrenArgs(Ctor: RecordBatchCtor, vals: any[], res: T[], idx: number) {\n let value: any, j = idx;\n let i = -1, n = vals.length;\n while (++i < n) {\n if (isArray(value = vals[i])) {\n j = _selectVectorChildrenArgs(Ctor, value, res, j).length;\n } else if (value instanceof Ctor) {\n j = _selectArgs(Vector, value.schema.fields.map((_, i) => value.getChildAt(i)!), res, j).length;\n } else if (value instanceof Vector) { res[j++] = value as T; }\n }\n return res;\n}\n\n/** @ignore */\nfunction _selectColumnChildrenArgs(Ctor: RecordBatchCtor, vals: any[], res: T[], idx: number) {\n let value: any, j = idx;\n let i = -1, n = vals.length;\n while (++i < n) {\n if (isArray(value = vals[i])) {\n j = _selectColumnChildrenArgs(Ctor, value, res, j).length;\n } else if (value instanceof Ctor) {\n j = _selectArgs(Column, value.schema.fields.map((f, i) => Column.new(f, value.getChildAt(i)!)), res, j).length;\n } else if (value instanceof Column) { res[j++] = value as T; }\n }\n return res;\n}\n\n/** @ignore */\nconst toKeysAndValues = (xs: [any[], any[]], [k, v]: [any, any], i: number) => (xs[0][i] = k, xs[1][i] = v, xs);\n\n/** @ignore */\nfunction _selectFieldArgs(vals: any[], ret: [Field[], Vector[]]): [Field[], (T[keyof T] | Vector)[]] {\n let keys: any[], n: number;\n switch (n = vals.length) {\n case 0: return ret;\n case 1:\n keys = ret[0];\n if (!(vals[0])) { return ret; }\n if (isArray(vals[0])) { return _selectFieldArgs(vals[0], ret); }\n if (!(vals[0] instanceof Data || vals[0] instanceof Vector || vals[0] instanceof DataType)) {\n [keys, vals] = Object.entries(vals[0]).reduce(toKeysAndValues, ret);\n }\n break;\n default:\n !isArray(keys = vals[n - 1])\n ? (vals = isArray(vals[0]) ? vals[0] : vals, keys = [])\n : (vals = isArray(vals[0]) ? vals[0] : vals.slice(0, n - 1));\n }\n\n let fieldIndex = -1;\n let valueIndex = -1;\n let idx = -1, len = vals.length;\n let field: number | string | Field;\n let val: Vector | Data;\n let [fields, values] = ret as [Field[], any[]];\n\n while (++idx < len) {\n val = vals[idx];\n if (val instanceof Column && (values[++valueIndex] = val)) {\n fields[++fieldIndex] = val.field.clone(keys[idx], val.type, true);\n } else {\n ({ [idx]: field = idx } = keys);\n if (val instanceof DataType && (values[++valueIndex] = val)) {\n fields[++fieldIndex] = Field.new(field, val as DataType, true) as Field;\n } else if (val && val.type && (values[++valueIndex] = val)) {\n val instanceof Data && (values[valueIndex] = val = Vector.new(val) as Vector);\n fields[++fieldIndex] = Field.new(field, val.type, true) as Field;\n }\n }\n }\n return ret;\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/util/bit.d.ts b/frontend/node_modules/apache-arrow/util/bit.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..df7d4d66d42f1d721b23ca8d86db0d4b6dd5c90d --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/bit.d.ts @@ -0,0 +1,24 @@ +/** @ignore */ +export declare function getBool(_data: any, _index: number, byte: number, bit: number): boolean; +/** @ignore */ +export declare function getBit(_data: any, _index: number, byte: number, bit: number): 0 | 1; +/** @ignore */ +export declare function setBool(bytes: Uint8Array, index: number, value: any): boolean; +/** @ignore */ +export declare function truncateBitmap(offset: number, length: number, bitmap: Uint8Array): Uint8Array; +/** @ignore */ +export declare function packBools(values: Iterable): Uint8Array; +/** @ignore */ +export declare function iterateBits(bytes: Uint8Array, begin: number, length: number, context: any, get: (context: any, index: number, byte: number, bit: number) => T): IterableIterator; +/** + * Compute the population count (the number of bits set to 1) for a range of bits in a Uint8Array. + * @param vector The Uint8Array of bits for which to compute the population count. + * @param lhs The range's left-hand side (or start) bit + * @param rhs The range's right-hand side (or end) bit + */ +/** @ignore */ +export declare function popcnt_bit_range(data: Uint8Array, lhs: number, rhs: number): number; +/** @ignore */ +export declare function popcnt_array(arr: ArrayBufferView, byteOffset?: number, byteLength?: number): number; +/** @ignore */ +export declare function popcnt_uint32(uint32: number): number; diff --git a/frontend/node_modules/apache-arrow/util/bit.js b/frontend/node_modules/apache-arrow/util/bit.js new file mode 100644 index 0000000000000000000000000000000000000000..129f4a41b6ae041de69e9ee839fa7c4dd3087d93 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/bit.js @@ -0,0 +1,143 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +/** @ignore */ +function getBool(_data, _index, byte, bit) { + return (byte & 1 << bit) !== 0; +} +exports.getBool = getBool; +/** @ignore */ +function getBit(_data, _index, byte, bit) { + return (byte & 1 << bit) >> bit; +} +exports.getBit = getBit; +/** @ignore */ +function setBool(bytes, index, value) { + return value ? + !!(bytes[index >> 3] |= (1 << (index % 8))) || true : + !(bytes[index >> 3] &= ~(1 << (index % 8))) && false; +} +exports.setBool = setBool; +/** @ignore */ +function truncateBitmap(offset, length, bitmap) { + const alignedSize = (bitmap.byteLength + 7) & ~7; + if (offset > 0 || bitmap.byteLength < alignedSize) { + const bytes = new Uint8Array(alignedSize); + // If the offset is a multiple of 8 bits, it's safe to slice the bitmap + bytes.set(offset % 8 === 0 ? bitmap.subarray(offset >> 3) : + // Otherwise iterate each bit from the offset and return a new one + packBools(iterateBits(bitmap, offset, length, null, getBool)).subarray(0, alignedSize)); + return bytes; + } + return bitmap; +} +exports.truncateBitmap = truncateBitmap; +/** @ignore */ +function packBools(values) { + let xs = []; + let i = 0, bit = 0, byte = 0; + for (const value of values) { + value && (byte |= 1 << bit); + if (++bit === 8) { + xs[i++] = byte; + byte = bit = 0; + } + } + if (i === 0 || bit > 0) { + xs[i++] = byte; + } + let b = new Uint8Array((xs.length + 7) & ~7); + b.set(xs); + return b; +} +exports.packBools = packBools; +/** @ignore */ +function* iterateBits(bytes, begin, length, context, get) { + let bit = begin % 8; + let byteIndex = begin >> 3; + let index = 0, remaining = length; + for (; remaining > 0; bit = 0) { + let byte = bytes[byteIndex++]; + do { + yield get(context, index++, byte, bit); + } while (--remaining > 0 && ++bit < 8); + } +} +exports.iterateBits = iterateBits; +/** + * Compute the population count (the number of bits set to 1) for a range of bits in a Uint8Array. + * @param vector The Uint8Array of bits for which to compute the population count. + * @param lhs The range's left-hand side (or start) bit + * @param rhs The range's right-hand side (or end) bit + */ +/** @ignore */ +function popcnt_bit_range(data, lhs, rhs) { + if (rhs - lhs <= 0) { + return 0; + } + // If the bit range is less than one byte, sum the 1 bits in the bit range + if (rhs - lhs < 8) { + let sum = 0; + for (const bit of iterateBits(data, lhs, rhs - lhs, data, getBit)) { + sum += bit; + } + return sum; + } + // Get the next lowest multiple of 8 from the right hand side + const rhsInside = rhs >> 3 << 3; + // Get the next highest multiple of 8 from the left hand side + const lhsInside = lhs + (lhs % 8 === 0 ? 0 : 8 - lhs % 8); + return ( + // Get the popcnt of bits between the left hand side, and the next highest multiple of 8 + popcnt_bit_range(data, lhs, lhsInside) + + // Get the popcnt of bits between the right hand side, and the next lowest multiple of 8 + popcnt_bit_range(data, rhsInside, rhs) + + // Get the popcnt of all bits between the left and right hand sides' multiples of 8 + popcnt_array(data, lhsInside >> 3, (rhsInside - lhsInside) >> 3)); +} +exports.popcnt_bit_range = popcnt_bit_range; +/** @ignore */ +function popcnt_array(arr, byteOffset, byteLength) { + let cnt = 0, pos = byteOffset | 0; + const view = new DataView(arr.buffer, arr.byteOffset, arr.byteLength); + const len = byteLength === void 0 ? arr.byteLength : pos + byteLength; + while (len - pos >= 4) { + cnt += popcnt_uint32(view.getUint32(pos)); + pos += 4; + } + while (len - pos >= 2) { + cnt += popcnt_uint32(view.getUint16(pos)); + pos += 2; + } + while (len - pos >= 1) { + cnt += popcnt_uint32(view.getUint8(pos)); + pos += 1; + } + return cnt; +} +exports.popcnt_array = popcnt_array; +/** @ignore */ +function popcnt_uint32(uint32) { + let i = uint32 | 0; + i = i - ((i >>> 1) & 0x55555555); + i = (i & 0x33333333) + ((i >>> 2) & 0x33333333); + return (((i + (i >>> 4)) & 0x0F0F0F0F) * 0x01010101) >>> 24; +} +exports.popcnt_uint32 = popcnt_uint32; + +//# sourceMappingURL=bit.js.map diff --git a/frontend/node_modules/apache-arrow/util/bit.js.map b/frontend/node_modules/apache-arrow/util/bit.js.map new file mode 100644 index 0000000000000000000000000000000000000000..475952e24d13a6669d62948885362bd5201f66e7 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/bit.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["util/bit.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,cAAc;AACd,SAAgB,OAAO,CAAC,KAAU,EAAE,MAAc,EAAE,IAAY,EAAE,GAAW;IACzE,OAAO,CAAC,IAAI,GAAG,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;AACnC,CAAC;AAFD,0BAEC;AAED,cAAc;AACd,SAAgB,MAAM,CAAC,KAAU,EAAE,MAAc,EAAE,IAAY,EAAE,GAAW;IACxE,OAAO,CAAC,IAAI,GAAG,CAAC,IAAI,GAAG,CAAC,IAAI,GAAc,CAAC;AAC/C,CAAC;AAFD,wBAEC;AAED,cAAc;AACd,SAAgB,OAAO,CAAC,KAAiB,EAAE,KAAa,EAAE,KAAU;IAChE,OAAO,KAAK,CAAC,CAAC;QACV,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,CAAC,IAAK,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC;QACtD,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK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AAC,EAAE;QACnB,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QAC1C,GAAG,IAAI,CAAC,CAAC;KACZ;IACD,OAAO,GAAG,GAAG,GAAG,IAAI,CAAC,EAAE;QACnB,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;QACzC,GAAG,IAAI,CAAC,CAAC;KACZ;IACD,OAAO,GAAG,CAAC;AACf,CAAC;AAjBD,oCAiBC;AAED,cAAc;AACd,SAAgB,aAAa,CAAC,MAAc;IACxC,IAAI,CAAC,GAAG,MAAM,GAAG,CAAC,CAAC;IACnB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC;IACjC,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC;IAChD,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,GAAG,UAAU,CAAC,KAAK,EAAE,CAAC;AAChE,CAAC;AALD,sCAKC","file":"bit.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n/** @ignore */\nexport function getBool(_data: any, _index: number, byte: number, bit: number) {\n return (byte & 1 << bit) !== 0;\n}\n\n/** @ignore */\nexport function getBit(_data: any, _index: number, byte: number, bit: number): 0 | 1 {\n return (byte & 1 << bit) >> bit as (0 | 1);\n}\n\n/** @ignore */\nexport function setBool(bytes: Uint8Array, index: number, value: any) {\n return value ?\n !!(bytes[index >> 3] |= (1 << (index % 8))) || true :\n !(bytes[index >> 3] &= ~(1 << (index % 8))) && false ;\n}\n\n/** @ignore */\nexport function truncateBitmap(offset: number, length: number, bitmap: Uint8Array) {\n const alignedSize = (bitmap.byteLength + 7) & ~7;\n if (offset > 0 || bitmap.byteLength < alignedSize) {\n const bytes = new Uint8Array(alignedSize);\n // If the offset is a multiple of 8 bits, it's safe to slice the bitmap\n bytes.set(offset % 8 === 0 ? bitmap.subarray(offset >> 3) :\n // Otherwise iterate each bit from the offset and return a new one\n packBools(iterateBits(bitmap, offset, length, null, getBool)).subarray(0, alignedSize));\n return bytes;\n }\n return bitmap;\n}\n\n/** @ignore */\nexport function packBools(values: Iterable) {\n let xs: number[] = [];\n let i = 0, bit = 0, byte = 0;\n for (const value of values) {\n value && (byte |= 1 << bit);\n if (++bit === 8) {\n xs[i++] = byte;\n byte = bit = 0;\n }\n }\n if (i === 0 || bit > 0) { xs[i++] = byte; }\n let b = new Uint8Array((xs.length + 7) & ~7);\n b.set(xs);\n return b;\n}\n\n/** @ignore */\nexport function* iterateBits(bytes: Uint8Array, begin: number, length: number, context: any,\n get: (context: any, index: number, byte: number, bit: number) => T) {\n let bit = begin % 8;\n let byteIndex = begin >> 3;\n let index = 0, remaining = length;\n for (; remaining > 0; bit = 0) {\n let byte = bytes[byteIndex++];\n do {\n yield get(context, index++, byte, bit);\n } while (--remaining > 0 && ++bit < 8);\n }\n}\n\n/**\n * Compute the population count (the number of bits set to 1) for a range of bits in a Uint8Array.\n * @param vector The Uint8Array of bits for which to compute the population count.\n * @param lhs The range's left-hand side (or start) bit\n * @param rhs The range's right-hand side (or end) bit\n */\n/** @ignore */\nexport function popcnt_bit_range(data: Uint8Array, lhs: number, rhs: number): number {\n if (rhs - lhs <= 0) { return 0; }\n // If the bit range is less than one byte, sum the 1 bits in the bit range\n if (rhs - lhs < 8) {\n let sum = 0;\n for (const bit of iterateBits(data, lhs, rhs - lhs, data, getBit)) {\n sum += bit;\n }\n return sum;\n }\n // Get the next lowest multiple of 8 from the right hand side\n const rhsInside = rhs >> 3 << 3;\n // Get the next highest multiple of 8 from the left hand side\n const lhsInside = lhs + (lhs % 8 === 0 ? 0 : 8 - lhs % 8);\n return (\n // Get the popcnt of bits between the left hand side, and the next highest multiple of 8\n popcnt_bit_range(data, lhs, lhsInside) +\n // Get the popcnt of bits between the right hand side, and the next lowest multiple of 8\n popcnt_bit_range(data, rhsInside, rhs) +\n // Get the popcnt of all bits between the left and right hand sides' multiples of 8\n popcnt_array(data, lhsInside >> 3, (rhsInside - lhsInside) >> 3)\n );\n}\n\n/** @ignore */\nexport function popcnt_array(arr: ArrayBufferView, byteOffset?: number, byteLength?: number) {\n let cnt = 0, pos = byteOffset! | 0;\n const view = new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n const len = byteLength === void 0 ? arr.byteLength : pos + byteLength;\n while (len - pos >= 4) {\n cnt += popcnt_uint32(view.getUint32(pos));\n pos += 4;\n }\n while (len - pos >= 2) {\n cnt += popcnt_uint32(view.getUint16(pos));\n pos += 2;\n }\n while (len - pos >= 1) {\n cnt += popcnt_uint32(view.getUint8(pos));\n pos += 1;\n }\n return cnt;\n}\n\n/** @ignore */\nexport function popcnt_uint32(uint32: number): number {\n let i = uint32 | 0;\n i = i - ((i >>> 1) & 0x55555555);\n i = (i & 0x33333333) + ((i >>> 2) & 0x33333333);\n return (((i + (i >>> 4)) & 0x0F0F0F0F) * 0x01010101) >>> 24;\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/util/bit.mjs b/frontend/node_modules/apache-arrow/util/bit.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b847016d3cedbf4567edf980d1858b0a59ec76bf --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/bit.mjs @@ -0,0 +1,132 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +/** @ignore */ +export function getBool(_data, _index, byte, bit) { + return (byte & 1 << bit) !== 0; +} +/** @ignore */ +export function getBit(_data, _index, byte, bit) { + return (byte & 1 << bit) >> bit; +} +/** @ignore */ +export function setBool(bytes, index, value) { + return value ? + !!(bytes[index >> 3] |= (1 << (index % 8))) || true : + !(bytes[index >> 3] &= ~(1 << (index % 8))) && false; +} +/** @ignore */ +export function truncateBitmap(offset, length, bitmap) { + const alignedSize = (bitmap.byteLength + 7) & ~7; + if (offset > 0 || bitmap.byteLength < alignedSize) { + const bytes = new Uint8Array(alignedSize); + // If the offset is a multiple of 8 bits, it's safe to slice the bitmap + bytes.set(offset % 8 === 0 ? bitmap.subarray(offset >> 3) : + // Otherwise iterate each bit from the offset and return a new one + packBools(iterateBits(bitmap, offset, length, null, getBool)).subarray(0, alignedSize)); + return bytes; + } + return bitmap; +} +/** @ignore */ +export function packBools(values) { + let xs = []; + let i = 0, bit = 0, byte = 0; + for (const value of values) { + value && (byte |= 1 << bit); + if (++bit === 8) { + xs[i++] = byte; + byte = bit = 0; + } + } + if (i === 0 || bit > 0) { + xs[i++] = byte; + } + let b = new Uint8Array((xs.length + 7) & ~7); + b.set(xs); + return b; +} +/** @ignore */ +export function* iterateBits(bytes, begin, length, context, get) { + let bit = begin % 8; + let byteIndex = begin >> 3; + let index = 0, remaining = length; + for (; remaining > 0; bit = 0) { + let byte = bytes[byteIndex++]; + do { + yield get(context, index++, byte, bit); + } while (--remaining > 0 && ++bit < 8); + } +} +/** + * Compute the population count (the number of bits set to 1) for a range of bits in a Uint8Array. + * @param vector The Uint8Array of bits for which to compute the population count. + * @param lhs The range's left-hand side (or start) bit + * @param rhs The range's right-hand side (or end) bit + */ +/** @ignore */ +export function popcnt_bit_range(data, lhs, rhs) { + if (rhs - lhs <= 0) { + return 0; + } + // If the bit range is less than one byte, sum the 1 bits in the bit range + if (rhs - lhs < 8) { + let sum = 0; + for (const bit of iterateBits(data, lhs, rhs - lhs, data, getBit)) { + sum += bit; + } + return sum; + } + // Get the next lowest multiple of 8 from the right hand side + const rhsInside = rhs >> 3 << 3; + // Get the next highest multiple of 8 from the left hand side + const lhsInside = lhs + (lhs % 8 === 0 ? 0 : 8 - lhs % 8); + return ( + // Get the popcnt of bits between the left hand side, and the next highest multiple of 8 + popcnt_bit_range(data, lhs, lhsInside) + + // Get the popcnt of bits between the right hand side, and the next lowest multiple of 8 + popcnt_bit_range(data, rhsInside, rhs) + + // Get the popcnt of all bits between the left and right hand sides' multiples of 8 + popcnt_array(data, lhsInside >> 3, (rhsInside - lhsInside) >> 3)); +} +/** @ignore */ +export function popcnt_array(arr, byteOffset, byteLength) { + let cnt = 0, pos = byteOffset | 0; + const view = new DataView(arr.buffer, arr.byteOffset, arr.byteLength); + const len = byteLength === void 0 ? arr.byteLength : pos + byteLength; + while (len - pos >= 4) { + cnt += popcnt_uint32(view.getUint32(pos)); + pos += 4; + } + while (len - pos >= 2) { + cnt += popcnt_uint32(view.getUint16(pos)); + pos += 2; + } + while (len - pos >= 1) { + cnt += popcnt_uint32(view.getUint8(pos)); + pos += 1; + } + return cnt; +} +/** @ignore */ +export function popcnt_uint32(uint32) { + let i = uint32 | 0; + i = i - ((i >>> 1) & 0x55555555); + i = (i & 0x33333333) + ((i >>> 2) & 0x33333333); + return (((i + (i >>> 4)) & 0x0F0F0F0F) * 0x01010101) >>> 24; +} + +//# sourceMappingURL=bit.mjs.map diff --git a/frontend/node_modules/apache-arrow/util/bit.mjs.map b/frontend/node_modules/apache-arrow/util/bit.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..40a527292d64c44bdd03fbafc0d4cf39b90e0af4 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/bit.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["util/bit.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,cAAc;AACd,MAAM,UAAU,OAAO,CAAC,KAAU,EAAE,MAAc,EAAE,IAAY,EAAE,GAAW;IACzE,OAAO,CAAC,IAAI,GAAG,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;AACnC,CAAC;AAED,cAAc;AACd,MAAM,UAAU,MAAM,CAAC,KAAU,EAAE,MAAc,EAAE,IAAY,EAAE,GAAW;IACxE,OAAO,CAAC,IAAI,GAAG,CAAC,IAAI,GAAG,CAAC,IAAI,GAAc,CAAC;AAC/C,CAAC;AAED,cAAc;AACd,MAAM,UAAU,OAAO,CAAC,KAAiB,EAAE,KAAa,EAAE,KAAU;IAChE,OAAO,KAAK,CAAC,CAAC;QACV,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,CAAC,IAAK,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC;QACtD,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAE;AAC9D,CAAC;AAED,cAAc;AACd,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ACZ;IACD,OAAO,GAAG,GAAG,GAAG,IAAI,CAAC,EAAE;QACnB,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;QACzC,GAAG,IAAI,CAAC,CAAC;KACZ;IACD,OAAO,GAAG,CAAC;AACf,CAAC;AAED,cAAc;AACd,MAAM,UAAU,aAAa,CAAC,MAAc;IACxC,IAAI,CAAC,GAAG,MAAM,GAAG,CAAC,CAAC;IACnB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC;IACjC,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC;IAChD,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,GAAG,UAAU,CAAC,KAAK,EAAE,CAAC;AAChE,CAAC","file":"bit.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n/** @ignore */\nexport function getBool(_data: any, _index: number, byte: number, bit: number) {\n return (byte & 1 << bit) !== 0;\n}\n\n/** @ignore */\nexport function getBit(_data: any, _index: number, byte: number, bit: number): 0 | 1 {\n return (byte & 1 << bit) >> bit as (0 | 1);\n}\n\n/** @ignore */\nexport function setBool(bytes: Uint8Array, index: number, value: any) {\n return value ?\n !!(bytes[index >> 3] |= (1 << (index % 8))) || true :\n !(bytes[index >> 3] &= ~(1 << (index % 8))) && false ;\n}\n\n/** @ignore */\nexport function truncateBitmap(offset: number, length: number, bitmap: Uint8Array) {\n const alignedSize = (bitmap.byteLength + 7) & ~7;\n if (offset > 0 || bitmap.byteLength < alignedSize) {\n const bytes = new Uint8Array(alignedSize);\n // If the offset is a multiple of 8 bits, it's safe to slice the bitmap\n bytes.set(offset % 8 === 0 ? bitmap.subarray(offset >> 3) :\n // Otherwise iterate each bit from the offset and return a new one\n packBools(iterateBits(bitmap, offset, length, null, getBool)).subarray(0, alignedSize));\n return bytes;\n }\n return bitmap;\n}\n\n/** @ignore */\nexport function packBools(values: Iterable) {\n let xs: number[] = [];\n let i = 0, bit = 0, byte = 0;\n for (const value of values) {\n value && (byte |= 1 << bit);\n if (++bit === 8) {\n xs[i++] = byte;\n byte = bit = 0;\n }\n }\n if (i === 0 || bit > 0) { xs[i++] = byte; }\n let b = new Uint8Array((xs.length + 7) & ~7);\n b.set(xs);\n return b;\n}\n\n/** @ignore */\nexport function* iterateBits(bytes: Uint8Array, begin: number, length: number, context: any,\n get: (context: any, index: number, byte: number, bit: number) => T) {\n let bit = begin % 8;\n let byteIndex = begin >> 3;\n let index = 0, remaining = length;\n for (; remaining > 0; bit = 0) {\n let byte = bytes[byteIndex++];\n do {\n yield get(context, index++, byte, bit);\n } while (--remaining > 0 && ++bit < 8);\n }\n}\n\n/**\n * Compute the population count (the number of bits set to 1) for a range of bits in a Uint8Array.\n * @param vector The Uint8Array of bits for which to compute the population count.\n * @param lhs The range's left-hand side (or start) bit\n * @param rhs The range's right-hand side (or end) bit\n */\n/** @ignore */\nexport function popcnt_bit_range(data: Uint8Array, lhs: number, rhs: number): number {\n if (rhs - lhs <= 0) { return 0; }\n // If the bit range is less than one byte, sum the 1 bits in the bit range\n if (rhs - lhs < 8) {\n let sum = 0;\n for (const bit of iterateBits(data, lhs, rhs - lhs, data, getBit)) {\n sum += bit;\n }\n return sum;\n }\n // Get the next lowest multiple of 8 from the right hand side\n const rhsInside = rhs >> 3 << 3;\n // Get the next highest multiple of 8 from the left hand side\n const lhsInside = lhs + (lhs % 8 === 0 ? 0 : 8 - lhs % 8);\n return (\n // Get the popcnt of bits between the left hand side, and the next highest multiple of 8\n popcnt_bit_range(data, lhs, lhsInside) +\n // Get the popcnt of bits between the right hand side, and the next lowest multiple of 8\n popcnt_bit_range(data, rhsInside, rhs) +\n // Get the popcnt of all bits between the left and right hand sides' multiples of 8\n popcnt_array(data, lhsInside >> 3, (rhsInside - lhsInside) >> 3)\n );\n}\n\n/** @ignore */\nexport function popcnt_array(arr: ArrayBufferView, byteOffset?: number, byteLength?: number) {\n let cnt = 0, pos = byteOffset! | 0;\n const view = new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n const len = byteLength === void 0 ? arr.byteLength : pos + byteLength;\n while (len - pos >= 4) {\n cnt += popcnt_uint32(view.getUint32(pos));\n pos += 4;\n }\n while (len - pos >= 2) {\n cnt += popcnt_uint32(view.getUint16(pos));\n pos += 2;\n }\n while (len - pos >= 1) {\n cnt += popcnt_uint32(view.getUint8(pos));\n pos += 1;\n }\n return cnt;\n}\n\n/** @ignore */\nexport function popcnt_uint32(uint32: number): number {\n let i = uint32 | 0;\n i = i - ((i >>> 1) & 0x55555555);\n i = (i & 0x33333333) + ((i >>> 2) & 0x33333333);\n return (((i + (i >>> 4)) & 0x0F0F0F0F) * 0x01010101) >>> 24;\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/util/bn.d.ts b/frontend/node_modules/apache-arrow/util/bn.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..4f2e1fd711a609a265ea278a07de25c55b223a10 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/bn.d.ts @@ -0,0 +1,89 @@ +import { ArrayBufferViewInput } from './buffer'; +import { TypedArray, TypedArrayConstructor } from '../interfaces'; +import { BigIntArray, BigIntArrayConstructor } from '../interfaces'; +/** @ignore */ +export declare const isArrowBigNumSymbol: unique symbol; +/** @ignore */ declare type BigNumArray = IntArray | UintArray; +/** @ignore */ declare type IntArray = Int8Array | Int16Array | Int32Array; +/** @ignore */ declare type UintArray = Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray; +/** @ignore */ +export declare let bignumToString: { + >(a: T): string; +}; +/** @ignore */ +export declare let bignumToBigInt: { + >(a: T): bigint; +}; +/** @ignore */ +export declare class BN { + /** @nocollapse */ + static new(num: T, isSigned?: boolean): (T & BN); + /** @nocollapse */ + static signed(num: T): (T & BN); + /** @nocollapse */ + static unsigned(num: T): (T & BN); + /** @nocollapse */ + static decimal(num: T): (T & BN); + constructor(num: T, isSigned?: boolean); +} +/** @ignore */ +export interface BN extends TypedArrayLike { + new (buffer: T, signed?: boolean): T; + readonly signed: boolean; + readonly TypedArray: TypedArrayConstructor; + readonly BigIntArray: BigIntArrayConstructor; + [Symbol.toStringTag]: 'Int8Array' | 'Int16Array' | 'Int32Array' | 'Uint8Array' | 'Uint16Array' | 'Uint32Array' | 'Uint8ClampedArray'; + /** + * Convert the bytes to their (positive) decimal representation for printing + */ + toString(): string; + /** + * Down-convert the bytes to a 53-bit precision integer. Invoked by JS for + * arithmetic operators, like `+`. Easy (and unsafe) way to convert BN to + * number via `+bn_inst` + */ + valueOf(): number; + /** + * Return the JSON representation of the bytes. Must be wrapped in double-quotes, + * so it's compatible with JSON.stringify(). + */ + toJSON(): string; + [Symbol.toPrimitive](hint?: any): number | string | bigint; +} +/** @ignore */ +interface TypedArrayLike { + readonly length: number; + readonly buffer: ArrayBuffer; + readonly byteLength: number; + readonly byteOffset: number; + readonly BYTES_PER_ELEMENT: number; + includes(searchElement: number, fromIndex?: number | undefined): boolean; + copyWithin(target: number, start: number, end?: number | undefined): this; + every(callbackfn: (value: number, index: number, array: T) => boolean, thisArg?: any): boolean; + fill(value: number, start?: number | undefined, end?: number | undefined): this; + filter(callbackfn: (value: number, index: number, array: T) => boolean, thisArg?: any): T; + find(predicate: (value: number, index: number, obj: T) => boolean, thisArg?: any): number | undefined; + findIndex(predicate: (value: number, index: number, obj: T) => boolean, thisArg?: any): number; + forEach(callbackfn: (value: number, index: number, array: T) => void, thisArg?: any): void; + indexOf(searchElement: number, fromIndex?: number | undefined): number; + join(separator?: string | undefined): string; + lastIndexOf(searchElement: number, fromIndex?: number | undefined): number; + map(callbackfn: (value: number, index: number, array: T) => number, thisArg?: any): T; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: T) => number): number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: T) => number, initialValue: number): number; + reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: T) => U, initialValue: U): U; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: T) => number): number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: T) => number, initialValue: number): number; + reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: T) => U, initialValue: U): U; + reverse(): T; + set(array: ArrayLike, offset?: number | undefined): void; + slice(start?: number | undefined, end?: number | undefined): T; + some(callbackfn: (value: number, index: number, array: T) => boolean, thisArg?: any): boolean; + sort(compareFn?: ((a: number, b: number) => number) | undefined): this; + subarray(begin: number, end?: number | undefined): T; + toLocaleString(): string; + entries(): IterableIterator<[number, number]>; + keys(): IterableIterator; + values(): IterableIterator; +} +export {}; diff --git a/frontend/node_modules/apache-arrow/util/bn.js b/frontend/node_modules/apache-arrow/util/bn.js new file mode 100644 index 0000000000000000000000000000000000000000..a62b3f66f96d3e572c7d1723e01392905a03c757 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/bn.js @@ -0,0 +1,131 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const buffer_1 = require("./buffer"); +const compat_1 = require("./compat"); +/** @ignore */ +exports.isArrowBigNumSymbol = Symbol.for('isArrowBigNum'); +/** @ignore */ +function BigNum(x, ...xs) { + if (xs.length === 0) { + return Object.setPrototypeOf(buffer_1.toArrayBufferView(this['TypedArray'], x), this.constructor.prototype); + } + return Object.setPrototypeOf(new this['TypedArray'](x, ...xs), this.constructor.prototype); +} +BigNum.prototype[exports.isArrowBigNumSymbol] = true; +BigNum.prototype.toJSON = function () { return `"${exports.bignumToString(this)}"`; }; +BigNum.prototype.valueOf = function () { return bignumToNumber(this); }; +BigNum.prototype.toString = function () { return exports.bignumToString(this); }; +BigNum.prototype[Symbol.toPrimitive] = function (hint = 'default') { + switch (hint) { + case 'number': return bignumToNumber(this); + case 'string': return exports.bignumToString(this); + case 'default': return exports.bignumToBigInt(this); + } + return exports.bignumToString(this); +}; +/** @ignore */ +function SignedBigNum(...args) { return BigNum.apply(this, args); } +/** @ignore */ +function UnsignedBigNum(...args) { return BigNum.apply(this, args); } +/** @ignore */ +function DecimalBigNum(...args) { return BigNum.apply(this, args); } +Object.setPrototypeOf(SignedBigNum.prototype, Object.create(Int32Array.prototype)); +Object.setPrototypeOf(UnsignedBigNum.prototype, Object.create(Uint32Array.prototype)); +Object.setPrototypeOf(DecimalBigNum.prototype, Object.create(Uint32Array.prototype)); +Object.assign(SignedBigNum.prototype, BigNum.prototype, { 'constructor': SignedBigNum, 'signed': true, 'TypedArray': Int32Array, 'BigIntArray': compat_1.BigInt64Array }); +Object.assign(UnsignedBigNum.prototype, BigNum.prototype, { 'constructor': UnsignedBigNum, 'signed': false, 'TypedArray': Uint32Array, 'BigIntArray': compat_1.BigUint64Array }); +Object.assign(DecimalBigNum.prototype, BigNum.prototype, { 'constructor': DecimalBigNum, 'signed': true, 'TypedArray': Uint32Array, 'BigIntArray': compat_1.BigUint64Array }); +/** @ignore */ +function bignumToNumber(bn) { + let { buffer, byteOffset, length, 'signed': signed } = bn; + let words = new Int32Array(buffer, byteOffset, length); + let number = 0, i = 0, n = words.length, hi, lo; + while (i < n) { + lo = words[i++]; + hi = words[i++]; + signed || (hi = hi >>> 0); + number += (lo >>> 0) + (hi * (i ** 32)); + } + return number; +} +if (!compat_1.BigIntAvailable) { + exports.bignumToString = decimalToString; + exports.bignumToBigInt = exports.bignumToString; +} +else { + exports.bignumToBigInt = ((a) => a.byteLength === 8 ? new a['BigIntArray'](a.buffer, a.byteOffset, 1)[0] : decimalToString(a)); + exports.bignumToString = ((a) => a.byteLength === 8 ? `${new a['BigIntArray'](a.buffer, a.byteOffset, 1)[0]}` : decimalToString(a)); +} +/** @ignore */ +function decimalToString(a) { + let digits = ''; + let base64 = new Uint32Array(2); + let base32 = new Uint16Array(a.buffer, a.byteOffset, a.byteLength / 2); + let checks = new Uint32Array((base32 = new Uint16Array(base32).reverse()).buffer); + let i = -1, n = base32.length - 1; + do { + for (base64[0] = base32[i = 0]; i < n;) { + base32[i++] = base64[1] = base64[0] / 10; + base64[0] = ((base64[0] - base64[1] * 10) << 16) + base32[i]; + } + base32[i] = base64[1] = base64[0] / 10; + base64[0] = base64[0] - base64[1] * 10; + digits = `${base64[0]}${digits}`; + } while (checks[0] || checks[1] || checks[2] || checks[3]); + return digits ? digits : `0`; +} +/** @ignore */ +class BN { + constructor(num, isSigned) { + return BN.new(num, isSigned); + } + /** @nocollapse */ + static new(num, isSigned) { + switch (isSigned) { + case true: return new SignedBigNum(num); + case false: return new UnsignedBigNum(num); + } + switch (num.constructor) { + case Int8Array: + case Int16Array: + case Int32Array: + case compat_1.BigInt64Array: + return new SignedBigNum(num); + } + if (num.byteLength === 16) { + return new DecimalBigNum(num); + } + return new UnsignedBigNum(num); + } + /** @nocollapse */ + static signed(num) { + return new SignedBigNum(num); + } + /** @nocollapse */ + static unsigned(num) { + return new UnsignedBigNum(num); + } + /** @nocollapse */ + static decimal(num) { + return new DecimalBigNum(num); + } +} +exports.BN = BN; + +//# sourceMappingURL=bn.js.map diff --git a/frontend/node_modules/apache-arrow/util/bn.js.map b/frontend/node_modules/apache-arrow/util/bn.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f0f44a9ef2e3257550ffb986117632afa9057e5f --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/bn.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["util/bn.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,qCAAmE;AAGnE,qCAA0E;AAE1E,cAAc;AACD,QAAA,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AAM/D,cAAc;AACd,SAAS,MAAM,CAAY,CAAM,EAAE,GAAG,EAAO;IACzC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE;QACjB,OAAO,MAAM,CAAC,cAAc,CAAC,0BAAiB,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;KACtG;IACD,OAAO,MAAM,CAAC,cAAc,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;AAC/F,CAAC;AAED,MAAM,CAAC,SAAS,CAAC,2BAAmB,CAAC,GAAG,IAAI,CAAC;AAC7C,MAAM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,CAAC;IACxC,CAAC;IAhCD,kBAAkB;IACX,MAAM,CAAC,GAAG,CAAwB,GAAM,EAAE,QAAkB;QAC/D,QAAQ,QAAQ,EAAE;YACd,KAAK,IAAI,CAAC,CAAC,OAAO,IAAW,YAAa,CAAC,GAAG,CAAgB,CAAC;YAC/D,KAAK,KAAK,CAAC,CAAC,OAAO,IAAW,cAAe,CAAC,GAAG,CAAgB,CAAC;SACrE;QACD,QAAQ,GAAG,CAAC,WAAW,EAAE;YACrB,KAAK,SAAS,CAAC;YACf,KAAK,UAAU,CAAC;YAChB,KAAK,UAAU,CAAC;YAChB,KAAK,sBAAa;gBACd,OAAO,IAAW,YAAa,CAAC,GAAG,CAAgB,CAAC;SAC3D;QACD,IAAI,GAAG,CAAC,UAAU,KAAK,EAAE,EAAE;YACvB,OAAO,IAAW,aAAc,CAAC,GAAG,CAAgB,CAAC;SACxD;QACD,OAAO,IAAW,cAAe,CAAC,GAAG,CAAgB,CAAC;IAC1D,CAAC;IACD,kBAAkB;IACX,MAAM,CAAC,MAAM,CAAqB,GAAM;QAC3C,OAAO,IAAW,YAAa,CAAC,GAAG,CAAgB,CAAC;IACxD,CAAC;IACD,kBAAkB;IACX,MAAM,CAAC,QAAQ,CAAsB,GAAM;QAC9C,OAAO,IAAW,cAAe,CAAC,GAAG,CAAgB,CAAC;IAC1D,CAAC;IACD,kBAAkB;IACX,MAAM,CAAC,OAAO,CAAsB,GAAM;QAC7C,OAAO,IAAW,aAAc,CAAC,GAAG,CAAgB,CAAC;IACzD,CAAC;CAIJ;AAlCD,gBAkCC","file":"bn.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { ArrayBufferViewInput, toArrayBufferView } from './buffer';\nimport { TypedArray, TypedArrayConstructor } from '../interfaces';\nimport { BigIntArray, BigIntArrayConstructor } from '../interfaces';\nimport { BigIntAvailable, BigInt64Array, BigUint64Array } from './compat';\n\n/** @ignore */\nexport const isArrowBigNumSymbol = Symbol.for('isArrowBigNum');\n\n/** @ignore */ type BigNumArray = IntArray | UintArray;\n/** @ignore */ type IntArray = Int8Array | Int16Array | Int32Array;\n/** @ignore */ type UintArray = Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray;\n\n/** @ignore */\nfunction BigNum(this: any, x: any, ...xs: any) {\n if (xs.length === 0) {\n return Object.setPrototypeOf(toArrayBufferView(this['TypedArray'], x), this.constructor.prototype);\n }\n return Object.setPrototypeOf(new this['TypedArray'](x, ...xs), this.constructor.prototype);\n}\n\nBigNum.prototype[isArrowBigNumSymbol] = true;\nBigNum.prototype.toJSON = function>(this: T) { return `\"${bignumToString(this)}\"`; };\nBigNum.prototype.valueOf = function>(this: T) { return bignumToNumber(this); };\nBigNum.prototype.toString = function>(this: T) { return bignumToString(this); };\nBigNum.prototype[Symbol.toPrimitive] = function>(this: T, hint: 'string' | 'number' | 'default' = 'default') {\n switch (hint) {\n case 'number': return bignumToNumber(this);\n case 'string': return bignumToString(this);\n case 'default': return bignumToBigInt(this);\n }\n return bignumToString(this);\n};\n\n/** @ignore */\ntype TypedArrayConstructorArgs =\n [number | void] |\n [Iterable | Iterable] |\n [ArrayBufferLike, number | void, number | void] ;\n\n/** @ignore */\nfunction SignedBigNum(this: any, ...args: TypedArrayConstructorArgs) { return BigNum.apply(this, args); }\n/** @ignore */\nfunction UnsignedBigNum(this: any, ...args: TypedArrayConstructorArgs) { return BigNum.apply(this, args); }\n/** @ignore */\nfunction DecimalBigNum(this: any, ...args: TypedArrayConstructorArgs) { return BigNum.apply(this, args); }\n\nObject.setPrototypeOf(SignedBigNum.prototype, Object.create(Int32Array.prototype));\nObject.setPrototypeOf(UnsignedBigNum.prototype, Object.create(Uint32Array.prototype));\nObject.setPrototypeOf(DecimalBigNum.prototype, Object.create(Uint32Array.prototype));\nObject.assign(SignedBigNum.prototype, BigNum.prototype, { 'constructor': SignedBigNum, 'signed': true, 'TypedArray': Int32Array, 'BigIntArray': BigInt64Array });\nObject.assign(UnsignedBigNum.prototype, BigNum.prototype, { 'constructor': UnsignedBigNum, 'signed': false, 'TypedArray': Uint32Array, 'BigIntArray': BigUint64Array });\nObject.assign(DecimalBigNum.prototype, BigNum.prototype, { 'constructor': DecimalBigNum, 'signed': true, 'TypedArray': Uint32Array, 'BigIntArray': BigUint64Array });\n\n/** @ignore */\nfunction bignumToNumber>(bn: T) {\n let { buffer, byteOffset, length, 'signed': signed } = bn;\n let words = new Int32Array(buffer, byteOffset, length);\n let number = 0, i = 0, n = words.length, hi, lo;\n while (i < n) {\n lo = words[i++];\n hi = words[i++];\n signed || (hi = hi >>> 0);\n number += (lo >>> 0) + (hi * (i ** 32));\n }\n return number;\n}\n\n/** @ignore */\nexport let bignumToString: { >(a: T): string; };\n/** @ignore */\nexport let bignumToBigInt: { >(a: T): bigint; };\n\nif (!BigIntAvailable) {\n bignumToString = decimalToString;\n bignumToBigInt = bignumToString;\n} else {\n bignumToBigInt = (>(a: T) => a.byteLength === 8 ? new a['BigIntArray'](a.buffer, a.byteOffset, 1)[0] : decimalToString(a));\n bignumToString = (>(a: T) => a.byteLength === 8 ? `${new a['BigIntArray'](a.buffer, a.byteOffset, 1)[0]}` : decimalToString(a));\n}\n\n/** @ignore */\nfunction decimalToString>(a: T) {\n let digits = '';\n let base64 = new Uint32Array(2);\n let base32 = new Uint16Array(a.buffer, a.byteOffset, a.byteLength / 2);\n let checks = new Uint32Array((base32 = new Uint16Array(base32).reverse()).buffer);\n let i = -1, n = base32.length - 1;\n do {\n for (base64[0] = base32[i = 0]; i < n;) {\n base32[i++] = base64[1] = base64[0] / 10;\n base64[0] = ((base64[0] - base64[1] * 10) << 16) + base32[i];\n }\n base32[i] = base64[1] = base64[0] / 10;\n base64[0] = base64[0] - base64[1] * 10;\n digits = `${base64[0]}${digits}`;\n } while (checks[0] || checks[1] || checks[2] || checks[3]);\n return digits ? digits : `0`;\n}\n\n/** @ignore */\nexport class BN {\n /** @nocollapse */\n public static new(num: T, isSigned?: boolean): (T & BN) {\n switch (isSigned) {\n case true: return new ( SignedBigNum)(num) as (T & BN);\n case false: return new ( UnsignedBigNum)(num) as (T & BN);\n }\n switch (num.constructor) {\n case Int8Array:\n case Int16Array:\n case Int32Array:\n case BigInt64Array:\n return new ( SignedBigNum)(num) as (T & BN);\n }\n if (num.byteLength === 16) {\n return new ( DecimalBigNum)(num) as (T & BN);\n }\n return new ( UnsignedBigNum)(num) as (T & BN);\n }\n /** @nocollapse */\n public static signed(num: T): (T & BN) {\n return new ( SignedBigNum)(num) as (T & BN);\n }\n /** @nocollapse */\n public static unsigned(num: T): (T & BN) {\n return new ( UnsignedBigNum)(num) as (T & BN);\n }\n /** @nocollapse */\n public static decimal(num: T): (T & BN) {\n return new ( DecimalBigNum)(num) as (T & BN);\n }\n constructor(num: T, isSigned?: boolean) {\n return BN.new(num, isSigned) as any;\n }\n}\n\n/** @ignore */\nexport interface BN extends TypedArrayLike {\n\n new(buffer: T, signed?: boolean): T;\n\n readonly signed: boolean;\n readonly TypedArray: TypedArrayConstructor;\n readonly BigIntArray: BigIntArrayConstructor;\n\n [Symbol.toStringTag]:\n 'Int8Array' |\n 'Int16Array' |\n 'Int32Array' |\n 'Uint8Array' |\n 'Uint16Array' |\n 'Uint32Array' |\n 'Uint8ClampedArray';\n\n /**\n * Convert the bytes to their (positive) decimal representation for printing\n */\n toString(): string;\n /**\n * Down-convert the bytes to a 53-bit precision integer. Invoked by JS for\n * arithmetic operators, like `+`. Easy (and unsafe) way to convert BN to\n * number via `+bn_inst`\n */\n valueOf(): number;\n /**\n * Return the JSON representation of the bytes. Must be wrapped in double-quotes,\n * so it's compatible with JSON.stringify().\n */\n toJSON(): string;\n [Symbol.toPrimitive](hint?: any): number | string | bigint;\n}\n\n/** @ignore */\ninterface TypedArrayLike {\n\n readonly length: number;\n readonly buffer: ArrayBuffer;\n readonly byteLength: number;\n readonly byteOffset: number;\n readonly BYTES_PER_ELEMENT: number;\n\n includes(searchElement: number, fromIndex?: number | undefined): boolean;\n copyWithin(target: number, start: number, end?: number | undefined): this;\n every(callbackfn: (value: number, index: number, array: T) => boolean, thisArg?: any): boolean;\n fill(value: number, start?: number | undefined, end?: number | undefined): this;\n filter(callbackfn: (value: number, index: number, array: T) => boolean, thisArg?: any): T;\n find(predicate: (value: number, index: number, obj: T) => boolean, thisArg?: any): number | undefined;\n findIndex(predicate: (value: number, index: number, obj: T) => boolean, thisArg?: any): number;\n forEach(callbackfn: (value: number, index: number, array: T) => void, thisArg?: any): void;\n indexOf(searchElement: number, fromIndex?: number | undefined): number;\n join(separator?: string | undefined): string;\n lastIndexOf(searchElement: number, fromIndex?: number | undefined): number;\n map(callbackfn: (value: number, index: number, array: T) => number, thisArg?: any): T;\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: T) => number): number;\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: T) => number, initialValue: number): number;\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: T) => U, initialValue: U): U;\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: T) => number): number;\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: T) => number, initialValue: number): number;\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: T) => U, initialValue: U): U;\n reverse(): T;\n set(array: ArrayLike, offset?: number | undefined): void;\n slice(start?: number | undefined, end?: number | undefined): T;\n some(callbackfn: (value: number, index: number, array: T) => boolean, thisArg?: any): boolean;\n sort(compareFn?: ((a: number, b: number) => number) | undefined): this;\n subarray(begin: number, end?: number | undefined): T;\n toLocaleString(): string;\n entries(): IterableIterator<[number, number]>;\n keys(): IterableIterator;\n values(): IterableIterator;\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/util/bn.mjs b/frontend/node_modules/apache-arrow/util/bn.mjs new file mode 100644 index 0000000000000000000000000000000000000000..830a0443e44dec6dddc72f0f80635ac66d930a8e --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/bn.mjs @@ -0,0 +1,132 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { toArrayBufferView } from './buffer'; +import { BigIntAvailable, BigInt64Array, BigUint64Array } from './compat'; +/** @ignore */ +export const isArrowBigNumSymbol = Symbol.for('isArrowBigNum'); +/** @ignore */ +function BigNum(x, ...xs) { + if (xs.length === 0) { + return Object.setPrototypeOf(toArrayBufferView(this['TypedArray'], x), this.constructor.prototype); + } + return Object.setPrototypeOf(new this['TypedArray'](x, ...xs), this.constructor.prototype); +} +BigNum.prototype[isArrowBigNumSymbol] = true; +BigNum.prototype.toJSON = function () { return `"${bignumToString(this)}"`; }; +BigNum.prototype.valueOf = function () { return bignumToNumber(this); }; +BigNum.prototype.toString = function () { return bignumToString(this); }; +BigNum.prototype[Symbol.toPrimitive] = function (hint = 'default') { + switch (hint) { + case 'number': return bignumToNumber(this); + case 'string': return bignumToString(this); + case 'default': return bignumToBigInt(this); + } + return bignumToString(this); +}; +/** @ignore */ +function SignedBigNum(...args) { return BigNum.apply(this, args); } +/** @ignore */ +function UnsignedBigNum(...args) { return BigNum.apply(this, args); } +/** @ignore */ +function DecimalBigNum(...args) { return BigNum.apply(this, args); } +Object.setPrototypeOf(SignedBigNum.prototype, Object.create(Int32Array.prototype)); +Object.setPrototypeOf(UnsignedBigNum.prototype, Object.create(Uint32Array.prototype)); +Object.setPrototypeOf(DecimalBigNum.prototype, Object.create(Uint32Array.prototype)); +Object.assign(SignedBigNum.prototype, BigNum.prototype, { 'constructor': SignedBigNum, 'signed': true, 'TypedArray': Int32Array, 'BigIntArray': BigInt64Array }); +Object.assign(UnsignedBigNum.prototype, BigNum.prototype, { 'constructor': UnsignedBigNum, 'signed': false, 'TypedArray': Uint32Array, 'BigIntArray': BigUint64Array }); +Object.assign(DecimalBigNum.prototype, BigNum.prototype, { 'constructor': DecimalBigNum, 'signed': true, 'TypedArray': Uint32Array, 'BigIntArray': BigUint64Array }); +/** @ignore */ +function bignumToNumber(bn) { + let { buffer, byteOffset, length, 'signed': signed } = bn; + let words = new Int32Array(buffer, byteOffset, length); + let number = 0, i = 0, n = words.length, hi, lo; + while (i < n) { + lo = words[i++]; + hi = words[i++]; + signed || (hi = hi >>> 0); + number += (lo >>> 0) + (hi * (i ** 32)); + } + return number; +} +/** @ignore */ +export let bignumToString; +/** @ignore */ +export let bignumToBigInt; +if (!BigIntAvailable) { + bignumToString = decimalToString; + bignumToBigInt = bignumToString; +} +else { + bignumToBigInt = ((a) => a.byteLength === 8 ? new a['BigIntArray'](a.buffer, a.byteOffset, 1)[0] : decimalToString(a)); + bignumToString = ((a) => a.byteLength === 8 ? `${new a['BigIntArray'](a.buffer, a.byteOffset, 1)[0]}` : decimalToString(a)); +} +/** @ignore */ +function decimalToString(a) { + let digits = ''; + let base64 = new Uint32Array(2); + let base32 = new Uint16Array(a.buffer, a.byteOffset, a.byteLength / 2); + let checks = new Uint32Array((base32 = new Uint16Array(base32).reverse()).buffer); + let i = -1, n = base32.length - 1; + do { + for (base64[0] = base32[i = 0]; i < n;) { + base32[i++] = base64[1] = base64[0] / 10; + base64[0] = ((base64[0] - base64[1] * 10) << 16) + base32[i]; + } + base32[i] = base64[1] = base64[0] / 10; + base64[0] = base64[0] - base64[1] * 10; + digits = `${base64[0]}${digits}`; + } while (checks[0] || checks[1] || checks[2] || checks[3]); + return digits ? digits : `0`; +} +/** @ignore */ +export class BN { + constructor(num, isSigned) { + return BN.new(num, isSigned); + } + /** @nocollapse */ + static new(num, isSigned) { + switch (isSigned) { + case true: return new SignedBigNum(num); + case false: return new UnsignedBigNum(num); + } + switch (num.constructor) { + case Int8Array: + case Int16Array: + case Int32Array: + case BigInt64Array: + return new SignedBigNum(num); + } + if (num.byteLength === 16) { + return new DecimalBigNum(num); + } + return new UnsignedBigNum(num); + } + /** @nocollapse */ + static signed(num) { + return new SignedBigNum(num); + } + /** @nocollapse */ + static unsigned(num) { + return new UnsignedBigNum(num); + } + /** @nocollapse */ + static decimal(num) { + return new DecimalBigNum(num); + } +} + +//# sourceMappingURL=bn.mjs.map diff --git a/frontend/node_modules/apache-arrow/util/bn.mjs.map b/frontend/node_modules/apache-arrow/util/bn.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..df24ebcf2986f04a392c962843bef8817c9d7108 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/bn.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["util/bn.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,OAAO,EAAwB,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAGnE,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1E,cAAc;AACd,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AAG,CAAgB,CAAC;IAC1D,CAAC;IACD,kBAAkB;IACX,MAAM,CAAC,MAAM,CAAqB,GAAM;QAC3C,OAAO,IAAW,YAAa,CAAC,GAAG,CAAgB,CAAC;IACxD,CAAC;IACD,kBAAkB;IACX,MAAM,CAAC,QAAQ,CAAsB,GAAM;QAC9C,OAAO,IAAW,cAAe,CAAC,GAAG,CAAgB,CAAC;IAC1D,CAAC;IACD,kBAAkB;IACX,MAAM,CAAC,OAAO,CAAsB,GAAM;QAC7C,OAAO,IAAW,aAAc,CAAC,GAAG,CAAgB,CAAC;IACzD,CAAC;CAIJ","file":"bn.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { ArrayBufferViewInput, toArrayBufferView } from './buffer';\nimport { TypedArray, TypedArrayConstructor } from '../interfaces';\nimport { BigIntArray, BigIntArrayConstructor } from '../interfaces';\nimport { BigIntAvailable, BigInt64Array, BigUint64Array } from './compat';\n\n/** @ignore */\nexport const isArrowBigNumSymbol = Symbol.for('isArrowBigNum');\n\n/** @ignore */ type BigNumArray = IntArray | UintArray;\n/** @ignore */ type IntArray = Int8Array | Int16Array | Int32Array;\n/** @ignore */ type UintArray = Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray;\n\n/** @ignore */\nfunction BigNum(this: any, x: any, ...xs: any) {\n if (xs.length === 0) {\n return Object.setPrototypeOf(toArrayBufferView(this['TypedArray'], x), this.constructor.prototype);\n }\n return Object.setPrototypeOf(new this['TypedArray'](x, ...xs), this.constructor.prototype);\n}\n\nBigNum.prototype[isArrowBigNumSymbol] = true;\nBigNum.prototype.toJSON = function>(this: T) { return `\"${bignumToString(this)}\"`; };\nBigNum.prototype.valueOf = function>(this: T) { return bignumToNumber(this); };\nBigNum.prototype.toString = function>(this: T) { return bignumToString(this); };\nBigNum.prototype[Symbol.toPrimitive] = function>(this: T, hint: 'string' | 'number' | 'default' = 'default') {\n switch (hint) {\n case 'number': return bignumToNumber(this);\n case 'string': return bignumToString(this);\n case 'default': return bignumToBigInt(this);\n }\n return bignumToString(this);\n};\n\n/** @ignore */\ntype TypedArrayConstructorArgs =\n [number | void] |\n [Iterable | Iterable] |\n [ArrayBufferLike, number | void, number | void] ;\n\n/** @ignore */\nfunction SignedBigNum(this: any, ...args: TypedArrayConstructorArgs) { return BigNum.apply(this, args); }\n/** @ignore */\nfunction UnsignedBigNum(this: any, ...args: TypedArrayConstructorArgs) { return BigNum.apply(this, args); }\n/** @ignore */\nfunction DecimalBigNum(this: any, ...args: TypedArrayConstructorArgs) { return BigNum.apply(this, args); }\n\nObject.setPrototypeOf(SignedBigNum.prototype, Object.create(Int32Array.prototype));\nObject.setPrototypeOf(UnsignedBigNum.prototype, Object.create(Uint32Array.prototype));\nObject.setPrototypeOf(DecimalBigNum.prototype, Object.create(Uint32Array.prototype));\nObject.assign(SignedBigNum.prototype, BigNum.prototype, { 'constructor': SignedBigNum, 'signed': true, 'TypedArray': Int32Array, 'BigIntArray': BigInt64Array });\nObject.assign(UnsignedBigNum.prototype, BigNum.prototype, { 'constructor': UnsignedBigNum, 'signed': false, 'TypedArray': Uint32Array, 'BigIntArray': BigUint64Array });\nObject.assign(DecimalBigNum.prototype, BigNum.prototype, { 'constructor': DecimalBigNum, 'signed': true, 'TypedArray': Uint32Array, 'BigIntArray': BigUint64Array });\n\n/** @ignore */\nfunction bignumToNumber>(bn: T) {\n let { buffer, byteOffset, length, 'signed': signed } = bn;\n let words = new Int32Array(buffer, byteOffset, length);\n let number = 0, i = 0, n = words.length, hi, lo;\n while (i < n) {\n lo = words[i++];\n hi = words[i++];\n signed || (hi = hi >>> 0);\n number += (lo >>> 0) + (hi * (i ** 32));\n }\n return number;\n}\n\n/** @ignore */\nexport let bignumToString: { >(a: T): string; };\n/** @ignore */\nexport let bignumToBigInt: { >(a: T): bigint; };\n\nif (!BigIntAvailable) {\n bignumToString = decimalToString;\n bignumToBigInt = bignumToString;\n} else {\n bignumToBigInt = (>(a: T) => a.byteLength === 8 ? new a['BigIntArray'](a.buffer, a.byteOffset, 1)[0] : decimalToString(a));\n bignumToString = (>(a: T) => a.byteLength === 8 ? `${new a['BigIntArray'](a.buffer, a.byteOffset, 1)[0]}` : decimalToString(a));\n}\n\n/** @ignore */\nfunction decimalToString>(a: T) {\n let digits = '';\n let base64 = new Uint32Array(2);\n let base32 = new Uint16Array(a.buffer, a.byteOffset, a.byteLength / 2);\n let checks = new Uint32Array((base32 = new Uint16Array(base32).reverse()).buffer);\n let i = -1, n = base32.length - 1;\n do {\n for (base64[0] = base32[i = 0]; i < n;) {\n base32[i++] = base64[1] = base64[0] / 10;\n base64[0] = ((base64[0] - base64[1] * 10) << 16) + base32[i];\n }\n base32[i] = base64[1] = base64[0] / 10;\n base64[0] = base64[0] - base64[1] * 10;\n digits = `${base64[0]}${digits}`;\n } while (checks[0] || checks[1] || checks[2] || checks[3]);\n return digits ? digits : `0`;\n}\n\n/** @ignore */\nexport class BN {\n /** @nocollapse */\n public static new(num: T, isSigned?: boolean): (T & BN) {\n switch (isSigned) {\n case true: return new ( SignedBigNum)(num) as (T & BN);\n case false: return new ( UnsignedBigNum)(num) as (T & BN);\n }\n switch (num.constructor) {\n case Int8Array:\n case Int16Array:\n case Int32Array:\n case BigInt64Array:\n return new ( SignedBigNum)(num) as (T & BN);\n }\n if (num.byteLength === 16) {\n return new ( DecimalBigNum)(num) as (T & BN);\n }\n return new ( UnsignedBigNum)(num) as (T & BN);\n }\n /** @nocollapse */\n public static signed(num: T): (T & BN) {\n return new ( SignedBigNum)(num) as (T & BN);\n }\n /** @nocollapse */\n public static unsigned(num: T): (T & BN) {\n return new ( UnsignedBigNum)(num) as (T & BN);\n }\n /** @nocollapse */\n public static decimal(num: T): (T & BN) {\n return new ( DecimalBigNum)(num) as (T & BN);\n }\n constructor(num: T, isSigned?: boolean) {\n return BN.new(num, isSigned) as any;\n }\n}\n\n/** @ignore */\nexport interface BN extends TypedArrayLike {\n\n new(buffer: T, signed?: boolean): T;\n\n readonly signed: boolean;\n readonly TypedArray: TypedArrayConstructor;\n readonly BigIntArray: BigIntArrayConstructor;\n\n [Symbol.toStringTag]:\n 'Int8Array' |\n 'Int16Array' |\n 'Int32Array' |\n 'Uint8Array' |\n 'Uint16Array' |\n 'Uint32Array' |\n 'Uint8ClampedArray';\n\n /**\n * Convert the bytes to their (positive) decimal representation for printing\n */\n toString(): string;\n /**\n * Down-convert the bytes to a 53-bit precision integer. Invoked by JS for\n * arithmetic operators, like `+`. Easy (and unsafe) way to convert BN to\n * number via `+bn_inst`\n */\n valueOf(): number;\n /**\n * Return the JSON representation of the bytes. Must be wrapped in double-quotes,\n * so it's compatible with JSON.stringify().\n */\n toJSON(): string;\n [Symbol.toPrimitive](hint?: any): number | string | bigint;\n}\n\n/** @ignore */\ninterface TypedArrayLike {\n\n readonly length: number;\n readonly buffer: ArrayBuffer;\n readonly byteLength: number;\n readonly byteOffset: number;\n readonly BYTES_PER_ELEMENT: number;\n\n includes(searchElement: number, fromIndex?: number | undefined): boolean;\n copyWithin(target: number, start: number, end?: number | undefined): this;\n every(callbackfn: (value: number, index: number, array: T) => boolean, thisArg?: any): boolean;\n fill(value: number, start?: number | undefined, end?: number | undefined): this;\n filter(callbackfn: (value: number, index: number, array: T) => boolean, thisArg?: any): T;\n find(predicate: (value: number, index: number, obj: T) => boolean, thisArg?: any): number | undefined;\n findIndex(predicate: (value: number, index: number, obj: T) => boolean, thisArg?: any): number;\n forEach(callbackfn: (value: number, index: number, array: T) => void, thisArg?: any): void;\n indexOf(searchElement: number, fromIndex?: number | undefined): number;\n join(separator?: string | undefined): string;\n lastIndexOf(searchElement: number, fromIndex?: number | undefined): number;\n map(callbackfn: (value: number, index: number, array: T) => number, thisArg?: any): T;\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: T) => number): number;\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: T) => number, initialValue: number): number;\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: T) => U, initialValue: U): U;\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: T) => number): number;\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: T) => number, initialValue: number): number;\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: T) => U, initialValue: U): U;\n reverse(): T;\n set(array: ArrayLike, offset?: number | undefined): void;\n slice(start?: number | undefined, end?: number | undefined): T;\n some(callbackfn: (value: number, index: number, array: T) => boolean, thisArg?: any): boolean;\n sort(compareFn?: ((a: number, b: number) => number) | undefined): this;\n subarray(begin: number, end?: number | undefined): T;\n toLocaleString(): string;\n entries(): IterableIterator<[number, number]>;\n keys(): IterableIterator;\n values(): IterableIterator;\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/util/buffer.d.ts b/frontend/node_modules/apache-arrow/util/buffer.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9310b15781b836a97a7766d26acb056c8e1c8ff9 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/buffer.d.ts @@ -0,0 +1,55 @@ +import { flatbuffers } from 'flatbuffers'; +import ByteBuffer = flatbuffers.ByteBuffer; +import { TypedArray, TypedArrayConstructor } from '../interfaces'; +import { BigIntArray, BigIntArrayConstructor } from '../interfaces'; +/** @ignore */ +export declare function memcpy(target: TTarget, source: TSource, targetByteOffset?: number, sourceByteLength?: number): TTarget; +/** @ignore */ +export declare function joinUint8Arrays(chunks: Uint8Array[], size?: number | null): [Uint8Array, Uint8Array[], number]; +/** @ignore */ +export declare type ArrayBufferViewInput = ArrayBufferView | ArrayBufferLike | ArrayBufferView | Iterable | ArrayLike | ByteBuffer | string | null | undefined | IteratorResult | ArrayLike | ByteBuffer | string | null | undefined> | ReadableStreamReadResult | ArrayLike | ByteBuffer | string | null | undefined>; +/** @ignore */ +export declare function toArrayBufferView(ArrayBufferViewCtor: TypedArrayConstructor, input: ArrayBufferViewInput): T; +export declare function toArrayBufferView(ArrayBufferViewCtor: BigIntArrayConstructor, input: ArrayBufferViewInput): T; +/** @ignore */ export declare const toInt8Array: (input: ArrayBufferViewInput) => Int8Array; +/** @ignore */ export declare const toInt16Array: (input: ArrayBufferViewInput) => Int16Array; +/** @ignore */ export declare const toInt32Array: (input: ArrayBufferViewInput) => Int32Array; +/** @ignore */ export declare const toBigInt64Array: (input: ArrayBufferViewInput) => BigInt64Array; +/** @ignore */ export declare const toUint8Array: (input: ArrayBufferViewInput) => Uint8Array; +/** @ignore */ export declare const toUint16Array: (input: ArrayBufferViewInput) => Uint16Array; +/** @ignore */ export declare const toUint32Array: (input: ArrayBufferViewInput) => Uint32Array; +/** @ignore */ export declare const toBigUint64Array: (input: ArrayBufferViewInput) => BigUint64Array; +/** @ignore */ export declare const toFloat32Array: (input: ArrayBufferViewInput) => Float32Array; +/** @ignore */ export declare const toFloat64Array: (input: ArrayBufferViewInput) => Float64Array; +/** @ignore */ export declare const toUint8ClampedArray: (input: ArrayBufferViewInput) => Uint8ClampedArray; +/** @ignore */ +declare type ArrayBufferViewIteratorInput = Iterable | ArrayBufferViewInput; +/** @ignore */ +export declare function toArrayBufferViewIterator(ArrayCtor: TypedArrayConstructor, source: ArrayBufferViewIteratorInput): IterableIterator; +/** @ignore */ export declare const toInt8ArrayIterator: (input: string | ArrayBuffer | SharedArrayBuffer | ArrayBufferView | ArrayLike | Iterable | flatbuffers.ByteBuffer | IteratorResult | Iterable | flatbuffers.ByteBuffer | null | undefined> | ReadableStreamReadResult | Iterable | flatbuffers.ByteBuffer | null | undefined> | Iterable | null | undefined) => IterableIterator; +/** @ignore */ export declare const toInt16ArrayIterator: (input: string | ArrayBuffer | SharedArrayBuffer | ArrayBufferView | ArrayLike | Iterable | flatbuffers.ByteBuffer | IteratorResult | Iterable | flatbuffers.ByteBuffer | null | undefined> | ReadableStreamReadResult | Iterable | flatbuffers.ByteBuffer | null | undefined> | Iterable | null | undefined) => IterableIterator; +/** @ignore */ export declare const toInt32ArrayIterator: (input: string | ArrayBuffer | SharedArrayBuffer | ArrayBufferView | ArrayLike | Iterable | flatbuffers.ByteBuffer | IteratorResult | Iterable | flatbuffers.ByteBuffer | null | undefined> | ReadableStreamReadResult | Iterable | flatbuffers.ByteBuffer | null | undefined> | Iterable | null | undefined) => IterableIterator; +/** @ignore */ export declare const toUint8ArrayIterator: (input: string | ArrayBuffer | SharedArrayBuffer | ArrayBufferView | ArrayLike | Iterable | flatbuffers.ByteBuffer | IteratorResult | Iterable | flatbuffers.ByteBuffer | null | undefined> | ReadableStreamReadResult | Iterable | flatbuffers.ByteBuffer | null | undefined> | Iterable | null | undefined) => IterableIterator; +/** @ignore */ export declare const toUint16ArrayIterator: (input: string | ArrayBuffer | SharedArrayBuffer | ArrayBufferView | ArrayLike | Iterable | flatbuffers.ByteBuffer | IteratorResult | Iterable | flatbuffers.ByteBuffer | null | undefined> | ReadableStreamReadResult | Iterable | flatbuffers.ByteBuffer | null | undefined> | Iterable | null | undefined) => IterableIterator; +/** @ignore */ export declare const toUint32ArrayIterator: (input: string | ArrayBuffer | SharedArrayBuffer | ArrayBufferView | ArrayLike | Iterable | flatbuffers.ByteBuffer | IteratorResult | Iterable | flatbuffers.ByteBuffer | null | undefined> | ReadableStreamReadResult | Iterable | flatbuffers.ByteBuffer | null | undefined> | Iterable | null | undefined) => IterableIterator; +/** @ignore */ export declare const toFloat32ArrayIterator: (input: string | ArrayBuffer | SharedArrayBuffer | ArrayBufferView | ArrayLike | Iterable | flatbuffers.ByteBuffer | IteratorResult | Iterable | flatbuffers.ByteBuffer | null | undefined> | ReadableStreamReadResult | Iterable | flatbuffers.ByteBuffer | null | undefined> | Iterable | null | undefined) => IterableIterator; +/** @ignore */ export declare const toFloat64ArrayIterator: (input: string | ArrayBuffer | SharedArrayBuffer | ArrayBufferView | ArrayLike | Iterable | flatbuffers.ByteBuffer | IteratorResult | Iterable | flatbuffers.ByteBuffer | null | undefined> | ReadableStreamReadResult | Iterable | flatbuffers.ByteBuffer | null | undefined> | Iterable | null | undefined) => IterableIterator; +/** @ignore */ export declare const toUint8ClampedArrayIterator: (input: string | ArrayBuffer | SharedArrayBuffer | ArrayBufferView | ArrayLike | Iterable | flatbuffers.ByteBuffer | IteratorResult | Iterable | flatbuffers.ByteBuffer | null | undefined> | ReadableStreamReadResult | Iterable | flatbuffers.ByteBuffer | null | undefined> | Iterable | null | undefined) => IterableIterator; +/** @ignore */ +declare type ArrayBufferViewAsyncIteratorInput = AsyncIterable | Iterable | PromiseLike | ArrayBufferViewInput; +/** @ignore */ +export declare function toArrayBufferViewAsyncIterator(ArrayCtor: TypedArrayConstructor, source: ArrayBufferViewAsyncIteratorInput): AsyncIterableIterator; +/** @ignore */ export declare const toInt8ArrayAsyncIterator: (input: ArrayBufferViewAsyncIteratorInput) => AsyncIterableIterator; +/** @ignore */ export declare const toInt16ArrayAsyncIterator: (input: ArrayBufferViewAsyncIteratorInput) => AsyncIterableIterator; +/** @ignore */ export declare const toInt32ArrayAsyncIterator: (input: ArrayBufferViewAsyncIteratorInput) => AsyncIterableIterator; +/** @ignore */ export declare const toUint8ArrayAsyncIterator: (input: ArrayBufferViewAsyncIteratorInput) => AsyncIterableIterator; +/** @ignore */ export declare const toUint16ArrayAsyncIterator: (input: ArrayBufferViewAsyncIteratorInput) => AsyncIterableIterator; +/** @ignore */ export declare const toUint32ArrayAsyncIterator: (input: ArrayBufferViewAsyncIteratorInput) => AsyncIterableIterator; +/** @ignore */ export declare const toFloat32ArrayAsyncIterator: (input: ArrayBufferViewAsyncIteratorInput) => AsyncIterableIterator; +/** @ignore */ export declare const toFloat64ArrayAsyncIterator: (input: ArrayBufferViewAsyncIteratorInput) => AsyncIterableIterator; +/** @ignore */ export declare const toUint8ClampedArrayAsyncIterator: (input: ArrayBufferViewAsyncIteratorInput) => AsyncIterableIterator; +/** @ignore */ +export declare function rebaseValueOffsets(offset: number, length: number, valueOffsets: Int32Array): Int32Array; +/** @ignore */ +export declare function compareArrayLike>(a: T, b: T): boolean; +export {}; diff --git a/frontend/node_modules/apache-arrow/util/buffer.js b/frontend/node_modules/apache-arrow/util/buffer.js new file mode 100644 index 0000000000000000000000000000000000000000..86139f3acf538f3017d4ae4636842653c0acb979 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/buffer.js @@ -0,0 +1,221 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const flatbuffers_1 = require("flatbuffers"); +const utf8_1 = require("../util/utf8"); +var ByteBuffer = flatbuffers_1.flatbuffers.ByteBuffer; +const compat_1 = require("./compat"); +/** @ignore */ +const SharedArrayBuf = (typeof SharedArrayBuffer !== 'undefined' ? SharedArrayBuffer : ArrayBuffer); +/** @ignore */ +function collapseContiguousByteRanges(chunks) { + let result = chunks[0] ? [chunks[0]] : []; + let xOffset, yOffset, xLen, yLen; + for (let x, y, i = 0, j = 0, n = chunks.length; ++i < n;) { + x = result[j]; + y = chunks[i]; + // continue if x and y don't share the same underlying ArrayBuffer, or if x isn't before y + if (!x || !y || x.buffer !== y.buffer || y.byteOffset < x.byteOffset) { + y && (result[++j] = y); + continue; + } + ({ byteOffset: xOffset, byteLength: xLen } = x); + ({ byteOffset: yOffset, byteLength: yLen } = y); + // continue if the byte ranges of x and y aren't contiguous + if ((xOffset + xLen) < yOffset || (yOffset + yLen) < xOffset) { + y && (result[++j] = y); + continue; + } + result[j] = new Uint8Array(x.buffer, xOffset, yOffset - xOffset + yLen); + } + return result; +} +/** @ignore */ +function memcpy(target, source, targetByteOffset = 0, sourceByteLength = source.byteLength) { + const targetByteLength = target.byteLength; + const dst = new Uint8Array(target.buffer, target.byteOffset, targetByteLength); + const src = new Uint8Array(source.buffer, source.byteOffset, Math.min(sourceByteLength, targetByteLength)); + dst.set(src, targetByteOffset); + return target; +} +exports.memcpy = memcpy; +/** @ignore */ +function joinUint8Arrays(chunks, size) { + // collapse chunks that share the same underlying ArrayBuffer and whose byte ranges overlap, + // to avoid unnecessarily copying the bytes to do this buffer join. This is a common case during + // streaming, where we may be reading partial byte ranges out of the same underlying ArrayBuffer + let result = collapseContiguousByteRanges(chunks); + let byteLength = result.reduce((x, b) => x + b.byteLength, 0); + let source, sliced, buffer; + let offset = 0, index = -1, length = Math.min(size || Infinity, byteLength); + for (let n = result.length; ++index < n;) { + source = result[index]; + sliced = source.subarray(0, Math.min(source.length, length - offset)); + if (length <= (offset + sliced.length)) { + if (sliced.length < source.length) { + result[index] = source.subarray(sliced.length); + } + else if (sliced.length === source.length) { + index++; + } + buffer ? memcpy(buffer, sliced, offset) : (buffer = sliced); + break; + } + memcpy(buffer || (buffer = new Uint8Array(length)), sliced, offset); + offset += sliced.length; + } + return [buffer || new Uint8Array(0), result.slice(index), byteLength - (buffer ? buffer.byteLength : 0)]; +} +exports.joinUint8Arrays = joinUint8Arrays; +function toArrayBufferView(ArrayBufferViewCtor, input) { + let value = compat_1.isIteratorResult(input) ? input.value : input; + if (value instanceof ArrayBufferViewCtor) { + if (ArrayBufferViewCtor === Uint8Array) { + // Node's `Buffer` class passes the `instanceof Uint8Array` check, but we need + // a real Uint8Array, since Buffer#slice isn't the same as Uint8Array#slice :/ + return new ArrayBufferViewCtor(value.buffer, value.byteOffset, value.byteLength); + } + return value; + } + if (!value) { + return new ArrayBufferViewCtor(0); + } + if (typeof value === 'string') { + value = utf8_1.encodeUtf8(value); + } + if (value instanceof ArrayBuffer) { + return new ArrayBufferViewCtor(value); + } + if (value instanceof SharedArrayBuf) { + return new ArrayBufferViewCtor(value); + } + if (value instanceof ByteBuffer) { + return toArrayBufferView(ArrayBufferViewCtor, value.bytes()); + } + return !ArrayBuffer.isView(value) ? ArrayBufferViewCtor.from(value) : value.byteLength <= 0 ? new ArrayBufferViewCtor(0) + : new ArrayBufferViewCtor(value.buffer, value.byteOffset, value.byteLength / ArrayBufferViewCtor.BYTES_PER_ELEMENT); +} +exports.toArrayBufferView = toArrayBufferView; +/** @ignore */ exports.toInt8Array = (input) => toArrayBufferView(Int8Array, input); +/** @ignore */ exports.toInt16Array = (input) => toArrayBufferView(Int16Array, input); +/** @ignore */ exports.toInt32Array = (input) => toArrayBufferView(Int32Array, input); +/** @ignore */ exports.toBigInt64Array = (input) => toArrayBufferView(compat_1.BigInt64Array, input); +/** @ignore */ exports.toUint8Array = (input) => toArrayBufferView(Uint8Array, input); +/** @ignore */ exports.toUint16Array = (input) => toArrayBufferView(Uint16Array, input); +/** @ignore */ exports.toUint32Array = (input) => toArrayBufferView(Uint32Array, input); +/** @ignore */ exports.toBigUint64Array = (input) => toArrayBufferView(compat_1.BigUint64Array, input); +/** @ignore */ exports.toFloat32Array = (input) => toArrayBufferView(Float32Array, input); +/** @ignore */ exports.toFloat64Array = (input) => toArrayBufferView(Float64Array, input); +/** @ignore */ exports.toUint8ClampedArray = (input) => toArrayBufferView(Uint8ClampedArray, input); +/** @ignore */ +const pump = (iterator) => { iterator.next(); return iterator; }; +/** @ignore */ +function* toArrayBufferViewIterator(ArrayCtor, source) { + const wrap = function* (x) { yield x; }; + const buffers = (typeof source === 'string') ? wrap(source) + : (ArrayBuffer.isView(source)) ? wrap(source) + : (source instanceof ArrayBuffer) ? wrap(source) + : (source instanceof SharedArrayBuf) ? wrap(source) + : !compat_1.isIterable(source) ? wrap(source) : source; + yield* pump((function* (it) { + let r = null; + do { + r = it.next(yield toArrayBufferView(ArrayCtor, r)); + } while (!r.done); + })(buffers[Symbol.iterator]())); +} +exports.toArrayBufferViewIterator = toArrayBufferViewIterator; +/** @ignore */ exports.toInt8ArrayIterator = (input) => toArrayBufferViewIterator(Int8Array, input); +/** @ignore */ exports.toInt16ArrayIterator = (input) => toArrayBufferViewIterator(Int16Array, input); +/** @ignore */ exports.toInt32ArrayIterator = (input) => toArrayBufferViewIterator(Int32Array, input); +/** @ignore */ exports.toUint8ArrayIterator = (input) => toArrayBufferViewIterator(Uint8Array, input); +/** @ignore */ exports.toUint16ArrayIterator = (input) => toArrayBufferViewIterator(Uint16Array, input); +/** @ignore */ exports.toUint32ArrayIterator = (input) => toArrayBufferViewIterator(Uint32Array, input); +/** @ignore */ exports.toFloat32ArrayIterator = (input) => toArrayBufferViewIterator(Float32Array, input); +/** @ignore */ exports.toFloat64ArrayIterator = (input) => toArrayBufferViewIterator(Float64Array, input); +/** @ignore */ exports.toUint8ClampedArrayIterator = (input) => toArrayBufferViewIterator(Uint8ClampedArray, input); +/** @ignore */ +async function* toArrayBufferViewAsyncIterator(ArrayCtor, source) { + // if a Promise, unwrap the Promise and iterate the resolved value + if (compat_1.isPromise(source)) { + return yield* toArrayBufferViewAsyncIterator(ArrayCtor, await source); + } + const wrap = async function* (x) { yield await x; }; + const emit = async function* (source) { + yield* pump((function* (it) { + let r = null; + do { + r = it.next(yield r && r.value); + } while (!r.done); + })(source[Symbol.iterator]())); + }; + const buffers = (typeof source === 'string') ? wrap(source) // if string, wrap in an AsyncIterableIterator + : (ArrayBuffer.isView(source)) ? wrap(source) // if TypedArray, wrap in an AsyncIterableIterator + : (source instanceof ArrayBuffer) ? wrap(source) // if ArrayBuffer, wrap in an AsyncIterableIterator + : (source instanceof SharedArrayBuf) ? wrap(source) // if SharedArrayBuffer, wrap in an AsyncIterableIterator + : compat_1.isIterable(source) ? emit(source) // If Iterable, wrap in an AsyncIterableIterator and compose the `next` values + : !compat_1.isAsyncIterable(source) ? wrap(source) // If not an AsyncIterable, treat as a sentinel and wrap in an AsyncIterableIterator + : source; // otherwise if AsyncIterable, use it + yield* pump((async function* (it) { + let r = null; + do { + r = await it.next(yield toArrayBufferView(ArrayCtor, r)); + } while (!r.done); + })(buffers[Symbol.asyncIterator]())); +} +exports.toArrayBufferViewAsyncIterator = toArrayBufferViewAsyncIterator; +/** @ignore */ exports.toInt8ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Int8Array, input); +/** @ignore */ exports.toInt16ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Int16Array, input); +/** @ignore */ exports.toInt32ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Int32Array, input); +/** @ignore */ exports.toUint8ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Uint8Array, input); +/** @ignore */ exports.toUint16ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Uint16Array, input); +/** @ignore */ exports.toUint32ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Uint32Array, input); +/** @ignore */ exports.toFloat32ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Float32Array, input); +/** @ignore */ exports.toFloat64ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Float64Array, input); +/** @ignore */ exports.toUint8ClampedArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Uint8ClampedArray, input); +/** @ignore */ +function rebaseValueOffsets(offset, length, valueOffsets) { + // If we have a non-zero offset, create a new offsets array with the values + // shifted by the start offset, such that the new start offset is 0 + if (offset !== 0) { + valueOffsets = valueOffsets.slice(0, length + 1); + for (let i = -1; ++i <= length;) { + valueOffsets[i] += offset; + } + } + return valueOffsets; +} +exports.rebaseValueOffsets = rebaseValueOffsets; +/** @ignore */ +function compareArrayLike(a, b) { + let i = 0, n = a.length; + if (n !== b.length) { + return false; + } + if (n > 0) { + do { + if (a[i] !== b[i]) { + return false; + } + } while (++i < n); + } + return true; +} +exports.compareArrayLike = compareArrayLike; + +//# sourceMappingURL=buffer.js.map diff --git a/frontend/node_modules/apache-arrow/util/buffer.js.map b/frontend/node_modules/apache-arrow/util/buffer.js.map new file mode 100644 index 0000000000000000000000000000000000000000..3e8592c485c3b2b188b9c14561dc4fa3e241bd12 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/buffer.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["util/buffer.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,6CAA0C;AAC1C,uCAA0C;AAC1C,IAAO,UAAU,GAAG,yBAAW,CAAC,UAAU,CAAC;AAG3C,qCAAmH;AAEnH,cAAc;AACd,MAAM,cAAc,GAAG,CAAC,OAAO,iBAAiB,KAAK,WAAW,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;AAEpG,cAAc;AACd,SAAS,4BAA4B,CAAC,MAAoB;IACtD,IAAI,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC1C,IAAI,OAAe,EAAE,OAAe,EAAE,IAAY,EAAE,IAAY,CAAC;IACjE,KAAK,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,E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IAAI,MAAM,GAAG;YAC7B,YAAY,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC;SAC7B;KACJ;IACD,OAAO,YAAY,CAAC;AACxB,CAAC;AAVD,gDAUC;AAED,cAAc;AACd,SAAgB,gBAAgB,CAA2B,CAAI,EAAE,CAAI;IACjE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;IACxB,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE;QAAE,OAAO,KAAK,CAAC;KAAE;IACrC,IAAI,CAAC,GAAG,CAAC,EAAE;QACP,GAAG;YAAE,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;gBAAE,OAAO,KAAK,CAAC;aAAE;SAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,EAAE;KAC/D;IACD,OAAO,IAAI,CAAC;AAChB,CAAC;AAPD,4CAOC","file":"buffer.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { flatbuffers } from 'flatbuffers';\nimport { encodeUtf8 } from '../util/utf8';\nimport ByteBuffer = flatbuffers.ByteBuffer;\nimport { TypedArray, TypedArrayConstructor } from '../interfaces';\nimport { BigIntArray, BigIntArrayConstructor } from '../interfaces';\nimport { isPromise, isIterable, isAsyncIterable, isIteratorResult, BigInt64Array, BigUint64Array } from './compat';\n\n/** @ignore */\nconst SharedArrayBuf = (typeof SharedArrayBuffer !== 'undefined' ? SharedArrayBuffer : ArrayBuffer);\n\n/** @ignore */\nfunction collapseContiguousByteRanges(chunks: Uint8Array[]) {\n let result = chunks[0] ? [chunks[0]] : [];\n let xOffset: number, yOffset: number, xLen: number, yLen: number;\n for (let x, y, i = 0, j = 0, n = chunks.length; ++i < n;) {\n x = result[j];\n y = chunks[i];\n // continue if x and y don't share the same underlying ArrayBuffer, or if x isn't before y\n if (!x || !y || x.buffer !== y.buffer || y.byteOffset < x.byteOffset) {\n y && (result[++j] = y);\n continue;\n }\n ({ byteOffset: xOffset, byteLength: xLen } = x);\n ({ byteOffset: yOffset, byteLength: yLen } = y);\n // continue if the byte ranges of x and y aren't contiguous\n if ((xOffset + xLen) < yOffset || (yOffset + yLen) < xOffset) {\n y && (result[++j] = y);\n continue;\n }\n result[j] = new Uint8Array(x.buffer, xOffset, yOffset - xOffset + yLen);\n }\n return result;\n}\n\n/** @ignore */\nexport function memcpy(target: TTarget, source: TSource, targetByteOffset = 0, sourceByteLength = source.byteLength) {\n const targetByteLength = target.byteLength;\n const dst = new Uint8Array(target.buffer, target.byteOffset, targetByteLength);\n const src = new Uint8Array(source.buffer, source.byteOffset, Math.min(sourceByteLength, targetByteLength));\n dst.set(src, targetByteOffset);\n return target;\n}\n\n/** @ignore */\nexport function joinUint8Arrays(chunks: Uint8Array[], size?: number | null): [Uint8Array, Uint8Array[], number] {\n // collapse chunks that share the same underlying ArrayBuffer and whose byte ranges overlap,\n // to avoid unnecessarily copying the bytes to do this buffer join. This is a common case during\n // streaming, where we may be reading partial byte ranges out of the same underlying ArrayBuffer\n let result = collapseContiguousByteRanges(chunks);\n let byteLength = result.reduce((x, b) => x + b.byteLength, 0);\n let source: Uint8Array, sliced: Uint8Array, buffer: Uint8Array | void;\n let offset = 0, index = -1, length = Math.min(size || Infinity, byteLength);\n for (let n = result.length; ++index < n;) {\n source = result[index];\n sliced = source.subarray(0, Math.min(source.length, length - offset));\n if (length <= (offset + sliced.length)) {\n if (sliced.length < source.length) {\n result[index] = source.subarray(sliced.length);\n } else if (sliced.length === source.length) { index++; }\n buffer ? memcpy(buffer, sliced, offset) : (buffer = sliced);\n break;\n }\n memcpy(buffer || (buffer = new Uint8Array(length)), sliced, offset);\n offset += sliced.length;\n }\n return [buffer || new Uint8Array(0), result.slice(index), byteLength - (buffer ? buffer.byteLength : 0)];\n}\n\n/** @ignore */\nexport type ArrayBufferViewInput = ArrayBufferView | ArrayBufferLike | ArrayBufferView | Iterable | ArrayLike | ByteBuffer | string | null | undefined |\n IteratorResult | ArrayLike | ByteBuffer | string | null | undefined> |\n ReadableStreamReadResult | ArrayLike | ByteBuffer | string | null | undefined> ;\n\n/** @ignore */\nexport function toArrayBufferView(ArrayBufferViewCtor: TypedArrayConstructor, input: ArrayBufferViewInput): T;\nexport function toArrayBufferView(ArrayBufferViewCtor: BigIntArrayConstructor, input: ArrayBufferViewInput): T;\nexport function toArrayBufferView(ArrayBufferViewCtor: any, input: ArrayBufferViewInput) {\n\n let value: any = isIteratorResult(input) ? input.value : input;\n\n if (value instanceof ArrayBufferViewCtor) {\n if (ArrayBufferViewCtor === Uint8Array) {\n // Node's `Buffer` class passes the `instanceof Uint8Array` check, but we need\n // a real Uint8Array, since Buffer#slice isn't the same as Uint8Array#slice :/\n return new ArrayBufferViewCtor(value.buffer, value.byteOffset, value.byteLength);\n }\n return value;\n }\n if (!value) { return new ArrayBufferViewCtor(0); }\n if (typeof value === 'string') { value = encodeUtf8(value); }\n if (value instanceof ArrayBuffer) { return new ArrayBufferViewCtor(value); }\n if (value instanceof SharedArrayBuf) { return new ArrayBufferViewCtor(value); }\n if (value instanceof ByteBuffer) { return toArrayBufferView(ArrayBufferViewCtor, value.bytes()); }\n return !ArrayBuffer.isView(value) ? ArrayBufferViewCtor.from(value) : value.byteLength <= 0 ? new ArrayBufferViewCtor(0)\n : new ArrayBufferViewCtor(value.buffer, value.byteOffset, value.byteLength / ArrayBufferViewCtor.BYTES_PER_ELEMENT);\n}\n\n/** @ignore */ export const toInt8Array = (input: ArrayBufferViewInput) => toArrayBufferView(Int8Array, input);\n/** @ignore */ export const toInt16Array = (input: ArrayBufferViewInput) => toArrayBufferView(Int16Array, input);\n/** @ignore */ export const toInt32Array = (input: ArrayBufferViewInput) => toArrayBufferView(Int32Array, input);\n/** @ignore */ export const toBigInt64Array = (input: ArrayBufferViewInput) => toArrayBufferView(BigInt64Array, input);\n/** @ignore */ export const toUint8Array = (input: ArrayBufferViewInput) => toArrayBufferView(Uint8Array, input);\n/** @ignore */ export const toUint16Array = (input: ArrayBufferViewInput) => toArrayBufferView(Uint16Array, input);\n/** @ignore */ export const toUint32Array = (input: ArrayBufferViewInput) => toArrayBufferView(Uint32Array, input);\n/** @ignore */ export const toBigUint64Array = (input: ArrayBufferViewInput) => toArrayBufferView(BigUint64Array, input);\n/** @ignore */ export const toFloat32Array = (input: ArrayBufferViewInput) => toArrayBufferView(Float32Array, input);\n/** @ignore */ export const toFloat64Array = (input: ArrayBufferViewInput) => toArrayBufferView(Float64Array, input);\n/** @ignore */ export const toUint8ClampedArray = (input: ArrayBufferViewInput) => toArrayBufferView(Uint8ClampedArray, input);\n\n/** @ignore */\ntype ArrayBufferViewIteratorInput = Iterable | ArrayBufferViewInput;\n\n/** @ignore */\nconst pump = | AsyncIterator>(iterator: T) => { iterator.next(); return iterator; };\n\n/** @ignore */\nexport function* toArrayBufferViewIterator(ArrayCtor: TypedArrayConstructor, source: ArrayBufferViewIteratorInput) {\n\n const wrap = function*(x: T) { yield x; };\n const buffers: Iterable =\n (typeof source === 'string') ? wrap(source)\n : (ArrayBuffer.isView(source)) ? wrap(source)\n : (source instanceof ArrayBuffer) ? wrap(source)\n : (source instanceof SharedArrayBuf) ? wrap(source)\n : !isIterable(source) ? wrap(source) : source;\n\n yield* pump((function* (it) {\n let r: IteratorResult = null;\n do {\n r = it.next(yield toArrayBufferView(ArrayCtor, r));\n } while (!r.done);\n })(buffers[Symbol.iterator]()));\n}\n\n/** @ignore */ export const toInt8ArrayIterator = (input: ArrayBufferViewIteratorInput) => toArrayBufferViewIterator(Int8Array, input);\n/** @ignore */ export const toInt16ArrayIterator = (input: ArrayBufferViewIteratorInput) => toArrayBufferViewIterator(Int16Array, input);\n/** @ignore */ export const toInt32ArrayIterator = (input: ArrayBufferViewIteratorInput) => toArrayBufferViewIterator(Int32Array, input);\n/** @ignore */ export const toUint8ArrayIterator = (input: ArrayBufferViewIteratorInput) => toArrayBufferViewIterator(Uint8Array, input);\n/** @ignore */ export const toUint16ArrayIterator = (input: ArrayBufferViewIteratorInput) => toArrayBufferViewIterator(Uint16Array, input);\n/** @ignore */ export const toUint32ArrayIterator = (input: ArrayBufferViewIteratorInput) => toArrayBufferViewIterator(Uint32Array, input);\n/** @ignore */ export const toFloat32ArrayIterator = (input: ArrayBufferViewIteratorInput) => toArrayBufferViewIterator(Float32Array, input);\n/** @ignore */ export const toFloat64ArrayIterator = (input: ArrayBufferViewIteratorInput) => toArrayBufferViewIterator(Float64Array, input);\n/** @ignore */ export const toUint8ClampedArrayIterator = (input: ArrayBufferViewIteratorInput) => toArrayBufferViewIterator(Uint8ClampedArray, input);\n\n/** @ignore */\ntype ArrayBufferViewAsyncIteratorInput = AsyncIterable | Iterable | PromiseLike | ArrayBufferViewInput;\n\n/** @ignore */\nexport async function* toArrayBufferViewAsyncIterator(ArrayCtor: TypedArrayConstructor, source: ArrayBufferViewAsyncIteratorInput): AsyncIterableIterator {\n\n // if a Promise, unwrap the Promise and iterate the resolved value\n if (isPromise(source)) {\n return yield* toArrayBufferViewAsyncIterator(ArrayCtor, await source);\n }\n\n const wrap = async function*(x: T) { yield await x; };\n const emit = async function* >(source: T) {\n yield* pump((function*(it: Iterator) {\n let r: IteratorResult = null;\n do {\n r = it.next(yield r && r.value);\n } while (!r.done);\n })(source[Symbol.iterator]()));\n };\n\n const buffers: AsyncIterable =\n (typeof source === 'string') ? wrap(source) // if string, wrap in an AsyncIterableIterator\n : (ArrayBuffer.isView(source)) ? wrap(source) // if TypedArray, wrap in an AsyncIterableIterator\n : (source instanceof ArrayBuffer) ? wrap(source) // if ArrayBuffer, wrap in an AsyncIterableIterator\n : (source instanceof SharedArrayBuf) ? wrap(source) // if SharedArrayBuffer, wrap in an AsyncIterableIterator\n : isIterable(source) ? emit(source) // If Iterable, wrap in an AsyncIterableIterator and compose the `next` values\n : !isAsyncIterable(source) ? wrap(source) // If not an AsyncIterable, treat as a sentinel and wrap in an AsyncIterableIterator\n : source; // otherwise if AsyncIterable, use it\n\n yield* pump((async function* (it) {\n let r: IteratorResult = null;\n do {\n r = await it.next(yield toArrayBufferView(ArrayCtor, r));\n } while (!r.done);\n })(buffers[Symbol.asyncIterator]()));\n}\n\n/** @ignore */ export const toInt8ArrayAsyncIterator = (input: ArrayBufferViewAsyncIteratorInput) => toArrayBufferViewAsyncIterator(Int8Array, input);\n/** @ignore */ export const toInt16ArrayAsyncIterator = (input: ArrayBufferViewAsyncIteratorInput) => toArrayBufferViewAsyncIterator(Int16Array, input);\n/** @ignore */ export const toInt32ArrayAsyncIterator = (input: ArrayBufferViewAsyncIteratorInput) => toArrayBufferViewAsyncIterator(Int32Array, input);\n/** @ignore */ export const toUint8ArrayAsyncIterator = (input: ArrayBufferViewAsyncIteratorInput) => toArrayBufferViewAsyncIterator(Uint8Array, input);\n/** @ignore */ export const toUint16ArrayAsyncIterator = (input: ArrayBufferViewAsyncIteratorInput) => toArrayBufferViewAsyncIterator(Uint16Array, input);\n/** @ignore */ export const toUint32ArrayAsyncIterator = (input: ArrayBufferViewAsyncIteratorInput) => toArrayBufferViewAsyncIterator(Uint32Array, input);\n/** @ignore */ export const toFloat32ArrayAsyncIterator = (input: ArrayBufferViewAsyncIteratorInput) => toArrayBufferViewAsyncIterator(Float32Array, input);\n/** @ignore */ export const toFloat64ArrayAsyncIterator = (input: ArrayBufferViewAsyncIteratorInput) => toArrayBufferViewAsyncIterator(Float64Array, input);\n/** @ignore */ export const toUint8ClampedArrayAsyncIterator = (input: ArrayBufferViewAsyncIteratorInput) => toArrayBufferViewAsyncIterator(Uint8ClampedArray, input);\n\n/** @ignore */\nexport function rebaseValueOffsets(offset: number, length: number, valueOffsets: Int32Array) {\n // If we have a non-zero offset, create a new offsets array with the values\n // shifted by the start offset, such that the new start offset is 0\n if (offset !== 0) {\n valueOffsets = valueOffsets.slice(0, length + 1);\n for (let i = -1; ++i <= length;) {\n valueOffsets[i] += offset;\n }\n }\n return valueOffsets;\n}\n\n/** @ignore */\nexport function compareArrayLike>(a: T, b: T) {\n let i = 0, n = a.length;\n if (n !== b.length) { return false; }\n if (n > 0) {\n do { if (a[i] !== b[i]) { return false; } } while (++i < n);\n }\n return true;\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/util/buffer.mjs b/frontend/node_modules/apache-arrow/util/buffer.mjs new file mode 100644 index 0000000000000000000000000000000000000000..936b21c812e876e4d30cf0dcfd1ce7d139ff80d8 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/buffer.mjs @@ -0,0 +1,212 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { flatbuffers } from 'flatbuffers'; +import { encodeUtf8 } from '../util/utf8'; +var ByteBuffer = flatbuffers.ByteBuffer; +import { isPromise, isIterable, isAsyncIterable, isIteratorResult, BigInt64Array, BigUint64Array } from './compat'; +/** @ignore */ +const SharedArrayBuf = (typeof SharedArrayBuffer !== 'undefined' ? SharedArrayBuffer : ArrayBuffer); +/** @ignore */ +function collapseContiguousByteRanges(chunks) { + let result = chunks[0] ? [chunks[0]] : []; + let xOffset, yOffset, xLen, yLen; + for (let x, y, i = 0, j = 0, n = chunks.length; ++i < n;) { + x = result[j]; + y = chunks[i]; + // continue if x and y don't share the same underlying ArrayBuffer, or if x isn't before y + if (!x || !y || x.buffer !== y.buffer || y.byteOffset < x.byteOffset) { + y && (result[++j] = y); + continue; + } + ({ byteOffset: xOffset, byteLength: xLen } = x); + ({ byteOffset: yOffset, byteLength: yLen } = y); + // continue if the byte ranges of x and y aren't contiguous + if ((xOffset + xLen) < yOffset || (yOffset + yLen) < xOffset) { + y && (result[++j] = y); + continue; + } + result[j] = new Uint8Array(x.buffer, xOffset, yOffset - xOffset + yLen); + } + return result; +} +/** @ignore */ +export function memcpy(target, source, targetByteOffset = 0, sourceByteLength = source.byteLength) { + const targetByteLength = target.byteLength; + const dst = new Uint8Array(target.buffer, target.byteOffset, targetByteLength); + const src = new Uint8Array(source.buffer, source.byteOffset, Math.min(sourceByteLength, targetByteLength)); + dst.set(src, targetByteOffset); + return target; +} +/** @ignore */ +export function joinUint8Arrays(chunks, size) { + // collapse chunks that share the same underlying ArrayBuffer and whose byte ranges overlap, + // to avoid unnecessarily copying the bytes to do this buffer join. This is a common case during + // streaming, where we may be reading partial byte ranges out of the same underlying ArrayBuffer + let result = collapseContiguousByteRanges(chunks); + let byteLength = result.reduce((x, b) => x + b.byteLength, 0); + let source, sliced, buffer; + let offset = 0, index = -1, length = Math.min(size || Infinity, byteLength); + for (let n = result.length; ++index < n;) { + source = result[index]; + sliced = source.subarray(0, Math.min(source.length, length - offset)); + if (length <= (offset + sliced.length)) { + if (sliced.length < source.length) { + result[index] = source.subarray(sliced.length); + } + else if (sliced.length === source.length) { + index++; + } + buffer ? memcpy(buffer, sliced, offset) : (buffer = sliced); + break; + } + memcpy(buffer || (buffer = new Uint8Array(length)), sliced, offset); + offset += sliced.length; + } + return [buffer || new Uint8Array(0), result.slice(index), byteLength - (buffer ? buffer.byteLength : 0)]; +} +export function toArrayBufferView(ArrayBufferViewCtor, input) { + let value = isIteratorResult(input) ? input.value : input; + if (value instanceof ArrayBufferViewCtor) { + if (ArrayBufferViewCtor === Uint8Array) { + // Node's `Buffer` class passes the `instanceof Uint8Array` check, but we need + // a real Uint8Array, since Buffer#slice isn't the same as Uint8Array#slice :/ + return new ArrayBufferViewCtor(value.buffer, value.byteOffset, value.byteLength); + } + return value; + } + if (!value) { + return new ArrayBufferViewCtor(0); + } + if (typeof value === 'string') { + value = encodeUtf8(value); + } + if (value instanceof ArrayBuffer) { + return new ArrayBufferViewCtor(value); + } + if (value instanceof SharedArrayBuf) { + return new ArrayBufferViewCtor(value); + } + if (value instanceof ByteBuffer) { + return toArrayBufferView(ArrayBufferViewCtor, value.bytes()); + } + return !ArrayBuffer.isView(value) ? ArrayBufferViewCtor.from(value) : value.byteLength <= 0 ? new ArrayBufferViewCtor(0) + : new ArrayBufferViewCtor(value.buffer, value.byteOffset, value.byteLength / ArrayBufferViewCtor.BYTES_PER_ELEMENT); +} +/** @ignore */ export const toInt8Array = (input) => toArrayBufferView(Int8Array, input); +/** @ignore */ export const toInt16Array = (input) => toArrayBufferView(Int16Array, input); +/** @ignore */ export const toInt32Array = (input) => toArrayBufferView(Int32Array, input); +/** @ignore */ export const toBigInt64Array = (input) => toArrayBufferView(BigInt64Array, input); +/** @ignore */ export const toUint8Array = (input) => toArrayBufferView(Uint8Array, input); +/** @ignore */ export const toUint16Array = (input) => toArrayBufferView(Uint16Array, input); +/** @ignore */ export const toUint32Array = (input) => toArrayBufferView(Uint32Array, input); +/** @ignore */ export const toBigUint64Array = (input) => toArrayBufferView(BigUint64Array, input); +/** @ignore */ export const toFloat32Array = (input) => toArrayBufferView(Float32Array, input); +/** @ignore */ export const toFloat64Array = (input) => toArrayBufferView(Float64Array, input); +/** @ignore */ export const toUint8ClampedArray = (input) => toArrayBufferView(Uint8ClampedArray, input); +/** @ignore */ +const pump = (iterator) => { iterator.next(); return iterator; }; +/** @ignore */ +export function* toArrayBufferViewIterator(ArrayCtor, source) { + const wrap = function* (x) { yield x; }; + const buffers = (typeof source === 'string') ? wrap(source) + : (ArrayBuffer.isView(source)) ? wrap(source) + : (source instanceof ArrayBuffer) ? wrap(source) + : (source instanceof SharedArrayBuf) ? wrap(source) + : !isIterable(source) ? wrap(source) : source; + yield* pump((function* (it) { + let r = null; + do { + r = it.next(yield toArrayBufferView(ArrayCtor, r)); + } while (!r.done); + })(buffers[Symbol.iterator]())); +} +/** @ignore */ export const toInt8ArrayIterator = (input) => toArrayBufferViewIterator(Int8Array, input); +/** @ignore */ export const toInt16ArrayIterator = (input) => toArrayBufferViewIterator(Int16Array, input); +/** @ignore */ export const toInt32ArrayIterator = (input) => toArrayBufferViewIterator(Int32Array, input); +/** @ignore */ export const toUint8ArrayIterator = (input) => toArrayBufferViewIterator(Uint8Array, input); +/** @ignore */ export const toUint16ArrayIterator = (input) => toArrayBufferViewIterator(Uint16Array, input); +/** @ignore */ export const toUint32ArrayIterator = (input) => toArrayBufferViewIterator(Uint32Array, input); +/** @ignore */ export const toFloat32ArrayIterator = (input) => toArrayBufferViewIterator(Float32Array, input); +/** @ignore */ export const toFloat64ArrayIterator = (input) => toArrayBufferViewIterator(Float64Array, input); +/** @ignore */ export const toUint8ClampedArrayIterator = (input) => toArrayBufferViewIterator(Uint8ClampedArray, input); +/** @ignore */ +export async function* toArrayBufferViewAsyncIterator(ArrayCtor, source) { + // if a Promise, unwrap the Promise and iterate the resolved value + if (isPromise(source)) { + return yield* toArrayBufferViewAsyncIterator(ArrayCtor, await source); + } + const wrap = async function* (x) { yield await x; }; + const emit = async function* (source) { + yield* pump((function* (it) { + let r = null; + do { + r = it.next(yield r && r.value); + } while (!r.done); + })(source[Symbol.iterator]())); + }; + const buffers = (typeof source === 'string') ? wrap(source) // if string, wrap in an AsyncIterableIterator + : (ArrayBuffer.isView(source)) ? wrap(source) // if TypedArray, wrap in an AsyncIterableIterator + : (source instanceof ArrayBuffer) ? wrap(source) // if ArrayBuffer, wrap in an AsyncIterableIterator + : (source instanceof SharedArrayBuf) ? wrap(source) // if SharedArrayBuffer, wrap in an AsyncIterableIterator + : isIterable(source) ? emit(source) // If Iterable, wrap in an AsyncIterableIterator and compose the `next` values + : !isAsyncIterable(source) ? wrap(source) // If not an AsyncIterable, treat as a sentinel and wrap in an AsyncIterableIterator + : source; // otherwise if AsyncIterable, use it + yield* pump((async function* (it) { + let r = null; + do { + r = await it.next(yield toArrayBufferView(ArrayCtor, r)); + } while (!r.done); + })(buffers[Symbol.asyncIterator]())); +} +/** @ignore */ export const toInt8ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Int8Array, input); +/** @ignore */ export const toInt16ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Int16Array, input); +/** @ignore */ export const toInt32ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Int32Array, input); +/** @ignore */ export const toUint8ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Uint8Array, input); +/** @ignore */ export const toUint16ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Uint16Array, input); +/** @ignore */ export const toUint32ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Uint32Array, input); +/** @ignore */ export const toFloat32ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Float32Array, input); +/** @ignore */ export const toFloat64ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Float64Array, input); +/** @ignore */ export const toUint8ClampedArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Uint8ClampedArray, input); +/** @ignore */ +export function rebaseValueOffsets(offset, length, valueOffsets) { + // If we have a non-zero offset, create a new offsets array with the values + // shifted by the start offset, such that the new start offset is 0 + if (offset !== 0) { + valueOffsets = valueOffsets.slice(0, length + 1); + for (let i = -1; ++i <= length;) { + valueOffsets[i] += offset; + } + } + return valueOffsets; +} +/** @ignore */ +export function compareArrayLike(a, b) { + let i = 0, n = a.length; + if (n !== b.length) { + return false; + } + if (n > 0) { + do { + if (a[i] !== b[i]) { + return false; + } + } while (++i < n); + } + return true; +} + +//# sourceMappingURL=buffer.mjs.map diff --git a/frontend/node_modules/apache-arrow/util/buffer.mjs.map b/frontend/node_modules/apache-arrow/util/buffer.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..5bd86f8e83621345e4b1b05c72098c94e26498d1 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/buffer.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["util/buffer.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,IAAO,UAAU,GAAG,WAAW,CAAC,UAAU,CAAC;AAG3C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEnH,cAAc;AACd,MAAM,cAAc,GAAG,CAAC,OAAO,iBAAiB,KAAK,WAAW,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;AAEpG,cAAc;AACd,SAAS,4BAA4B,CAAC,MAAoB;IACtD,IAAI,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC1C,IAAI,OAAe,EAAE,OAAe,EAAE,IAAY,EAAE,IAAY,CAAC;IACjE,KAAK,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CA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8BAA8B,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;AAEtK,cAAc;AACd,MAAM,UAAU,kBAAkB,CAAC,MAAc,EAAE,MAAc,EAAE,YAAwB;IACvF,2EAA2E;IAC3E,mEAAmE;IACnE,IAAI,MAAM,KAAK,CAAC,EAAE;QACd,YAAY,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC;QACjD,KAAK,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,MAAM,GAAG;YAC7B,YAAY,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC;SAC7B;KACJ;IACD,OAAO,YAAY,CAAC;AACxB,CAAC;AAED,cAAc;AACd,MAAM,UAAU,gBAAgB,CAA2B,CAAI,EAAE,CAAI;IACjE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;IACxB,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE;QAAE,OAAO,KAAK,CAAC;KAAE;IACrC,IAAI,CAAC,GAAG,CAAC,EAAE;QACP,GAAG;YAAE,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;gBAAE,OAAO,KAAK,CAAC;aAAE;SAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,EAAE;KAC/D;IACD,OAAO,IAAI,CAAC;AAChB,CAAC","file":"buffer.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { flatbuffers } from 'flatbuffers';\nimport { encodeUtf8 } from '../util/utf8';\nimport ByteBuffer = flatbuffers.ByteBuffer;\nimport { TypedArray, TypedArrayConstructor } from '../interfaces';\nimport { BigIntArray, BigIntArrayConstructor } from '../interfaces';\nimport { isPromise, isIterable, isAsyncIterable, isIteratorResult, BigInt64Array, BigUint64Array } from './compat';\n\n/** @ignore */\nconst SharedArrayBuf = (typeof SharedArrayBuffer !== 'undefined' ? SharedArrayBuffer : ArrayBuffer);\n\n/** @ignore */\nfunction collapseContiguousByteRanges(chunks: Uint8Array[]) {\n let result = chunks[0] ? [chunks[0]] : [];\n let xOffset: number, yOffset: number, xLen: number, yLen: number;\n for (let x, y, i = 0, j = 0, n = chunks.length; ++i < n;) {\n x = result[j];\n y = chunks[i];\n // continue if x and y don't share the same underlying ArrayBuffer, or if x isn't before y\n if (!x || !y || x.buffer !== y.buffer || y.byteOffset < x.byteOffset) {\n y && (result[++j] = y);\n continue;\n }\n ({ byteOffset: xOffset, byteLength: xLen } = x);\n ({ byteOffset: yOffset, byteLength: yLen } = y);\n // continue if the byte ranges of x and y aren't contiguous\n if ((xOffset + xLen) < yOffset || (yOffset + yLen) < xOffset) {\n y && (result[++j] = y);\n continue;\n }\n result[j] = new Uint8Array(x.buffer, xOffset, yOffset - xOffset + yLen);\n }\n return result;\n}\n\n/** @ignore */\nexport function memcpy(target: TTarget, source: TSource, targetByteOffset = 0, sourceByteLength = source.byteLength) {\n const targetByteLength = target.byteLength;\n const dst = new Uint8Array(target.buffer, target.byteOffset, targetByteLength);\n const src = new Uint8Array(source.buffer, source.byteOffset, Math.min(sourceByteLength, targetByteLength));\n dst.set(src, targetByteOffset);\n return target;\n}\n\n/** @ignore */\nexport function joinUint8Arrays(chunks: Uint8Array[], size?: number | null): [Uint8Array, Uint8Array[], number] {\n // collapse chunks that share the same underlying ArrayBuffer and whose byte ranges overlap,\n // to avoid unnecessarily copying the bytes to do this buffer join. This is a common case during\n // streaming, where we may be reading partial byte ranges out of the same underlying ArrayBuffer\n let result = collapseContiguousByteRanges(chunks);\n let byteLength = result.reduce((x, b) => x + b.byteLength, 0);\n let source: Uint8Array, sliced: Uint8Array, buffer: Uint8Array | void;\n let offset = 0, index = -1, length = Math.min(size || Infinity, byteLength);\n for (let n = result.length; ++index < n;) {\n source = result[index];\n sliced = source.subarray(0, Math.min(source.length, length - offset));\n if (length <= (offset + sliced.length)) {\n if (sliced.length < source.length) {\n result[index] = source.subarray(sliced.length);\n } else if (sliced.length === source.length) { index++; }\n buffer ? memcpy(buffer, sliced, offset) : (buffer = sliced);\n break;\n }\n memcpy(buffer || (buffer = new Uint8Array(length)), sliced, offset);\n offset += sliced.length;\n }\n return [buffer || new Uint8Array(0), result.slice(index), byteLength - (buffer ? buffer.byteLength : 0)];\n}\n\n/** @ignore */\nexport type ArrayBufferViewInput = ArrayBufferView | ArrayBufferLike | ArrayBufferView | Iterable | ArrayLike | ByteBuffer | string | null | undefined |\n IteratorResult | ArrayLike | ByteBuffer | string | null | undefined> |\n ReadableStreamReadResult | ArrayLike | ByteBuffer | string | null | undefined> ;\n\n/** @ignore */\nexport function toArrayBufferView(ArrayBufferViewCtor: TypedArrayConstructor, input: ArrayBufferViewInput): T;\nexport function toArrayBufferView(ArrayBufferViewCtor: BigIntArrayConstructor, input: ArrayBufferViewInput): T;\nexport function toArrayBufferView(ArrayBufferViewCtor: any, input: ArrayBufferViewInput) {\n\n let value: any = isIteratorResult(input) ? input.value : input;\n\n if (value instanceof ArrayBufferViewCtor) {\n if (ArrayBufferViewCtor === Uint8Array) {\n // Node's `Buffer` class passes the `instanceof Uint8Array` check, but we need\n // a real Uint8Array, since Buffer#slice isn't the same as Uint8Array#slice :/\n return new ArrayBufferViewCtor(value.buffer, value.byteOffset, value.byteLength);\n }\n return value;\n }\n if (!value) { return new ArrayBufferViewCtor(0); }\n if (typeof value === 'string') { value = encodeUtf8(value); }\n if (value instanceof ArrayBuffer) { return new ArrayBufferViewCtor(value); }\n if (value instanceof SharedArrayBuf) { return new ArrayBufferViewCtor(value); }\n if (value instanceof ByteBuffer) { return toArrayBufferView(ArrayBufferViewCtor, value.bytes()); }\n return !ArrayBuffer.isView(value) ? ArrayBufferViewCtor.from(value) : value.byteLength <= 0 ? new ArrayBufferViewCtor(0)\n : new ArrayBufferViewCtor(value.buffer, value.byteOffset, value.byteLength / ArrayBufferViewCtor.BYTES_PER_ELEMENT);\n}\n\n/** @ignore */ export const toInt8Array = (input: ArrayBufferViewInput) => toArrayBufferView(Int8Array, input);\n/** @ignore */ export const toInt16Array = (input: ArrayBufferViewInput) => toArrayBufferView(Int16Array, input);\n/** @ignore */ export const toInt32Array = (input: ArrayBufferViewInput) => toArrayBufferView(Int32Array, input);\n/** @ignore */ export const toBigInt64Array = (input: ArrayBufferViewInput) => toArrayBufferView(BigInt64Array, input);\n/** @ignore */ export const toUint8Array = (input: ArrayBufferViewInput) => toArrayBufferView(Uint8Array, input);\n/** @ignore */ export const toUint16Array = (input: ArrayBufferViewInput) => toArrayBufferView(Uint16Array, input);\n/** @ignore */ export const toUint32Array = (input: ArrayBufferViewInput) => toArrayBufferView(Uint32Array, input);\n/** @ignore */ export const toBigUint64Array = (input: ArrayBufferViewInput) => toArrayBufferView(BigUint64Array, input);\n/** @ignore */ export const toFloat32Array = (input: ArrayBufferViewInput) => toArrayBufferView(Float32Array, input);\n/** @ignore */ export const toFloat64Array = (input: ArrayBufferViewInput) => toArrayBufferView(Float64Array, input);\n/** @ignore */ export const toUint8ClampedArray = (input: ArrayBufferViewInput) => toArrayBufferView(Uint8ClampedArray, input);\n\n/** @ignore */\ntype ArrayBufferViewIteratorInput = Iterable | ArrayBufferViewInput;\n\n/** @ignore */\nconst pump = | AsyncIterator>(iterator: T) => { iterator.next(); return iterator; };\n\n/** @ignore */\nexport function* toArrayBufferViewIterator(ArrayCtor: TypedArrayConstructor, source: ArrayBufferViewIteratorInput) {\n\n const wrap = function*(x: T) { yield x; };\n const buffers: Iterable =\n (typeof source === 'string') ? wrap(source)\n : (ArrayBuffer.isView(source)) ? wrap(source)\n : (source instanceof ArrayBuffer) ? wrap(source)\n : (source instanceof SharedArrayBuf) ? wrap(source)\n : !isIterable(source) ? wrap(source) : source;\n\n yield* pump((function* (it) {\n let r: IteratorResult = null;\n do {\n r = it.next(yield toArrayBufferView(ArrayCtor, r));\n } while (!r.done);\n })(buffers[Symbol.iterator]()));\n}\n\n/** @ignore */ export const toInt8ArrayIterator = (input: ArrayBufferViewIteratorInput) => toArrayBufferViewIterator(Int8Array, input);\n/** @ignore */ export const toInt16ArrayIterator = (input: ArrayBufferViewIteratorInput) => toArrayBufferViewIterator(Int16Array, input);\n/** @ignore */ export const toInt32ArrayIterator = (input: ArrayBufferViewIteratorInput) => toArrayBufferViewIterator(Int32Array, input);\n/** @ignore */ export const toUint8ArrayIterator = (input: ArrayBufferViewIteratorInput) => toArrayBufferViewIterator(Uint8Array, input);\n/** @ignore */ export const toUint16ArrayIterator = (input: ArrayBufferViewIteratorInput) => toArrayBufferViewIterator(Uint16Array, input);\n/** @ignore */ export const toUint32ArrayIterator = (input: ArrayBufferViewIteratorInput) => toArrayBufferViewIterator(Uint32Array, input);\n/** @ignore */ export const toFloat32ArrayIterator = (input: ArrayBufferViewIteratorInput) => toArrayBufferViewIterator(Float32Array, input);\n/** @ignore */ export const toFloat64ArrayIterator = (input: ArrayBufferViewIteratorInput) => toArrayBufferViewIterator(Float64Array, input);\n/** @ignore */ export const toUint8ClampedArrayIterator = (input: ArrayBufferViewIteratorInput) => toArrayBufferViewIterator(Uint8ClampedArray, input);\n\n/** @ignore */\ntype ArrayBufferViewAsyncIteratorInput = AsyncIterable | Iterable | PromiseLike | ArrayBufferViewInput;\n\n/** @ignore */\nexport async function* toArrayBufferViewAsyncIterator(ArrayCtor: TypedArrayConstructor, source: ArrayBufferViewAsyncIteratorInput): AsyncIterableIterator {\n\n // if a Promise, unwrap the Promise and iterate the resolved value\n if (isPromise(source)) {\n return yield* toArrayBufferViewAsyncIterator(ArrayCtor, await source);\n }\n\n const wrap = async function*(x: T) { yield await x; };\n const emit = async function* >(source: T) {\n yield* pump((function*(it: Iterator) {\n let r: IteratorResult = null;\n do {\n r = it.next(yield r && r.value);\n } while (!r.done);\n })(source[Symbol.iterator]()));\n };\n\n const buffers: AsyncIterable =\n (typeof source === 'string') ? wrap(source) // if string, wrap in an AsyncIterableIterator\n : (ArrayBuffer.isView(source)) ? wrap(source) // if TypedArray, wrap in an AsyncIterableIterator\n : (source instanceof ArrayBuffer) ? wrap(source) // if ArrayBuffer, wrap in an AsyncIterableIterator\n : (source instanceof SharedArrayBuf) ? wrap(source) // if SharedArrayBuffer, wrap in an AsyncIterableIterator\n : isIterable(source) ? emit(source) // If Iterable, wrap in an AsyncIterableIterator and compose the `next` values\n : !isAsyncIterable(source) ? wrap(source) // If not an AsyncIterable, treat as a sentinel and wrap in an AsyncIterableIterator\n : source; // otherwise if AsyncIterable, use it\n\n yield* pump((async function* (it) {\n let r: IteratorResult = null;\n do {\n r = await it.next(yield toArrayBufferView(ArrayCtor, r));\n } while (!r.done);\n })(buffers[Symbol.asyncIterator]()));\n}\n\n/** @ignore */ export const toInt8ArrayAsyncIterator = (input: ArrayBufferViewAsyncIteratorInput) => toArrayBufferViewAsyncIterator(Int8Array, input);\n/** @ignore */ export const toInt16ArrayAsyncIterator = (input: ArrayBufferViewAsyncIteratorInput) => toArrayBufferViewAsyncIterator(Int16Array, input);\n/** @ignore */ export const toInt32ArrayAsyncIterator = (input: ArrayBufferViewAsyncIteratorInput) => toArrayBufferViewAsyncIterator(Int32Array, input);\n/** @ignore */ export const toUint8ArrayAsyncIterator = (input: ArrayBufferViewAsyncIteratorInput) => toArrayBufferViewAsyncIterator(Uint8Array, input);\n/** @ignore */ export const toUint16ArrayAsyncIterator = (input: ArrayBufferViewAsyncIteratorInput) => toArrayBufferViewAsyncIterator(Uint16Array, input);\n/** @ignore */ export const toUint32ArrayAsyncIterator = (input: ArrayBufferViewAsyncIteratorInput) => toArrayBufferViewAsyncIterator(Uint32Array, input);\n/** @ignore */ export const toFloat32ArrayAsyncIterator = (input: ArrayBufferViewAsyncIteratorInput) => toArrayBufferViewAsyncIterator(Float32Array, input);\n/** @ignore */ export const toFloat64ArrayAsyncIterator = (input: ArrayBufferViewAsyncIteratorInput) => toArrayBufferViewAsyncIterator(Float64Array, input);\n/** @ignore */ export const toUint8ClampedArrayAsyncIterator = (input: ArrayBufferViewAsyncIteratorInput) => toArrayBufferViewAsyncIterator(Uint8ClampedArray, input);\n\n/** @ignore */\nexport function rebaseValueOffsets(offset: number, length: number, valueOffsets: Int32Array) {\n // If we have a non-zero offset, create a new offsets array with the values\n // shifted by the start offset, such that the new start offset is 0\n if (offset !== 0) {\n valueOffsets = valueOffsets.slice(0, length + 1);\n for (let i = -1; ++i <= length;) {\n valueOffsets[i] += offset;\n }\n }\n return valueOffsets;\n}\n\n/** @ignore */\nexport function compareArrayLike>(a: T, b: T) {\n let i = 0, n = a.length;\n if (n !== b.length) { return false; }\n if (n > 0) {\n do { if (a[i] !== b[i]) { return false; } } while (++i < n);\n }\n return true;\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/util/compat.d.ts b/frontend/node_modules/apache-arrow/util/compat.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..aae4cf241dcf80ce9ee37b69f699a99890fc23bb --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/compat.d.ts @@ -0,0 +1,58 @@ +/// +import { ArrowJSONLike } from '../io/interfaces'; +/** @ignore */ +export interface Subscription { + unsubscribe: () => void; +} +/** @ignore */ +export interface Observer { + closed?: boolean; + next: (value: T) => void; + error: (err: any) => void; + complete: () => void; +} +/** @ignore */ +export interface Observable { + subscribe: (observer: Observer) => Subscription; +} +/** @ignore */ +declare const BigIntCtor: BigIntConstructor, BigIntAvailable: boolean; +/** @ignore */ +declare const BigInt64ArrayCtor: BigInt64ArrayConstructor, BigInt64ArrayAvailable: boolean; +/** @ignore */ +declare const BigUint64ArrayCtor: BigUint64ArrayConstructor, BigUint64ArrayAvailable: boolean; +export { BigIntCtor as BigInt, BigIntAvailable }; +export { BigInt64ArrayCtor as BigInt64Array, BigInt64ArrayAvailable }; +export { BigUint64ArrayCtor as BigUint64Array, BigUint64ArrayAvailable }; +/** @ignore */ +export declare const isObject: (x: any) => x is Object; +/** @ignore */ +export declare const isPromise: (x: any) => x is PromiseLike; +/** @ignore */ +export declare const isObservable: (x: any) => x is Observable; +/** @ignore */ +export declare const isIterable: (x: any) => x is Iterable; +/** @ignore */ +export declare const isAsyncIterable: (x: any) => x is AsyncIterable; +/** @ignore */ +export declare const isArrowJSON: (x: any) => x is ArrowJSONLike; +/** @ignore */ +export declare const isArrayLike: (x: any) => x is ArrayLike; +/** @ignore */ +export declare const isIteratorResult: (x: any) => x is IteratorResult; +/** @ignore */ +export declare const isUnderlyingSink: (x: any) => x is UnderlyingSink; +/** @ignore */ +export declare const isFileHandle: (x: any) => x is import("fs").promises.FileHandle; +/** @ignore */ +export declare const isFSReadStream: (x: any) => x is import("fs").ReadStream; +/** @ignore */ +export declare const isFetchResponse: (x: any) => x is Response; +/** @ignore */ +export declare const isWritableDOMStream: (x: any) => x is WritableStream; +/** @ignore */ +export declare const isReadableDOMStream: (x: any) => x is ReadableStream; +/** @ignore */ +export declare const isWritableNodeStream: (x: any) => x is NodeJS.WritableStream; +/** @ignore */ +export declare const isReadableNodeStream: (x: any) => x is NodeJS.ReadableStream; diff --git a/frontend/node_modules/apache-arrow/util/compat.js b/frontend/node_modules/apache-arrow/util/compat.js new file mode 100644 index 0000000000000000000000000000000000000000..c24ccee0893a13c4d38ca1ed754dcae573f0de3d --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/compat.js @@ -0,0 +1,140 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const interfaces_1 = require("../io/interfaces"); +/** @ignore */ +const [BigIntCtor, BigIntAvailable] = (() => { + const BigIntUnavailableError = () => { throw new Error('BigInt is not available in this environment'); }; + function BigIntUnavailable() { throw BigIntUnavailableError(); } + BigIntUnavailable.asIntN = () => { throw BigIntUnavailableError(); }; + BigIntUnavailable.asUintN = () => { throw BigIntUnavailableError(); }; + return typeof BigInt !== 'undefined' ? [BigInt, true] : [BigIntUnavailable, false]; +})(); +exports.BigInt = BigIntCtor; +exports.BigIntAvailable = BigIntAvailable; +/** @ignore */ +const [BigInt64ArrayCtor, BigInt64ArrayAvailable] = (() => { + const BigInt64ArrayUnavailableError = () => { throw new Error('BigInt64Array is not available in this environment'); }; + class BigInt64ArrayUnavailable { + static get BYTES_PER_ELEMENT() { return 8; } + static of() { throw BigInt64ArrayUnavailableError(); } + static from() { throw BigInt64ArrayUnavailableError(); } + constructor() { throw BigInt64ArrayUnavailableError(); } + } + return typeof BigInt64Array !== 'undefined' ? [BigInt64Array, true] : [BigInt64ArrayUnavailable, false]; +})(); +exports.BigInt64Array = BigInt64ArrayCtor; +exports.BigInt64ArrayAvailable = BigInt64ArrayAvailable; +/** @ignore */ +const [BigUint64ArrayCtor, BigUint64ArrayAvailable] = (() => { + const BigUint64ArrayUnavailableError = () => { throw new Error('BigUint64Array is not available in this environment'); }; + class BigUint64ArrayUnavailable { + static get BYTES_PER_ELEMENT() { return 8; } + static of() { throw BigUint64ArrayUnavailableError(); } + static from() { throw BigUint64ArrayUnavailableError(); } + constructor() { throw BigUint64ArrayUnavailableError(); } + } + return typeof BigUint64Array !== 'undefined' ? [BigUint64Array, true] : [BigUint64ArrayUnavailable, false]; +})(); +exports.BigUint64Array = BigUint64ArrayCtor; +exports.BigUint64ArrayAvailable = BigUint64ArrayAvailable; +/** @ignore */ const isNumber = (x) => typeof x === 'number'; +/** @ignore */ const isBoolean = (x) => typeof x === 'boolean'; +/** @ignore */ const isFunction = (x) => typeof x === 'function'; +/** @ignore */ +exports.isObject = (x) => x != null && Object(x) === x; +/** @ignore */ +exports.isPromise = (x) => { + return exports.isObject(x) && isFunction(x.then); +}; +/** @ignore */ +exports.isObservable = (x) => { + return exports.isObject(x) && isFunction(x.subscribe); +}; +/** @ignore */ +exports.isIterable = (x) => { + return exports.isObject(x) && isFunction(x[Symbol.iterator]); +}; +/** @ignore */ +exports.isAsyncIterable = (x) => { + return exports.isObject(x) && isFunction(x[Symbol.asyncIterator]); +}; +/** @ignore */ +exports.isArrowJSON = (x) => { + return exports.isObject(x) && exports.isObject(x['schema']); +}; +/** @ignore */ +exports.isArrayLike = (x) => { + return exports.isObject(x) && isNumber(x['length']); +}; +/** @ignore */ +exports.isIteratorResult = (x) => { + return exports.isObject(x) && ('done' in x) && ('value' in x); +}; +/** @ignore */ +exports.isUnderlyingSink = (x) => { + return exports.isObject(x) && + isFunction(x['abort']) && + isFunction(x['close']) && + isFunction(x['start']) && + isFunction(x['write']); +}; +/** @ignore */ +exports.isFileHandle = (x) => { + return exports.isObject(x) && isFunction(x['stat']) && isNumber(x['fd']); +}; +/** @ignore */ +exports.isFSReadStream = (x) => { + return exports.isReadableNodeStream(x) && isNumber(x['bytesRead']); +}; +/** @ignore */ +exports.isFetchResponse = (x) => { + return exports.isObject(x) && exports.isReadableDOMStream(x['body']); +}; +/** @ignore */ +exports.isWritableDOMStream = (x) => { + return exports.isObject(x) && + isFunction(x['abort']) && + isFunction(x['getWriter']) && + !(x instanceof interfaces_1.ReadableInterop); +}; +/** @ignore */ +exports.isReadableDOMStream = (x) => { + return exports.isObject(x) && + isFunction(x['cancel']) && + isFunction(x['getReader']) && + !(x instanceof interfaces_1.ReadableInterop); +}; +/** @ignore */ +exports.isWritableNodeStream = (x) => { + return exports.isObject(x) && + isFunction(x['end']) && + isFunction(x['write']) && + isBoolean(x['writable']) && + !(x instanceof interfaces_1.ReadableInterop); +}; +/** @ignore */ +exports.isReadableNodeStream = (x) => { + return exports.isObject(x) && + isFunction(x['read']) && + isFunction(x['pipe']) && + isBoolean(x['readable']) && + !(x instanceof interfaces_1.ReadableInterop); +}; + +//# sourceMappingURL=compat.js.map diff --git a/frontend/node_modules/apache-arrow/util/compat.js.map b/frontend/node_modules/apache-arrow/util/compat.js.map new file mode 100644 index 0000000000000000000000000000000000000000..7d69e52856ad7303270a6878a3bdca54456598be --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/compat.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["util/compat.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,iDAAkE;AAyBlE,cAAc;AACd,MAAM,CAAC,UAAU,EAAE,eAAe,CAAC,GAAG,CAAC,GAAG,EAAE;IACxC,MAAM,sBAAsB,GAAG,GAAG,EAAE,GAAG,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC,CAAC,CAAC,CAAC;IACzG,SAAS,iBAAiB,KAAK,MAAM,sBAAsB,EAAE,CAAC,CAAC,CAAC;IAChE,iBAAiB,CAAC,MAAM,GAAG,GAAG,EAAE,GAAG,MAAM,sBAAsB,EAAE,CAAC,CAAC,CAAC,CAAC;IACrE,iBAAiB,CAAC,OAAO,GAAG,GAAG,EAAE,GAAG,MAAM,sBAAsB,EAAE,CAAC,CAAC,CAAC,CAAC;IACtE,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,CAAC,CAAC;AAEF,cAAc;AACD,QAAA,oBAAoB,GAAG,CAAC,CAAM,EAA8B,EAAE;IACvE,OAAO,gBAAQ,CAAC,CAAC,CAAC;QACd,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;QACrB,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;QACrB,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;QACxB,CAAC,CAAC,CAAC,YAAY,4BAAe,CAAC,CAAC;AACxC,CAAC,CAAC","file":"compat.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { ReadableInterop, ArrowJSONLike } from '../io/interfaces';\n\n/** @ignore */\ntype FSReadStream = import('fs').ReadStream;\n/** @ignore */\ntype FileHandle = import('fs').promises.FileHandle;\n\n/** @ignore */\nexport interface Subscription {\n unsubscribe: () => void;\n}\n\n/** @ignore */\nexport interface Observer {\n closed?: boolean;\n next: (value: T) => void;\n error: (err: any) => void;\n complete: () => void;\n}\n\n/** @ignore */\nexport interface Observable {\n subscribe: (observer: Observer) => Subscription;\n}\n\n/** @ignore */\nconst [BigIntCtor, BigIntAvailable] = (() => {\n const BigIntUnavailableError = () => { throw new Error('BigInt is not available in this environment'); };\n function BigIntUnavailable() { throw BigIntUnavailableError(); }\n BigIntUnavailable.asIntN = () => { throw BigIntUnavailableError(); };\n BigIntUnavailable.asUintN = () => { throw BigIntUnavailableError(); };\n return typeof BigInt !== 'undefined' ? [BigInt, true] : [ BigIntUnavailable, false];\n})() as [BigIntConstructor, boolean];\n\n/** @ignore */\nconst [BigInt64ArrayCtor, BigInt64ArrayAvailable] = (() => {\n const BigInt64ArrayUnavailableError = () => { throw new Error('BigInt64Array is not available in this environment'); };\n class BigInt64ArrayUnavailable {\n static get BYTES_PER_ELEMENT() { return 8; }\n static of() { throw BigInt64ArrayUnavailableError(); }\n static from() { throw BigInt64ArrayUnavailableError(); }\n constructor() { throw BigInt64ArrayUnavailableError(); }\n }\n return typeof BigInt64Array !== 'undefined' ? [BigInt64Array, true] : [ BigInt64ArrayUnavailable, false];\n})() as [BigInt64ArrayConstructor, boolean];\n\n/** @ignore */\nconst [BigUint64ArrayCtor, BigUint64ArrayAvailable] = (() => {\n const BigUint64ArrayUnavailableError = () => { throw new Error('BigUint64Array is not available in this environment'); };\n class BigUint64ArrayUnavailable {\n static get BYTES_PER_ELEMENT() { return 8; }\n static of() { throw BigUint64ArrayUnavailableError(); }\n static from() { throw BigUint64ArrayUnavailableError(); }\n constructor() { throw BigUint64ArrayUnavailableError(); }\n }\n return typeof BigUint64Array !== 'undefined' ? [BigUint64Array, true] : [ BigUint64ArrayUnavailable, false];\n})() as [BigUint64ArrayConstructor, boolean];\n\nexport { BigIntCtor as BigInt, BigIntAvailable };\nexport { BigInt64ArrayCtor as BigInt64Array, BigInt64ArrayAvailable };\nexport { BigUint64ArrayCtor as BigUint64Array, BigUint64ArrayAvailable };\n\n/** @ignore */ const isNumber = (x: any) => typeof x === 'number';\n/** @ignore */ const isBoolean = (x: any) => typeof x === 'boolean';\n/** @ignore */ const isFunction = (x: any) => typeof x === 'function';\n/** @ignore */\nexport const isObject = (x: any): x is Object => x != null && Object(x) === x;\n\n/** @ignore */\nexport const isPromise = (x: any): x is PromiseLike => {\n return isObject(x) && isFunction(x.then);\n};\n\n/** @ignore */\nexport const isObservable = (x: any): x is Observable => {\n return isObject(x) && isFunction(x.subscribe);\n};\n\n/** @ignore */\nexport const isIterable = (x: any): x is Iterable => {\n return isObject(x) && isFunction(x[Symbol.iterator]);\n};\n\n/** @ignore */\nexport const isAsyncIterable = (x: any): x is AsyncIterable => {\n return isObject(x) && isFunction(x[Symbol.asyncIterator]);\n};\n\n/** @ignore */\nexport const isArrowJSON = (x: any): x is ArrowJSONLike => {\n return isObject(x) && isObject(x['schema']);\n};\n\n/** @ignore */\nexport const isArrayLike = (x: any): x is ArrayLike => {\n return isObject(x) && isNumber(x['length']);\n};\n\n/** @ignore */\nexport const isIteratorResult = (x: any): x is IteratorResult => {\n return isObject(x) && ('done' in x) && ('value' in x);\n};\n\n/** @ignore */\nexport const isUnderlyingSink = (x: any): x is UnderlyingSink => {\n return isObject(x) &&\n isFunction(x['abort']) &&\n isFunction(x['close']) &&\n isFunction(x['start']) &&\n isFunction(x['write']);\n};\n\n/** @ignore */\nexport const isFileHandle = (x: any): x is FileHandle => {\n return isObject(x) && isFunction(x['stat']) && isNumber(x['fd']);\n};\n\n/** @ignore */\nexport const isFSReadStream = (x: any): x is FSReadStream => {\n return isReadableNodeStream(x) && isNumber(( x)['bytesRead']);\n};\n\n/** @ignore */\nexport const isFetchResponse = (x: any): x is Response => {\n return isObject(x) && isReadableDOMStream(x['body']);\n};\n\n/** @ignore */\nexport const isWritableDOMStream = (x: any): x is WritableStream => {\n return isObject(x) &&\n isFunction(x['abort']) &&\n isFunction(x['getWriter']) &&\n !(x instanceof ReadableInterop);\n};\n\n/** @ignore */\nexport const isReadableDOMStream = (x: any): x is ReadableStream => {\n return isObject(x) &&\n isFunction(x['cancel']) &&\n isFunction(x['getReader']) &&\n !(x instanceof ReadableInterop);\n};\n\n/** @ignore */\nexport const isWritableNodeStream = (x: any): x is NodeJS.WritableStream => {\n return isObject(x) &&\n isFunction(x['end']) &&\n isFunction(x['write']) &&\n isBoolean(x['writable']) &&\n !(x instanceof ReadableInterop);\n};\n\n/** @ignore */\nexport const isReadableNodeStream = (x: any): x is NodeJS.ReadableStream => {\n return isObject(x) &&\n isFunction(x['read']) &&\n isFunction(x['pipe']) &&\n isBoolean(x['readable']) &&\n !(x instanceof ReadableInterop);\n};\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/util/compat.mjs b/frontend/node_modules/apache-arrow/util/compat.mjs new file mode 100644 index 0000000000000000000000000000000000000000..62a806960149bd6ed1be7de6330380a6164fb9ab --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/compat.mjs @@ -0,0 +1,135 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { ReadableInterop } from '../io/interfaces'; +/** @ignore */ +const [BigIntCtor, BigIntAvailable] = (() => { + const BigIntUnavailableError = () => { throw new Error('BigInt is not available in this environment'); }; + function BigIntUnavailable() { throw BigIntUnavailableError(); } + BigIntUnavailable.asIntN = () => { throw BigIntUnavailableError(); }; + BigIntUnavailable.asUintN = () => { throw BigIntUnavailableError(); }; + return typeof BigInt !== 'undefined' ? [BigInt, true] : [BigIntUnavailable, false]; +})(); +/** @ignore */ +const [BigInt64ArrayCtor, BigInt64ArrayAvailable] = (() => { + const BigInt64ArrayUnavailableError = () => { throw new Error('BigInt64Array is not available in this environment'); }; + class BigInt64ArrayUnavailable { + static get BYTES_PER_ELEMENT() { return 8; } + static of() { throw BigInt64ArrayUnavailableError(); } + static from() { throw BigInt64ArrayUnavailableError(); } + constructor() { throw BigInt64ArrayUnavailableError(); } + } + return typeof BigInt64Array !== 'undefined' ? [BigInt64Array, true] : [BigInt64ArrayUnavailable, false]; +})(); +/** @ignore */ +const [BigUint64ArrayCtor, BigUint64ArrayAvailable] = (() => { + const BigUint64ArrayUnavailableError = () => { throw new Error('BigUint64Array is not available in this environment'); }; + class BigUint64ArrayUnavailable { + static get BYTES_PER_ELEMENT() { return 8; } + static of() { throw BigUint64ArrayUnavailableError(); } + static from() { throw BigUint64ArrayUnavailableError(); } + constructor() { throw BigUint64ArrayUnavailableError(); } + } + return typeof BigUint64Array !== 'undefined' ? [BigUint64Array, true] : [BigUint64ArrayUnavailable, false]; +})(); +export { BigIntCtor as BigInt, BigIntAvailable }; +export { BigInt64ArrayCtor as BigInt64Array, BigInt64ArrayAvailable }; +export { BigUint64ArrayCtor as BigUint64Array, BigUint64ArrayAvailable }; +/** @ignore */ const isNumber = (x) => typeof x === 'number'; +/** @ignore */ const isBoolean = (x) => typeof x === 'boolean'; +/** @ignore */ const isFunction = (x) => typeof x === 'function'; +/** @ignore */ +export const isObject = (x) => x != null && Object(x) === x; +/** @ignore */ +export const isPromise = (x) => { + return isObject(x) && isFunction(x.then); +}; +/** @ignore */ +export const isObservable = (x) => { + return isObject(x) && isFunction(x.subscribe); +}; +/** @ignore */ +export const isIterable = (x) => { + return isObject(x) && isFunction(x[Symbol.iterator]); +}; +/** @ignore */ +export const isAsyncIterable = (x) => { + return isObject(x) && isFunction(x[Symbol.asyncIterator]); +}; +/** @ignore */ +export const isArrowJSON = (x) => { + return isObject(x) && isObject(x['schema']); +}; +/** @ignore */ +export const isArrayLike = (x) => { + return isObject(x) && isNumber(x['length']); +}; +/** @ignore */ +export const isIteratorResult = (x) => { + return isObject(x) && ('done' in x) && ('value' in x); +}; +/** @ignore */ +export const isUnderlyingSink = (x) => { + return isObject(x) && + isFunction(x['abort']) && + isFunction(x['close']) && + isFunction(x['start']) && + isFunction(x['write']); +}; +/** @ignore */ +export const isFileHandle = (x) => { + return isObject(x) && isFunction(x['stat']) && isNumber(x['fd']); +}; +/** @ignore */ +export const isFSReadStream = (x) => { + return isReadableNodeStream(x) && isNumber(x['bytesRead']); +}; +/** @ignore */ +export const isFetchResponse = (x) => { + return isObject(x) && isReadableDOMStream(x['body']); +}; +/** @ignore */ +export const isWritableDOMStream = (x) => { + return isObject(x) && + isFunction(x['abort']) && + isFunction(x['getWriter']) && + !(x instanceof ReadableInterop); +}; +/** @ignore */ +export const isReadableDOMStream = (x) => { + return isObject(x) && + isFunction(x['cancel']) && + isFunction(x['getReader']) && + !(x instanceof ReadableInterop); +}; +/** @ignore */ +export const isWritableNodeStream = (x) => { + return isObject(x) && + isFunction(x['end']) && + isFunction(x['write']) && + isBoolean(x['writable']) && + !(x instanceof ReadableInterop); +}; +/** @ignore */ +export const isReadableNodeStream = (x) => { + return isObject(x) && + isFunction(x['read']) && + isFunction(x['pipe']) && + isBoolean(x['readable']) && + !(x instanceof ReadableInterop); +}; + +//# sourceMappingURL=compat.mjs.map diff --git a/frontend/node_modules/apache-arrow/util/compat.mjs.map b/frontend/node_modules/apache-arrow/util/compat.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..4fc3a7e10f627fbb8dc277a5284d5b02f4c7e4a0 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/compat.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["util/compat.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,OAAO,EAAE,eAAe,EAAiB,MAAM,kBAAkB,CAAC;AAyBlE,cAAc;AACd,MAAM,CAAC,UAAU,EAAE,eAAe,CAAC,GAAG,CAAC,GAAG,EAAE;IACxC,MAAM,sBAAsB,GAAG,GAAG,EAAE,GAAG,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC,CAAC,CAAC,CAAC;IACzG,SAAS,iBAA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;IAC3E,OAAO,QAAQ,CAAC,CAAC,CAAC;QACd,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;QACvB,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;QAC1B,CAAC,CAAC,CAAC,YAAY,eAAe,CAAC,CAAC;AACxC,CAAC,CAAC;AAEF,cAAc;AACd,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAM,EAA8B,EAAE;IACvE,OAAO,QAAQ,CAAC,CAAC,CAAC;QACd,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QACpB,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;QACtB,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;QACxB,CAAC,CAAC,CAAC,YAAY,eAAe,CAAC,CAAC;AACxC,CAAC,CAAC;AAEF,cAAc;AACd,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAM,EAA8B,EAAE;IACvE,OAAO,QAAQ,CAAC,CAAC,CAAC;QACd,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;QACrB,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;QACrB,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;QACxB,CAAC,CAAC,CAAC,YAAY,eAAe,CAAC,CAAC;AACxC,CAAC,CAAC","file":"compat.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { ReadableInterop, ArrowJSONLike } from '../io/interfaces';\n\n/** @ignore */\ntype FSReadStream = import('fs').ReadStream;\n/** @ignore */\ntype FileHandle = import('fs').promises.FileHandle;\n\n/** @ignore */\nexport interface Subscription {\n unsubscribe: () => void;\n}\n\n/** @ignore */\nexport interface Observer {\n closed?: boolean;\n next: (value: T) => void;\n error: (err: any) => void;\n complete: () => void;\n}\n\n/** @ignore */\nexport interface Observable {\n subscribe: (observer: Observer) => Subscription;\n}\n\n/** @ignore */\nconst [BigIntCtor, BigIntAvailable] = (() => {\n const BigIntUnavailableError = () => { throw new Error('BigInt is not available in this environment'); };\n function BigIntUnavailable() { throw BigIntUnavailableError(); }\n BigIntUnavailable.asIntN = () => { throw BigIntUnavailableError(); };\n BigIntUnavailable.asUintN = () => { throw BigIntUnavailableError(); };\n return typeof BigInt !== 'undefined' ? [BigInt, true] : [ BigIntUnavailable, false];\n})() as [BigIntConstructor, boolean];\n\n/** @ignore */\nconst [BigInt64ArrayCtor, BigInt64ArrayAvailable] = (() => {\n const BigInt64ArrayUnavailableError = () => { throw new Error('BigInt64Array is not available in this environment'); };\n class BigInt64ArrayUnavailable {\n static get BYTES_PER_ELEMENT() { return 8; }\n static of() { throw BigInt64ArrayUnavailableError(); }\n static from() { throw BigInt64ArrayUnavailableError(); }\n constructor() { throw BigInt64ArrayUnavailableError(); }\n }\n return typeof BigInt64Array !== 'undefined' ? [BigInt64Array, true] : [ BigInt64ArrayUnavailable, false];\n})() as [BigInt64ArrayConstructor, boolean];\n\n/** @ignore */\nconst [BigUint64ArrayCtor, BigUint64ArrayAvailable] = (() => {\n const BigUint64ArrayUnavailableError = () => { throw new Error('BigUint64Array is not available in this environment'); };\n class BigUint64ArrayUnavailable {\n static get BYTES_PER_ELEMENT() { return 8; }\n static of() { throw BigUint64ArrayUnavailableError(); }\n static from() { throw BigUint64ArrayUnavailableError(); }\n constructor() { throw BigUint64ArrayUnavailableError(); }\n }\n return typeof BigUint64Array !== 'undefined' ? [BigUint64Array, true] : [ BigUint64ArrayUnavailable, false];\n})() as [BigUint64ArrayConstructor, boolean];\n\nexport { BigIntCtor as BigInt, BigIntAvailable };\nexport { BigInt64ArrayCtor as BigInt64Array, BigInt64ArrayAvailable };\nexport { BigUint64ArrayCtor as BigUint64Array, BigUint64ArrayAvailable };\n\n/** @ignore */ const isNumber = (x: any) => typeof x === 'number';\n/** @ignore */ const isBoolean = (x: any) => typeof x === 'boolean';\n/** @ignore */ const isFunction = (x: any) => typeof x === 'function';\n/** @ignore */\nexport const isObject = (x: any): x is Object => x != null && Object(x) === x;\n\n/** @ignore */\nexport const isPromise = (x: any): x is PromiseLike => {\n return isObject(x) && isFunction(x.then);\n};\n\n/** @ignore */\nexport const isObservable = (x: any): x is Observable => {\n return isObject(x) && isFunction(x.subscribe);\n};\n\n/** @ignore */\nexport const isIterable = (x: any): x is Iterable => {\n return isObject(x) && isFunction(x[Symbol.iterator]);\n};\n\n/** @ignore */\nexport const isAsyncIterable = (x: any): x is AsyncIterable => {\n return isObject(x) && isFunction(x[Symbol.asyncIterator]);\n};\n\n/** @ignore */\nexport const isArrowJSON = (x: any): x is ArrowJSONLike => {\n return isObject(x) && isObject(x['schema']);\n};\n\n/** @ignore */\nexport const isArrayLike = (x: any): x is ArrayLike => {\n return isObject(x) && isNumber(x['length']);\n};\n\n/** @ignore */\nexport const isIteratorResult = (x: any): x is IteratorResult => {\n return isObject(x) && ('done' in x) && ('value' in x);\n};\n\n/** @ignore */\nexport const isUnderlyingSink = (x: any): x is UnderlyingSink => {\n return isObject(x) &&\n isFunction(x['abort']) &&\n isFunction(x['close']) &&\n isFunction(x['start']) &&\n isFunction(x['write']);\n};\n\n/** @ignore */\nexport const isFileHandle = (x: any): x is FileHandle => {\n return isObject(x) && isFunction(x['stat']) && isNumber(x['fd']);\n};\n\n/** @ignore */\nexport const isFSReadStream = (x: any): x is FSReadStream => {\n return isReadableNodeStream(x) && isNumber(( x)['bytesRead']);\n};\n\n/** @ignore */\nexport const isFetchResponse = (x: any): x is Response => {\n return isObject(x) && isReadableDOMStream(x['body']);\n};\n\n/** @ignore */\nexport const isWritableDOMStream = (x: any): x is WritableStream => {\n return isObject(x) &&\n isFunction(x['abort']) &&\n isFunction(x['getWriter']) &&\n !(x instanceof ReadableInterop);\n};\n\n/** @ignore */\nexport const isReadableDOMStream = (x: any): x is ReadableStream => {\n return isObject(x) &&\n isFunction(x['cancel']) &&\n isFunction(x['getReader']) &&\n !(x instanceof ReadableInterop);\n};\n\n/** @ignore */\nexport const isWritableNodeStream = (x: any): x is NodeJS.WritableStream => {\n return isObject(x) &&\n isFunction(x['end']) &&\n isFunction(x['write']) &&\n isBoolean(x['writable']) &&\n !(x instanceof ReadableInterop);\n};\n\n/** @ignore */\nexport const isReadableNodeStream = (x: any): x is NodeJS.ReadableStream => {\n return isObject(x) &&\n isFunction(x['read']) &&\n isFunction(x['pipe']) &&\n isBoolean(x['readable']) &&\n !(x instanceof ReadableInterop);\n};\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/util/fn.d.ts b/frontend/node_modules/apache-arrow/util/fn.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a1c5f85cb3eb86d3cb0702d93a0f0da4684d007c --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/fn.d.ts @@ -0,0 +1,6 @@ +/** @ignore */ +export declare function partial0(visit: (node: T) => any): (this: T) => any; +/** @ignore */ +export declare function partial1(visit: (node: T, a: any) => any): (this: T, a: any) => any; +/** @ignore */ +export declare function partial2(visit: (node: T, a: any, b: any) => any): (this: T, a: any, b: any) => any; diff --git a/frontend/node_modules/apache-arrow/util/fn.js b/frontend/node_modules/apache-arrow/util/fn.js new file mode 100644 index 0000000000000000000000000000000000000000..f407f2d67582b2398cbf2d456566a87239b557f1 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/fn.js @@ -0,0 +1,35 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +/** @ignore */ +function partial0(visit) { + return function () { return visit(this); }; +} +exports.partial0 = partial0; +/** @ignore */ +function partial1(visit) { + return function (a) { return visit(this, a); }; +} +exports.partial1 = partial1; +/** @ignore */ +function partial2(visit) { + return function (a, b) { return visit(this, a, b); }; +} +exports.partial2 = partial2; + +//# sourceMappingURL=fn.js.map diff --git a/frontend/node_modules/apache-arrow/util/fn.js.map b/frontend/node_modules/apache-arrow/util/fn.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d2c2f844844588f5ac59bf515233fc098dd76659 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/fn.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["util/fn.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,cAAc;AACd,SAAgB,QAAQ,CAAI,KAAuB;IAC/C,OAAO,cAAoB,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACrD,CAAC;AAFD,4BAEC;AAED,cAAc;AACd,SAAgB,QAAQ,CAAI,KAA+B;IACvD,OAAO,UAAkB,CAAM,IAAI,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAChE,CAAC;AAFD,4BAEC;AAED,cAAc;AACd,SAAgB,QAAQ,CAAI,KAAuC;IAC/D,OAAO,UAAkB,CAAM,EAAE,CAAM,IAAI,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3E,CAAC;AAFD,4BAEC","file":"fn.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n/** @ignore */\nexport function partial0(visit: (node: T) => any) {\n return function(this: T) { return visit(this); };\n}\n\n/** @ignore */\nexport function partial1(visit: (node: T, a: any) => any) {\n return function(this: T, a: any) { return visit(this, a); };\n}\n\n/** @ignore */\nexport function partial2(visit: (node: T, a: any, b: any) => any) {\n return function(this: T, a: any, b: any) { return visit(this, a, b); };\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/util/fn.mjs b/frontend/node_modules/apache-arrow/util/fn.mjs new file mode 100644 index 0000000000000000000000000000000000000000..310a072fa8791670f46fddcace560413cb5e68d3 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/fn.mjs @@ -0,0 +1,30 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +/** @ignore */ +export function partial0(visit) { + return function () { return visit(this); }; +} +/** @ignore */ +export function partial1(visit) { + return function (a) { return visit(this, a); }; +} +/** @ignore */ +export function partial2(visit) { + return function (a, b) { return visit(this, a, b); }; +} + +//# sourceMappingURL=fn.mjs.map diff --git a/frontend/node_modules/apache-arrow/util/fn.mjs.map b/frontend/node_modules/apache-arrow/util/fn.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..792d9d60aa647b589c2d3f776b8943acd5db1f46 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/fn.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["util/fn.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,cAAc;AACd,MAAM,UAAU,QAAQ,CAAI,KAAuB;IAC/C,OAAO,cAAoB,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACrD,CAAC;AAED,cAAc;AACd,MAAM,UAAU,QAAQ,CAAI,KAA+B;IACvD,OAAO,UAAkB,CAAM,IAAI,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAChE,CAAC;AAED,cAAc;AACd,MAAM,UAAU,QAAQ,CAAI,KAAuC;IAC/D,OAAO,UAAkB,CAAM,EAAE,CAAM,IAAI,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3E,CAAC","file":"fn.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n/** @ignore */\nexport function partial0(visit: (node: T) => any) {\n return function(this: T) { return visit(this); };\n}\n\n/** @ignore */\nexport function partial1(visit: (node: T, a: any) => any) {\n return function(this: T, a: any) { return visit(this, a); };\n}\n\n/** @ignore */\nexport function partial2(visit: (node: T, a: any, b: any) => any) {\n return function(this: T, a: any, b: any) { return visit(this, a, b); };\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/util/int.d.ts b/frontend/node_modules/apache-arrow/util/int.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e8ebc17a569f6d502435ae49be252622f9798919 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/int.d.ts @@ -0,0 +1,72 @@ +/** @ignore */ +export declare class BaseInt64 { + protected buffer: Uint32Array; + constructor(buffer: Uint32Array); + high(): number; + low(): number; + protected _times(other: BaseInt64): this; + protected _plus(other: BaseInt64): void; + lessThan(other: BaseInt64): boolean; + equals(other: BaseInt64): boolean; + greaterThan(other: BaseInt64): boolean; + hex(): string; +} +/** @ignore */ +export declare class Uint64 extends BaseInt64 { + times(other: Uint64): Uint64; + plus(other: Uint64): Uint64; + /** @nocollapse */ + static from(val: any, out_buffer?: Uint32Array): Uint64; + /** @nocollapse */ + static fromNumber(num: number, out_buffer?: Uint32Array): Uint64; + /** @nocollapse */ + static fromString(str: string, out_buffer?: Uint32Array): Uint64; + /** @nocollapse */ + static convertArray(values: (string | number)[]): Uint32Array; + /** @nocollapse */ + static multiply(left: Uint64, right: Uint64): Uint64; + /** @nocollapse */ + static add(left: Uint64, right: Uint64): Uint64; +} +/** @ignore */ +export declare class Int64 extends BaseInt64 { + negate(): Int64; + times(other: Int64): Int64; + plus(other: Int64): Int64; + lessThan(other: Int64): boolean; + /** @nocollapse */ + static from(val: any, out_buffer?: Uint32Array): Int64; + /** @nocollapse */ + static fromNumber(num: number, out_buffer?: Uint32Array): Int64; + /** @nocollapse */ + static fromString(str: string, out_buffer?: Uint32Array): Int64; + /** @nocollapse */ + static convertArray(values: (string | number)[]): Uint32Array; + /** @nocollapse */ + static multiply(left: Int64, right: Int64): Int64; + /** @nocollapse */ + static add(left: Int64, right: Int64): Int64; +} +/** @ignore */ +export declare class Int128 { + private buffer; + constructor(buffer: Uint32Array); + high(): Int64; + low(): Int64; + negate(): Int128; + times(other: Int128): Int128; + plus(other: Int128): Int128; + hex(): string; + /** @nocollapse */ + static multiply(left: Int128, right: Int128): Int128; + /** @nocollapse */ + static add(left: Int128, right: Int128): Int128; + /** @nocollapse */ + static from(val: any, out_buffer?: Uint32Array): Int128; + /** @nocollapse */ + static fromNumber(num: number, out_buffer?: Uint32Array): Int128; + /** @nocollapse */ + static fromString(str: string, out_buffer?: Uint32Array): Int128; + /** @nocollapse */ + static convertArray(values: (string | number)[]): Uint32Array; +} diff --git a/frontend/node_modules/apache-arrow/util/int.js b/frontend/node_modules/apache-arrow/util/int.js new file mode 100644 index 0000000000000000000000000000000000000000..ea795dd1277f185d5212d4572d2046b5fa82714b --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/int.js @@ -0,0 +1,373 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +/** @ignore */ +const carryBit16 = 1 << 16; +/** @ignore */ +function intAsHex(value) { + if (value < 0) { + value = 0xFFFFFFFF + value + 1; + } + return `0x${value.toString(16)}`; +} +/** @ignore */ +const kInt32DecimalDigits = 8; +/** @ignore */ +const kPowersOfTen = [1, + 10, + 100, + 1000, + 10000, + 100000, + 1000000, + 10000000, + 100000000]; +/** @ignore */ +class BaseInt64 { + constructor(buffer) { + this.buffer = buffer; + } + high() { return this.buffer[1]; } + low() { return this.buffer[0]; } + _times(other) { + // Break the left and right numbers into 16 bit chunks + // so that we can multiply them without overflow. + const L = new Uint32Array([ + this.buffer[1] >>> 16, + this.buffer[1] & 0xFFFF, + this.buffer[0] >>> 16, + this.buffer[0] & 0xFFFF + ]); + const R = new Uint32Array([ + other.buffer[1] >>> 16, + other.buffer[1] & 0xFFFF, + other.buffer[0] >>> 16, + other.buffer[0] & 0xFFFF + ]); + let product = L[3] * R[3]; + this.buffer[0] = product & 0xFFFF; + let sum = product >>> 16; + product = L[2] * R[3]; + sum += product; + product = (L[3] * R[2]) >>> 0; + sum += product; + this.buffer[0] += sum << 16; + this.buffer[1] = (sum >>> 0 < product ? carryBit16 : 0); + this.buffer[1] += sum >>> 16; + this.buffer[1] += L[1] * R[3] + L[2] * R[2] + L[3] * R[1]; + this.buffer[1] += (L[0] * R[3] + L[1] * R[2] + L[2] * R[1] + L[3] * R[0]) << 16; + return this; + } + _plus(other) { + const sum = (this.buffer[0] + other.buffer[0]) >>> 0; + this.buffer[1] += other.buffer[1]; + if (sum < (this.buffer[0] >>> 0)) { + ++this.buffer[1]; + } + this.buffer[0] = sum; + } + lessThan(other) { + return this.buffer[1] < other.buffer[1] || + (this.buffer[1] === other.buffer[1] && this.buffer[0] < other.buffer[0]); + } + equals(other) { + return this.buffer[1] === other.buffer[1] && this.buffer[0] == other.buffer[0]; + } + greaterThan(other) { + return other.lessThan(this); + } + hex() { + return `${intAsHex(this.buffer[1])} ${intAsHex(this.buffer[0])}`; + } +} +exports.BaseInt64 = BaseInt64; +/** @ignore */ +class Uint64 extends BaseInt64 { + times(other) { + this._times(other); + return this; + } + plus(other) { + this._plus(other); + return this; + } + /** @nocollapse */ + static from(val, out_buffer = new Uint32Array(2)) { + return Uint64.fromString(typeof (val) === 'string' ? val : val.toString(), out_buffer); + } + /** @nocollapse */ + static fromNumber(num, out_buffer = new Uint32Array(2)) { + // Always parse numbers as strings - pulling out high and low bits + // directly seems to lose precision sometimes + // For example: + // > -4613034156400212000 >>> 0 + // 721782784 + // The correct lower 32-bits are 721782752 + return Uint64.fromString(num.toString(), out_buffer); + } + /** @nocollapse */ + static fromString(str, out_buffer = new Uint32Array(2)) { + const length = str.length; + let out = new Uint64(out_buffer); + for (let posn = 0; posn < length;) { + const group = kInt32DecimalDigits < length - posn ? + kInt32DecimalDigits : length - posn; + const chunk = new Uint64(new Uint32Array([parseInt(str.substr(posn, group), 10), 0])); + const multiple = new Uint64(new Uint32Array([kPowersOfTen[group], 0])); + out.times(multiple); + out.plus(chunk); + posn += group; + } + return out; + } + /** @nocollapse */ + static convertArray(values) { + const data = new Uint32Array(values.length * 2); + for (let i = -1, n = values.length; ++i < n;) { + Uint64.from(values[i], new Uint32Array(data.buffer, data.byteOffset + 2 * i * 4, 2)); + } + return data; + } + /** @nocollapse */ + static multiply(left, right) { + let rtrn = new Uint64(new Uint32Array(left.buffer)); + return rtrn.times(right); + } + /** @nocollapse */ + static add(left, right) { + let rtrn = new Uint64(new Uint32Array(left.buffer)); + return rtrn.plus(right); + } +} +exports.Uint64 = Uint64; +/** @ignore */ +class Int64 extends BaseInt64 { + negate() { + this.buffer[0] = ~this.buffer[0] + 1; + this.buffer[1] = ~this.buffer[1]; + if (this.buffer[0] == 0) { + ++this.buffer[1]; + } + return this; + } + times(other) { + this._times(other); + return this; + } + plus(other) { + this._plus(other); + return this; + } + lessThan(other) { + // force high bytes to be signed + const this_high = this.buffer[1] << 0; + const other_high = other.buffer[1] << 0; + return this_high < other_high || + (this_high === other_high && this.buffer[0] < other.buffer[0]); + } + /** @nocollapse */ + static from(val, out_buffer = new Uint32Array(2)) { + return Int64.fromString(typeof (val) === 'string' ? val : val.toString(), out_buffer); + } + /** @nocollapse */ + static fromNumber(num, out_buffer = new Uint32Array(2)) { + // Always parse numbers as strings - pulling out high and low bits + // directly seems to lose precision sometimes + // For example: + // > -4613034156400212000 >>> 0 + // 721782784 + // The correct lower 32-bits are 721782752 + return Int64.fromString(num.toString(), out_buffer); + } + /** @nocollapse */ + static fromString(str, out_buffer = new Uint32Array(2)) { + // TODO: Assert that out_buffer is 0 and length = 2 + const negate = str.startsWith('-'); + const length = str.length; + let out = new Int64(out_buffer); + for (let posn = negate ? 1 : 0; posn < length;) { + const group = kInt32DecimalDigits < length - posn ? + kInt32DecimalDigits : length - posn; + const chunk = new Int64(new Uint32Array([parseInt(str.substr(posn, group), 10), 0])); + const multiple = new Int64(new Uint32Array([kPowersOfTen[group], 0])); + out.times(multiple); + out.plus(chunk); + posn += group; + } + return negate ? out.negate() : out; + } + /** @nocollapse */ + static convertArray(values) { + const data = new Uint32Array(values.length * 2); + for (let i = -1, n = values.length; ++i < n;) { + Int64.from(values[i], new Uint32Array(data.buffer, data.byteOffset + 2 * i * 4, 2)); + } + return data; + } + /** @nocollapse */ + static multiply(left, right) { + let rtrn = new Int64(new Uint32Array(left.buffer)); + return rtrn.times(right); + } + /** @nocollapse */ + static add(left, right) { + let rtrn = new Int64(new Uint32Array(left.buffer)); + return rtrn.plus(right); + } +} +exports.Int64 = Int64; +/** @ignore */ +class Int128 { + constructor(buffer) { + this.buffer = buffer; + // buffer[3] MSB (high) + // buffer[2] + // buffer[1] + // buffer[0] LSB (low) + } + high() { + return new Int64(new Uint32Array(this.buffer.buffer, this.buffer.byteOffset + 8, 2)); + } + low() { + return new Int64(new Uint32Array(this.buffer.buffer, this.buffer.byteOffset, 2)); + } + negate() { + this.buffer[0] = ~this.buffer[0] + 1; + this.buffer[1] = ~this.buffer[1]; + this.buffer[2] = ~this.buffer[2]; + this.buffer[3] = ~this.buffer[3]; + if (this.buffer[0] == 0) { + ++this.buffer[1]; + } + if (this.buffer[1] == 0) { + ++this.buffer[2]; + } + if (this.buffer[2] == 0) { + ++this.buffer[3]; + } + return this; + } + times(other) { + // Break the left and right numbers into 32 bit chunks + // so that we can multiply them without overflow. + const L0 = new Uint64(new Uint32Array([this.buffer[3], 0])); + const L1 = new Uint64(new Uint32Array([this.buffer[2], 0])); + const L2 = new Uint64(new Uint32Array([this.buffer[1], 0])); + const L3 = new Uint64(new Uint32Array([this.buffer[0], 0])); + const R0 = new Uint64(new Uint32Array([other.buffer[3], 0])); + const R1 = new Uint64(new Uint32Array([other.buffer[2], 0])); + const R2 = new Uint64(new Uint32Array([other.buffer[1], 0])); + const R3 = new Uint64(new Uint32Array([other.buffer[0], 0])); + let product = Uint64.multiply(L3, R3); + this.buffer[0] = product.low(); + let sum = new Uint64(new Uint32Array([product.high(), 0])); + product = Uint64.multiply(L2, R3); + sum.plus(product); + product = Uint64.multiply(L3, R2); + sum.plus(product); + this.buffer[1] = sum.low(); + this.buffer[3] = (sum.lessThan(product) ? 1 : 0); + this.buffer[2] = sum.high(); + let high = new Uint64(new Uint32Array(this.buffer.buffer, this.buffer.byteOffset + 8, 2)); + high.plus(Uint64.multiply(L1, R3)) + .plus(Uint64.multiply(L2, R2)) + .plus(Uint64.multiply(L3, R1)); + this.buffer[3] += Uint64.multiply(L0, R3) + .plus(Uint64.multiply(L1, R2)) + .plus(Uint64.multiply(L2, R1)) + .plus(Uint64.multiply(L3, R0)).low(); + return this; + } + plus(other) { + let sums = new Uint32Array(4); + sums[3] = (this.buffer[3] + other.buffer[3]) >>> 0; + sums[2] = (this.buffer[2] + other.buffer[2]) >>> 0; + sums[1] = (this.buffer[1] + other.buffer[1]) >>> 0; + sums[0] = (this.buffer[0] + other.buffer[0]) >>> 0; + if (sums[0] < (this.buffer[0] >>> 0)) { + ++sums[1]; + } + if (sums[1] < (this.buffer[1] >>> 0)) { + ++sums[2]; + } + if (sums[2] < (this.buffer[2] >>> 0)) { + ++sums[3]; + } + this.buffer[3] = sums[3]; + this.buffer[2] = sums[2]; + this.buffer[1] = sums[1]; + this.buffer[0] = sums[0]; + return this; + } + hex() { + return `${intAsHex(this.buffer[3])} ${intAsHex(this.buffer[2])} ${intAsHex(this.buffer[1])} ${intAsHex(this.buffer[0])}`; + } + /** @nocollapse */ + static multiply(left, right) { + let rtrn = new Int128(new Uint32Array(left.buffer)); + return rtrn.times(right); + } + /** @nocollapse */ + static add(left, right) { + let rtrn = new Int128(new Uint32Array(left.buffer)); + return rtrn.plus(right); + } + /** @nocollapse */ + static from(val, out_buffer = new Uint32Array(4)) { + return Int128.fromString(typeof (val) === 'string' ? val : val.toString(), out_buffer); + } + /** @nocollapse */ + static fromNumber(num, out_buffer = new Uint32Array(4)) { + // Always parse numbers as strings - pulling out high and low bits + // directly seems to lose precision sometimes + // For example: + // > -4613034156400212000 >>> 0 + // 721782784 + // The correct lower 32-bits are 721782752 + return Int128.fromString(num.toString(), out_buffer); + } + /** @nocollapse */ + static fromString(str, out_buffer = new Uint32Array(4)) { + // TODO: Assert that out_buffer is 0 and length = 4 + const negate = str.startsWith('-'); + const length = str.length; + let out = new Int128(out_buffer); + for (let posn = negate ? 1 : 0; posn < length;) { + const group = kInt32DecimalDigits < length - posn ? + kInt32DecimalDigits : length - posn; + const chunk = new Int128(new Uint32Array([parseInt(str.substr(posn, group), 10), 0, 0, 0])); + const multiple = new Int128(new Uint32Array([kPowersOfTen[group], 0, 0, 0])); + out.times(multiple); + out.plus(chunk); + posn += group; + } + return negate ? out.negate() : out; + } + /** @nocollapse */ + static convertArray(values) { + // TODO: Distinguish between string and number at compile-time + const data = new Uint32Array(values.length * 4); + for (let i = -1, n = values.length; ++i < n;) { + Int128.from(values[i], new Uint32Array(data.buffer, data.byteOffset + 4 * 4 * i, 4)); + } + return data; + } +} +exports.Int128 = Int128; + +//# sourceMappingURL=int.js.map diff --git a/frontend/node_modules/apache-arrow/util/int.js.map b/frontend/node_modules/apache-arrow/util/int.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c310d3223d355efb3eb44028da15ecce3bd6de30 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/int.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["util/int.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,cAAc;AACd,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,CAAC;AAE3B,cAAc;AACd,SAAS,QAAQ,CAAC,KAAa;IAC3B,IAAI,KAAK,GAAG,CAAC,EAAE;QACX,KAAK,GAAG,UAAU,GAAG,KAAK,GAAG,CAAC,CAAC;KAClC;IACD,OAAO,KAAK,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC;AACrC,CAAC;AAED,cAAc;AACd,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAC9B,cAAc;AACd,MAAM,YAAY,GAAG,CAAC,CAAC;IACD,EAAE;IACF,GAAG;IACH,IAAI;IACJ,KAAK;IACL,MAAM;IACN,OAAO;IACP,QAAQ;IACR,SAAS,CAAC,CAAC;AAEjC,cAAc;AACd,MAAa,SAAS;IAClB,YAAuB,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAEvC,IAAI,KAAa,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CA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AE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YAE7E,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;YACpB,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAEhB,IAAI,IAAI,KAAK,CAAC;SACjB;QAED,OAAO,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;IACvC,CAAC;IAED,kBAAkB;IACX,MAAM,CAAC,YAAY,CAAC,MAAyB;QAChD,8DAA8D;QAC9D,MAAM,IAAI,GAAG,IAAI,WAAW,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAChD,KAAK,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG;YAC1C,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;SACxF;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAjKD,wBAiKC","file":"int.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n/** @ignore */\nconst carryBit16 = 1 << 16;\n\n/** @ignore */\nfunction intAsHex(value: number): string {\n if (value < 0) {\n value = 0xFFFFFFFF + value + 1;\n }\n return `0x${value.toString(16)}`;\n}\n\n/** @ignore */\nconst kInt32DecimalDigits = 8;\n/** @ignore */\nconst kPowersOfTen = [1,\n 10,\n 100,\n 1000,\n 10000,\n 100000,\n 1000000,\n 10000000,\n 100000000];\n\n/** @ignore */\nexport class BaseInt64 {\n constructor (protected buffer: Uint32Array) {}\n\n public high(): number { return this.buffer[1]; }\n public low (): number { return this.buffer[0]; }\n\n protected _times(other: BaseInt64) {\n // Break the left and right numbers into 16 bit chunks\n // so that we can multiply them without overflow.\n const L = new Uint32Array([\n this.buffer[1] >>> 16,\n this.buffer[1] & 0xFFFF,\n this.buffer[0] >>> 16,\n this.buffer[0] & 0xFFFF\n ]);\n\n const R = new Uint32Array([\n other.buffer[1] >>> 16,\n other.buffer[1] & 0xFFFF,\n other.buffer[0] >>> 16,\n other.buffer[0] & 0xFFFF\n ]);\n\n let product = L[3] * R[3];\n this.buffer[0] = product & 0xFFFF;\n\n let sum = product >>> 16;\n\n product = L[2] * R[3];\n sum += product;\n\n product = (L[3] * R[2]) >>> 0;\n sum += product;\n\n this.buffer[0] += sum << 16;\n\n this.buffer[1] = (sum >>> 0 < product ? carryBit16 : 0);\n\n this.buffer[1] += sum >>> 16;\n this.buffer[1] += L[1] * R[3] + L[2] * R[2] + L[3] * R[1];\n this.buffer[1] += (L[0] * R[3] + L[1] * R[2] + L[2] * R[1] + L[3] * R[0]) << 16;\n\n return this;\n }\n\n protected _plus(other: BaseInt64) {\n const sum = (this.buffer[0] + other.buffer[0]) >>> 0;\n this.buffer[1] += other.buffer[1];\n if (sum < (this.buffer[0] >>> 0)) {\n ++this.buffer[1];\n }\n this.buffer[0] = sum;\n }\n\n public lessThan(other: BaseInt64): boolean {\n return this.buffer[1] < other.buffer[1] ||\n (this.buffer[1] === other.buffer[1] && this.buffer[0] < other.buffer[0]);\n }\n\n public equals(other: BaseInt64): boolean {\n return this.buffer[1] === other.buffer[1] && this.buffer[0] == other.buffer[0];\n }\n\n public greaterThan(other: BaseInt64): boolean {\n return other.lessThan(this);\n }\n\n public hex(): string {\n return `${intAsHex(this.buffer[1])} ${intAsHex(this.buffer[0])}`;\n }\n}\n\n/** @ignore */\nexport class Uint64 extends BaseInt64 {\n public times(other: Uint64): Uint64 {\n this._times(other);\n return this;\n }\n\n public plus(other: Uint64): Uint64 {\n this._plus(other);\n return this;\n }\n\n /** @nocollapse */\n public static from(val: any, out_buffer = new Uint32Array(2)): Uint64 {\n return Uint64.fromString(\n typeof(val) === 'string' ? val : val.toString(),\n out_buffer\n );\n }\n\n /** @nocollapse */\n public static fromNumber(num: number, out_buffer = new Uint32Array(2)): Uint64 {\n // Always parse numbers as strings - pulling out high and low bits\n // directly seems to lose precision sometimes\n // For example:\n // > -4613034156400212000 >>> 0\n // 721782784\n // The correct lower 32-bits are 721782752\n return Uint64.fromString(num.toString(), out_buffer);\n }\n\n /** @nocollapse */\n public static fromString(str: string, out_buffer = new Uint32Array(2)): Uint64 {\n const length = str.length;\n\n let out = new Uint64(out_buffer);\n for (let posn = 0; posn < length;) {\n const group = kInt32DecimalDigits < length - posn ?\n kInt32DecimalDigits : length - posn;\n const chunk = new Uint64(new Uint32Array([parseInt(str.substr(posn, group), 10), 0]));\n const multiple = new Uint64(new Uint32Array([kPowersOfTen[group], 0]));\n\n out.times(multiple);\n out.plus(chunk);\n\n posn += group;\n }\n\n return out;\n }\n\n /** @nocollapse */\n public static convertArray(values: (string|number)[]): Uint32Array {\n const data = new Uint32Array(values.length * 2);\n for (let i = -1, n = values.length; ++i < n;) {\n Uint64.from(values[i], new Uint32Array(data.buffer, data.byteOffset + 2 * i * 4, 2));\n }\n return data;\n }\n\n /** @nocollapse */\n public static multiply(left: Uint64, right: Uint64): Uint64 {\n let rtrn = new Uint64(new Uint32Array(left.buffer));\n return rtrn.times(right);\n }\n\n /** @nocollapse */\n public static add(left: Uint64, right: Uint64): Uint64 {\n let rtrn = new Uint64(new Uint32Array(left.buffer));\n return rtrn.plus(right);\n }\n}\n\n/** @ignore */\nexport class Int64 extends BaseInt64 {\n public negate(): Int64 {\n this.buffer[0] = ~this.buffer[0] + 1;\n this.buffer[1] = ~this.buffer[1];\n\n if (this.buffer[0] == 0) { ++this.buffer[1]; }\n return this;\n }\n\n public times(other: Int64): Int64 {\n this._times(other);\n return this;\n }\n\n public plus(other: Int64): Int64 {\n this._plus(other);\n return this;\n }\n\n public lessThan(other: Int64): boolean {\n // force high bytes to be signed\n const this_high = this.buffer[1] << 0;\n const other_high = other.buffer[1] << 0;\n return this_high < other_high ||\n (this_high === other_high && this.buffer[0] < other.buffer[0]);\n }\n\n /** @nocollapse */\n public static from(val: any, out_buffer = new Uint32Array(2)): Int64 {\n return Int64.fromString(\n typeof(val) === 'string' ? val : val.toString(),\n out_buffer\n );\n }\n\n /** @nocollapse */\n public static fromNumber(num: number, out_buffer = new Uint32Array(2)): Int64 {\n // Always parse numbers as strings - pulling out high and low bits\n // directly seems to lose precision sometimes\n // For example:\n // > -4613034156400212000 >>> 0\n // 721782784\n // The correct lower 32-bits are 721782752\n return Int64.fromString(num.toString(), out_buffer);\n }\n\n /** @nocollapse */\n public static fromString(str: string, out_buffer = new Uint32Array(2)): Int64 {\n // TODO: Assert that out_buffer is 0 and length = 2\n const negate = str.startsWith('-');\n const length = str.length;\n\n let out = new Int64(out_buffer);\n for (let posn = negate ? 1 : 0; posn < length;) {\n const group = kInt32DecimalDigits < length - posn ?\n kInt32DecimalDigits : length - posn;\n const chunk = new Int64(new Uint32Array([parseInt(str.substr(posn, group), 10), 0]));\n const multiple = new Int64(new Uint32Array([kPowersOfTen[group], 0]));\n\n out.times(multiple);\n out.plus(chunk);\n\n posn += group;\n }\n return negate ? out.negate() : out;\n }\n\n /** @nocollapse */\n public static convertArray(values: (string|number)[]): Uint32Array {\n const data = new Uint32Array(values.length * 2);\n for (let i = -1, n = values.length; ++i < n;) {\n Int64.from(values[i], new Uint32Array(data.buffer, data.byteOffset + 2 * i * 4, 2));\n }\n return data;\n }\n\n /** @nocollapse */\n public static multiply(left: Int64, right: Int64): Int64 {\n let rtrn = new Int64(new Uint32Array(left.buffer));\n return rtrn.times(right);\n }\n\n /** @nocollapse */\n public static add(left: Int64, right: Int64): Int64 {\n let rtrn = new Int64(new Uint32Array(left.buffer));\n return rtrn.plus(right);\n }\n}\n\n/** @ignore */\nexport class Int128 {\n constructor (private buffer: Uint32Array) {\n // buffer[3] MSB (high)\n // buffer[2]\n // buffer[1]\n // buffer[0] LSB (low)\n }\n\n public high(): Int64 {\n return new Int64(new Uint32Array(this.buffer.buffer, this.buffer.byteOffset + 8, 2));\n }\n\n public low(): Int64 {\n return new Int64(new Uint32Array(this.buffer.buffer, this.buffer.byteOffset, 2));\n }\n\n public negate(): Int128 {\n this.buffer[0] = ~this.buffer[0] + 1;\n this.buffer[1] = ~this.buffer[1];\n this.buffer[2] = ~this.buffer[2];\n this.buffer[3] = ~this.buffer[3];\n\n if (this.buffer[0] == 0) { ++this.buffer[1]; }\n if (this.buffer[1] == 0) { ++this.buffer[2]; }\n if (this.buffer[2] == 0) { ++this.buffer[3]; }\n return this;\n }\n\n public times(other: Int128): Int128 {\n // Break the left and right numbers into 32 bit chunks\n // so that we can multiply them without overflow.\n const L0 = new Uint64(new Uint32Array([this.buffer[3], 0]));\n const L1 = new Uint64(new Uint32Array([this.buffer[2], 0]));\n const L2 = new Uint64(new Uint32Array([this.buffer[1], 0]));\n const L3 = new Uint64(new Uint32Array([this.buffer[0], 0]));\n\n const R0 = new Uint64(new Uint32Array([other.buffer[3], 0]));\n const R1 = new Uint64(new Uint32Array([other.buffer[2], 0]));\n const R2 = new Uint64(new Uint32Array([other.buffer[1], 0]));\n const R3 = new Uint64(new Uint32Array([other.buffer[0], 0]));\n\n let product = Uint64.multiply(L3, R3);\n this.buffer[0] = product.low();\n\n let sum = new Uint64(new Uint32Array([product.high(), 0]));\n\n product = Uint64.multiply(L2, R3);\n sum.plus(product);\n\n product = Uint64.multiply(L3, R2);\n sum.plus(product);\n\n this.buffer[1] = sum.low();\n\n this.buffer[3] = (sum.lessThan(product) ? 1 : 0);\n\n this.buffer[2] = sum.high();\n let high = new Uint64(new Uint32Array(this.buffer.buffer, this.buffer.byteOffset + 8, 2));\n\n high.plus(Uint64.multiply(L1, R3))\n .plus(Uint64.multiply(L2, R2))\n .plus(Uint64.multiply(L3, R1));\n this.buffer[3] += Uint64.multiply(L0, R3)\n .plus(Uint64.multiply(L1, R2))\n .plus(Uint64.multiply(L2, R1))\n .plus(Uint64.multiply(L3, R0)).low();\n\n return this;\n }\n\n public plus(other: Int128): Int128 {\n let sums = new Uint32Array(4);\n sums[3] = (this.buffer[3] + other.buffer[3]) >>> 0;\n sums[2] = (this.buffer[2] + other.buffer[2]) >>> 0;\n sums[1] = (this.buffer[1] + other.buffer[1]) >>> 0;\n sums[0] = (this.buffer[0] + other.buffer[0]) >>> 0;\n\n if (sums[0] < (this.buffer[0] >>> 0)) {\n ++sums[1];\n }\n if (sums[1] < (this.buffer[1] >>> 0)) {\n ++sums[2];\n }\n if (sums[2] < (this.buffer[2] >>> 0)) {\n ++sums[3];\n }\n\n this.buffer[3] = sums[3];\n this.buffer[2] = sums[2];\n this.buffer[1] = sums[1];\n this.buffer[0] = sums[0];\n\n return this;\n }\n\n public hex(): string {\n return `${intAsHex(this.buffer[3])} ${intAsHex(this.buffer[2])} ${intAsHex(this.buffer[1])} ${intAsHex(this.buffer[0])}`;\n }\n\n /** @nocollapse */\n public static multiply(left: Int128, right: Int128): Int128 {\n let rtrn = new Int128(new Uint32Array(left.buffer));\n return rtrn.times(right);\n }\n\n /** @nocollapse */\n public static add(left: Int128, right: Int128): Int128 {\n let rtrn = new Int128(new Uint32Array(left.buffer));\n return rtrn.plus(right);\n }\n\n /** @nocollapse */\n public static from(val: any, out_buffer = new Uint32Array(4)): Int128 {\n return Int128.fromString(\n typeof(val) === 'string' ? val : val.toString(),\n out_buffer\n );\n }\n\n /** @nocollapse */\n public static fromNumber(num: number, out_buffer = new Uint32Array(4)): Int128 {\n // Always parse numbers as strings - pulling out high and low bits\n // directly seems to lose precision sometimes\n // For example:\n // > -4613034156400212000 >>> 0\n // 721782784\n // The correct lower 32-bits are 721782752\n return Int128.fromString(num.toString(), out_buffer);\n }\n\n /** @nocollapse */\n public static fromString(str: string, out_buffer = new Uint32Array(4)): Int128 {\n // TODO: Assert that out_buffer is 0 and length = 4\n const negate = str.startsWith('-');\n const length = str.length;\n\n let out = new Int128(out_buffer);\n for (let posn = negate ? 1 : 0; posn < length;) {\n const group = kInt32DecimalDigits < length - posn ?\n kInt32DecimalDigits : length - posn;\n const chunk = new Int128(new Uint32Array([parseInt(str.substr(posn, group), 10), 0, 0, 0]));\n const multiple = new Int128(new Uint32Array([kPowersOfTen[group], 0, 0, 0]));\n\n out.times(multiple);\n out.plus(chunk);\n\n posn += group;\n }\n\n return negate ? out.negate() : out;\n }\n\n /** @nocollapse */\n public static convertArray(values: (string|number)[]): Uint32Array {\n // TODO: Distinguish between string and number at compile-time\n const data = new Uint32Array(values.length * 4);\n for (let i = -1, n = values.length; ++i < n;) {\n Int128.from(values[i], new Uint32Array(data.buffer, data.byteOffset + 4 * 4 * i, 4));\n }\n return data;\n }\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/util/int.mjs b/frontend/node_modules/apache-arrow/util/int.mjs new file mode 100644 index 0000000000000000000000000000000000000000..246d63466c17d0a5c90adb3a707e1d467af8c47b --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/int.mjs @@ -0,0 +1,367 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +/** @ignore */ +const carryBit16 = 1 << 16; +/** @ignore */ +function intAsHex(value) { + if (value < 0) { + value = 0xFFFFFFFF + value + 1; + } + return `0x${value.toString(16)}`; +} +/** @ignore */ +const kInt32DecimalDigits = 8; +/** @ignore */ +const kPowersOfTen = [1, + 10, + 100, + 1000, + 10000, + 100000, + 1000000, + 10000000, + 100000000]; +/** @ignore */ +export class BaseInt64 { + constructor(buffer) { + this.buffer = buffer; + } + high() { return this.buffer[1]; } + low() { return this.buffer[0]; } + _times(other) { + // Break the left and right numbers into 16 bit chunks + // so that we can multiply them without overflow. + const L = new Uint32Array([ + this.buffer[1] >>> 16, + this.buffer[1] & 0xFFFF, + this.buffer[0] >>> 16, + this.buffer[0] & 0xFFFF + ]); + const R = new Uint32Array([ + other.buffer[1] >>> 16, + other.buffer[1] & 0xFFFF, + other.buffer[0] >>> 16, + other.buffer[0] & 0xFFFF + ]); + let product = L[3] * R[3]; + this.buffer[0] = product & 0xFFFF; + let sum = product >>> 16; + product = L[2] * R[3]; + sum += product; + product = (L[3] * R[2]) >>> 0; + sum += product; + this.buffer[0] += sum << 16; + this.buffer[1] = (sum >>> 0 < product ? carryBit16 : 0); + this.buffer[1] += sum >>> 16; + this.buffer[1] += L[1] * R[3] + L[2] * R[2] + L[3] * R[1]; + this.buffer[1] += (L[0] * R[3] + L[1] * R[2] + L[2] * R[1] + L[3] * R[0]) << 16; + return this; + } + _plus(other) { + const sum = (this.buffer[0] + other.buffer[0]) >>> 0; + this.buffer[1] += other.buffer[1]; + if (sum < (this.buffer[0] >>> 0)) { + ++this.buffer[1]; + } + this.buffer[0] = sum; + } + lessThan(other) { + return this.buffer[1] < other.buffer[1] || + (this.buffer[1] === other.buffer[1] && this.buffer[0] < other.buffer[0]); + } + equals(other) { + return this.buffer[1] === other.buffer[1] && this.buffer[0] == other.buffer[0]; + } + greaterThan(other) { + return other.lessThan(this); + } + hex() { + return `${intAsHex(this.buffer[1])} ${intAsHex(this.buffer[0])}`; + } +} +/** @ignore */ +export class Uint64 extends BaseInt64 { + times(other) { + this._times(other); + return this; + } + plus(other) { + this._plus(other); + return this; + } + /** @nocollapse */ + static from(val, out_buffer = new Uint32Array(2)) { + return Uint64.fromString(typeof (val) === 'string' ? val : val.toString(), out_buffer); + } + /** @nocollapse */ + static fromNumber(num, out_buffer = new Uint32Array(2)) { + // Always parse numbers as strings - pulling out high and low bits + // directly seems to lose precision sometimes + // For example: + // > -4613034156400212000 >>> 0 + // 721782784 + // The correct lower 32-bits are 721782752 + return Uint64.fromString(num.toString(), out_buffer); + } + /** @nocollapse */ + static fromString(str, out_buffer = new Uint32Array(2)) { + const length = str.length; + let out = new Uint64(out_buffer); + for (let posn = 0; posn < length;) { + const group = kInt32DecimalDigits < length - posn ? + kInt32DecimalDigits : length - posn; + const chunk = new Uint64(new Uint32Array([parseInt(str.substr(posn, group), 10), 0])); + const multiple = new Uint64(new Uint32Array([kPowersOfTen[group], 0])); + out.times(multiple); + out.plus(chunk); + posn += group; + } + return out; + } + /** @nocollapse */ + static convertArray(values) { + const data = new Uint32Array(values.length * 2); + for (let i = -1, n = values.length; ++i < n;) { + Uint64.from(values[i], new Uint32Array(data.buffer, data.byteOffset + 2 * i * 4, 2)); + } + return data; + } + /** @nocollapse */ + static multiply(left, right) { + let rtrn = new Uint64(new Uint32Array(left.buffer)); + return rtrn.times(right); + } + /** @nocollapse */ + static add(left, right) { + let rtrn = new Uint64(new Uint32Array(left.buffer)); + return rtrn.plus(right); + } +} +/** @ignore */ +export class Int64 extends BaseInt64 { + negate() { + this.buffer[0] = ~this.buffer[0] + 1; + this.buffer[1] = ~this.buffer[1]; + if (this.buffer[0] == 0) { + ++this.buffer[1]; + } + return this; + } + times(other) { + this._times(other); + return this; + } + plus(other) { + this._plus(other); + return this; + } + lessThan(other) { + // force high bytes to be signed + const this_high = this.buffer[1] << 0; + const other_high = other.buffer[1] << 0; + return this_high < other_high || + (this_high === other_high && this.buffer[0] < other.buffer[0]); + } + /** @nocollapse */ + static from(val, out_buffer = new Uint32Array(2)) { + return Int64.fromString(typeof (val) === 'string' ? val : val.toString(), out_buffer); + } + /** @nocollapse */ + static fromNumber(num, out_buffer = new Uint32Array(2)) { + // Always parse numbers as strings - pulling out high and low bits + // directly seems to lose precision sometimes + // For example: + // > -4613034156400212000 >>> 0 + // 721782784 + // The correct lower 32-bits are 721782752 + return Int64.fromString(num.toString(), out_buffer); + } + /** @nocollapse */ + static fromString(str, out_buffer = new Uint32Array(2)) { + // TODO: Assert that out_buffer is 0 and length = 2 + const negate = str.startsWith('-'); + const length = str.length; + let out = new Int64(out_buffer); + for (let posn = negate ? 1 : 0; posn < length;) { + const group = kInt32DecimalDigits < length - posn ? + kInt32DecimalDigits : length - posn; + const chunk = new Int64(new Uint32Array([parseInt(str.substr(posn, group), 10), 0])); + const multiple = new Int64(new Uint32Array([kPowersOfTen[group], 0])); + out.times(multiple); + out.plus(chunk); + posn += group; + } + return negate ? out.negate() : out; + } + /** @nocollapse */ + static convertArray(values) { + const data = new Uint32Array(values.length * 2); + for (let i = -1, n = values.length; ++i < n;) { + Int64.from(values[i], new Uint32Array(data.buffer, data.byteOffset + 2 * i * 4, 2)); + } + return data; + } + /** @nocollapse */ + static multiply(left, right) { + let rtrn = new Int64(new Uint32Array(left.buffer)); + return rtrn.times(right); + } + /** @nocollapse */ + static add(left, right) { + let rtrn = new Int64(new Uint32Array(left.buffer)); + return rtrn.plus(right); + } +} +/** @ignore */ +export class Int128 { + constructor(buffer) { + this.buffer = buffer; + // buffer[3] MSB (high) + // buffer[2] + // buffer[1] + // buffer[0] LSB (low) + } + high() { + return new Int64(new Uint32Array(this.buffer.buffer, this.buffer.byteOffset + 8, 2)); + } + low() { + return new Int64(new Uint32Array(this.buffer.buffer, this.buffer.byteOffset, 2)); + } + negate() { + this.buffer[0] = ~this.buffer[0] + 1; + this.buffer[1] = ~this.buffer[1]; + this.buffer[2] = ~this.buffer[2]; + this.buffer[3] = ~this.buffer[3]; + if (this.buffer[0] == 0) { + ++this.buffer[1]; + } + if (this.buffer[1] == 0) { + ++this.buffer[2]; + } + if (this.buffer[2] == 0) { + ++this.buffer[3]; + } + return this; + } + times(other) { + // Break the left and right numbers into 32 bit chunks + // so that we can multiply them without overflow. + const L0 = new Uint64(new Uint32Array([this.buffer[3], 0])); + const L1 = new Uint64(new Uint32Array([this.buffer[2], 0])); + const L2 = new Uint64(new Uint32Array([this.buffer[1], 0])); + const L3 = new Uint64(new Uint32Array([this.buffer[0], 0])); + const R0 = new Uint64(new Uint32Array([other.buffer[3], 0])); + const R1 = new Uint64(new Uint32Array([other.buffer[2], 0])); + const R2 = new Uint64(new Uint32Array([other.buffer[1], 0])); + const R3 = new Uint64(new Uint32Array([other.buffer[0], 0])); + let product = Uint64.multiply(L3, R3); + this.buffer[0] = product.low(); + let sum = new Uint64(new Uint32Array([product.high(), 0])); + product = Uint64.multiply(L2, R3); + sum.plus(product); + product = Uint64.multiply(L3, R2); + sum.plus(product); + this.buffer[1] = sum.low(); + this.buffer[3] = (sum.lessThan(product) ? 1 : 0); + this.buffer[2] = sum.high(); + let high = new Uint64(new Uint32Array(this.buffer.buffer, this.buffer.byteOffset + 8, 2)); + high.plus(Uint64.multiply(L1, R3)) + .plus(Uint64.multiply(L2, R2)) + .plus(Uint64.multiply(L3, R1)); + this.buffer[3] += Uint64.multiply(L0, R3) + .plus(Uint64.multiply(L1, R2)) + .plus(Uint64.multiply(L2, R1)) + .plus(Uint64.multiply(L3, R0)).low(); + return this; + } + plus(other) { + let sums = new Uint32Array(4); + sums[3] = (this.buffer[3] + other.buffer[3]) >>> 0; + sums[2] = (this.buffer[2] + other.buffer[2]) >>> 0; + sums[1] = (this.buffer[1] + other.buffer[1]) >>> 0; + sums[0] = (this.buffer[0] + other.buffer[0]) >>> 0; + if (sums[0] < (this.buffer[0] >>> 0)) { + ++sums[1]; + } + if (sums[1] < (this.buffer[1] >>> 0)) { + ++sums[2]; + } + if (sums[2] < (this.buffer[2] >>> 0)) { + ++sums[3]; + } + this.buffer[3] = sums[3]; + this.buffer[2] = sums[2]; + this.buffer[1] = sums[1]; + this.buffer[0] = sums[0]; + return this; + } + hex() { + return `${intAsHex(this.buffer[3])} ${intAsHex(this.buffer[2])} ${intAsHex(this.buffer[1])} ${intAsHex(this.buffer[0])}`; + } + /** @nocollapse */ + static multiply(left, right) { + let rtrn = new Int128(new Uint32Array(left.buffer)); + return rtrn.times(right); + } + /** @nocollapse */ + static add(left, right) { + let rtrn = new Int128(new Uint32Array(left.buffer)); + return rtrn.plus(right); + } + /** @nocollapse */ + static from(val, out_buffer = new Uint32Array(4)) { + return Int128.fromString(typeof (val) === 'string' ? val : val.toString(), out_buffer); + } + /** @nocollapse */ + static fromNumber(num, out_buffer = new Uint32Array(4)) { + // Always parse numbers as strings - pulling out high and low bits + // directly seems to lose precision sometimes + // For example: + // > -4613034156400212000 >>> 0 + // 721782784 + // The correct lower 32-bits are 721782752 + return Int128.fromString(num.toString(), out_buffer); + } + /** @nocollapse */ + static fromString(str, out_buffer = new Uint32Array(4)) { + // TODO: Assert that out_buffer is 0 and length = 4 + const negate = str.startsWith('-'); + const length = str.length; + let out = new Int128(out_buffer); + for (let posn = negate ? 1 : 0; posn < length;) { + const group = kInt32DecimalDigits < length - posn ? + kInt32DecimalDigits : length - posn; + const chunk = new Int128(new Uint32Array([parseInt(str.substr(posn, group), 10), 0, 0, 0])); + const multiple = new Int128(new Uint32Array([kPowersOfTen[group], 0, 0, 0])); + out.times(multiple); + out.plus(chunk); + posn += group; + } + return negate ? out.negate() : out; + } + /** @nocollapse */ + static convertArray(values) { + // TODO: Distinguish between string and number at compile-time + const data = new Uint32Array(values.length * 4); + for (let i = -1, n = values.length; ++i < n;) { + Int128.from(values[i], new Uint32Array(data.buffer, data.byteOffset + 4 * 4 * i, 4)); + } + return data; + } +} + +//# sourceMappingURL=int.mjs.map diff --git a/frontend/node_modules/apache-arrow/util/int.mjs.map b/frontend/node_modules/apache-arrow/util/int.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..bed445379738acaa2db93bcd8809574a5eef7e4f --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/int.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["util/int.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,cAAc;AACd,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,CAAC;AAE3B,cAAc;AACd,SAAS,QAAQ,CAAC,KAAa;IAC3B,IAAI,KAAK,GAAG,CAAC,EAAE;QACX,KAAK,GAAG,UAAU,GAAG,KAAK,GAAG,CAAC,CAAC;KAClC;IACD,OAAO,KAAK,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC;AACrC,CAAC;AAED,cAAc;AACd,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAC9B,cAAc;AACd,MAAM,YAAY,GAAG,CAAC,CAAC;IACD,EAAE;IACF,GAAG;IACH,IAAI;IACJ,KAAK;IACL,MAAM;IACN,OAAO;IACP,QAAQ;IACR,SAAS,CAAC,CAAC;AAEjC,cAAc;AACd,MAAM,OAAO,SAAS;IAClB,YAAuB,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAEvC,IAAI,KAAa,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACzC,GAAG,KAAc,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAEtC,MAAM,CAAC,KAAgB;QAC7B,sDAAsD;QACtD,iDAAiD;QACjD,MAAM,CAAC,GAAG,IAAI,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AM,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;IACvC,CAAC;IAED,kBAAkB;IACX,MAAM,CAAC,YAAY,CAAC,MAAyB;QAChD,8DAA8D;QAC9D,MAAM,IAAI,GAAG,IAAI,WAAW,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAChD,KAAK,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG;YAC1C,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;SACxF;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ","file":"int.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n/** @ignore */\nconst carryBit16 = 1 << 16;\n\n/** @ignore */\nfunction intAsHex(value: number): string {\n if (value < 0) {\n value = 0xFFFFFFFF + value + 1;\n }\n return `0x${value.toString(16)}`;\n}\n\n/** @ignore */\nconst kInt32DecimalDigits = 8;\n/** @ignore */\nconst kPowersOfTen = [1,\n 10,\n 100,\n 1000,\n 10000,\n 100000,\n 1000000,\n 10000000,\n 100000000];\n\n/** @ignore */\nexport class BaseInt64 {\n constructor (protected buffer: Uint32Array) {}\n\n public high(): number { return this.buffer[1]; }\n public low (): number { return this.buffer[0]; }\n\n protected _times(other: BaseInt64) {\n // Break the left and right numbers into 16 bit chunks\n // so that we can multiply them without overflow.\n const L = new Uint32Array([\n this.buffer[1] >>> 16,\n this.buffer[1] & 0xFFFF,\n this.buffer[0] >>> 16,\n this.buffer[0] & 0xFFFF\n ]);\n\n const R = new Uint32Array([\n other.buffer[1] >>> 16,\n other.buffer[1] & 0xFFFF,\n other.buffer[0] >>> 16,\n other.buffer[0] & 0xFFFF\n ]);\n\n let product = L[3] * R[3];\n this.buffer[0] = product & 0xFFFF;\n\n let sum = product >>> 16;\n\n product = L[2] * R[3];\n sum += product;\n\n product = (L[3] * R[2]) >>> 0;\n sum += product;\n\n this.buffer[0] += sum << 16;\n\n this.buffer[1] = (sum >>> 0 < product ? carryBit16 : 0);\n\n this.buffer[1] += sum >>> 16;\n this.buffer[1] += L[1] * R[3] + L[2] * R[2] + L[3] * R[1];\n this.buffer[1] += (L[0] * R[3] + L[1] * R[2] + L[2] * R[1] + L[3] * R[0]) << 16;\n\n return this;\n }\n\n protected _plus(other: BaseInt64) {\n const sum = (this.buffer[0] + other.buffer[0]) >>> 0;\n this.buffer[1] += other.buffer[1];\n if (sum < (this.buffer[0] >>> 0)) {\n ++this.buffer[1];\n }\n this.buffer[0] = sum;\n }\n\n public lessThan(other: BaseInt64): boolean {\n return this.buffer[1] < other.buffer[1] ||\n (this.buffer[1] === other.buffer[1] && this.buffer[0] < other.buffer[0]);\n }\n\n public equals(other: BaseInt64): boolean {\n return this.buffer[1] === other.buffer[1] && this.buffer[0] == other.buffer[0];\n }\n\n public greaterThan(other: BaseInt64): boolean {\n return other.lessThan(this);\n }\n\n public hex(): string {\n return `${intAsHex(this.buffer[1])} ${intAsHex(this.buffer[0])}`;\n }\n}\n\n/** @ignore */\nexport class Uint64 extends BaseInt64 {\n public times(other: Uint64): Uint64 {\n this._times(other);\n return this;\n }\n\n public plus(other: Uint64): Uint64 {\n this._plus(other);\n return this;\n }\n\n /** @nocollapse */\n public static from(val: any, out_buffer = new Uint32Array(2)): Uint64 {\n return Uint64.fromString(\n typeof(val) === 'string' ? val : val.toString(),\n out_buffer\n );\n }\n\n /** @nocollapse */\n public static fromNumber(num: number, out_buffer = new Uint32Array(2)): Uint64 {\n // Always parse numbers as strings - pulling out high and low bits\n // directly seems to lose precision sometimes\n // For example:\n // > -4613034156400212000 >>> 0\n // 721782784\n // The correct lower 32-bits are 721782752\n return Uint64.fromString(num.toString(), out_buffer);\n }\n\n /** @nocollapse */\n public static fromString(str: string, out_buffer = new Uint32Array(2)): Uint64 {\n const length = str.length;\n\n let out = new Uint64(out_buffer);\n for (let posn = 0; posn < length;) {\n const group = kInt32DecimalDigits < length - posn ?\n kInt32DecimalDigits : length - posn;\n const chunk = new Uint64(new Uint32Array([parseInt(str.substr(posn, group), 10), 0]));\n const multiple = new Uint64(new Uint32Array([kPowersOfTen[group], 0]));\n\n out.times(multiple);\n out.plus(chunk);\n\n posn += group;\n }\n\n return out;\n }\n\n /** @nocollapse */\n public static convertArray(values: (string|number)[]): Uint32Array {\n const data = new Uint32Array(values.length * 2);\n for (let i = -1, n = values.length; ++i < n;) {\n Uint64.from(values[i], new Uint32Array(data.buffer, data.byteOffset + 2 * i * 4, 2));\n }\n return data;\n }\n\n /** @nocollapse */\n public static multiply(left: Uint64, right: Uint64): Uint64 {\n let rtrn = new Uint64(new Uint32Array(left.buffer));\n return rtrn.times(right);\n }\n\n /** @nocollapse */\n public static add(left: Uint64, right: Uint64): Uint64 {\n let rtrn = new Uint64(new Uint32Array(left.buffer));\n return rtrn.plus(right);\n }\n}\n\n/** @ignore */\nexport class Int64 extends BaseInt64 {\n public negate(): Int64 {\n this.buffer[0] = ~this.buffer[0] + 1;\n this.buffer[1] = ~this.buffer[1];\n\n if (this.buffer[0] == 0) { ++this.buffer[1]; }\n return this;\n }\n\n public times(other: Int64): Int64 {\n this._times(other);\n return this;\n }\n\n public plus(other: Int64): Int64 {\n this._plus(other);\n return this;\n }\n\n public lessThan(other: Int64): boolean {\n // force high bytes to be signed\n const this_high = this.buffer[1] << 0;\n const other_high = other.buffer[1] << 0;\n return this_high < other_high ||\n (this_high === other_high && this.buffer[0] < other.buffer[0]);\n }\n\n /** @nocollapse */\n public static from(val: any, out_buffer = new Uint32Array(2)): Int64 {\n return Int64.fromString(\n typeof(val) === 'string' ? val : val.toString(),\n out_buffer\n );\n }\n\n /** @nocollapse */\n public static fromNumber(num: number, out_buffer = new Uint32Array(2)): Int64 {\n // Always parse numbers as strings - pulling out high and low bits\n // directly seems to lose precision sometimes\n // For example:\n // > -4613034156400212000 >>> 0\n // 721782784\n // The correct lower 32-bits are 721782752\n return Int64.fromString(num.toString(), out_buffer);\n }\n\n /** @nocollapse */\n public static fromString(str: string, out_buffer = new Uint32Array(2)): Int64 {\n // TODO: Assert that out_buffer is 0 and length = 2\n const negate = str.startsWith('-');\n const length = str.length;\n\n let out = new Int64(out_buffer);\n for (let posn = negate ? 1 : 0; posn < length;) {\n const group = kInt32DecimalDigits < length - posn ?\n kInt32DecimalDigits : length - posn;\n const chunk = new Int64(new Uint32Array([parseInt(str.substr(posn, group), 10), 0]));\n const multiple = new Int64(new Uint32Array([kPowersOfTen[group], 0]));\n\n out.times(multiple);\n out.plus(chunk);\n\n posn += group;\n }\n return negate ? out.negate() : out;\n }\n\n /** @nocollapse */\n public static convertArray(values: (string|number)[]): Uint32Array {\n const data = new Uint32Array(values.length * 2);\n for (let i = -1, n = values.length; ++i < n;) {\n Int64.from(values[i], new Uint32Array(data.buffer, data.byteOffset + 2 * i * 4, 2));\n }\n return data;\n }\n\n /** @nocollapse */\n public static multiply(left: Int64, right: Int64): Int64 {\n let rtrn = new Int64(new Uint32Array(left.buffer));\n return rtrn.times(right);\n }\n\n /** @nocollapse */\n public static add(left: Int64, right: Int64): Int64 {\n let rtrn = new Int64(new Uint32Array(left.buffer));\n return rtrn.plus(right);\n }\n}\n\n/** @ignore */\nexport class Int128 {\n constructor (private buffer: Uint32Array) {\n // buffer[3] MSB (high)\n // buffer[2]\n // buffer[1]\n // buffer[0] LSB (low)\n }\n\n public high(): Int64 {\n return new Int64(new Uint32Array(this.buffer.buffer, this.buffer.byteOffset + 8, 2));\n }\n\n public low(): Int64 {\n return new Int64(new Uint32Array(this.buffer.buffer, this.buffer.byteOffset, 2));\n }\n\n public negate(): Int128 {\n this.buffer[0] = ~this.buffer[0] + 1;\n this.buffer[1] = ~this.buffer[1];\n this.buffer[2] = ~this.buffer[2];\n this.buffer[3] = ~this.buffer[3];\n\n if (this.buffer[0] == 0) { ++this.buffer[1]; }\n if (this.buffer[1] == 0) { ++this.buffer[2]; }\n if (this.buffer[2] == 0) { ++this.buffer[3]; }\n return this;\n }\n\n public times(other: Int128): Int128 {\n // Break the left and right numbers into 32 bit chunks\n // so that we can multiply them without overflow.\n const L0 = new Uint64(new Uint32Array([this.buffer[3], 0]));\n const L1 = new Uint64(new Uint32Array([this.buffer[2], 0]));\n const L2 = new Uint64(new Uint32Array([this.buffer[1], 0]));\n const L3 = new Uint64(new Uint32Array([this.buffer[0], 0]));\n\n const R0 = new Uint64(new Uint32Array([other.buffer[3], 0]));\n const R1 = new Uint64(new Uint32Array([other.buffer[2], 0]));\n const R2 = new Uint64(new Uint32Array([other.buffer[1], 0]));\n const R3 = new Uint64(new Uint32Array([other.buffer[0], 0]));\n\n let product = Uint64.multiply(L3, R3);\n this.buffer[0] = product.low();\n\n let sum = new Uint64(new Uint32Array([product.high(), 0]));\n\n product = Uint64.multiply(L2, R3);\n sum.plus(product);\n\n product = Uint64.multiply(L3, R2);\n sum.plus(product);\n\n this.buffer[1] = sum.low();\n\n this.buffer[3] = (sum.lessThan(product) ? 1 : 0);\n\n this.buffer[2] = sum.high();\n let high = new Uint64(new Uint32Array(this.buffer.buffer, this.buffer.byteOffset + 8, 2));\n\n high.plus(Uint64.multiply(L1, R3))\n .plus(Uint64.multiply(L2, R2))\n .plus(Uint64.multiply(L3, R1));\n this.buffer[3] += Uint64.multiply(L0, R3)\n .plus(Uint64.multiply(L1, R2))\n .plus(Uint64.multiply(L2, R1))\n .plus(Uint64.multiply(L3, R0)).low();\n\n return this;\n }\n\n public plus(other: Int128): Int128 {\n let sums = new Uint32Array(4);\n sums[3] = (this.buffer[3] + other.buffer[3]) >>> 0;\n sums[2] = (this.buffer[2] + other.buffer[2]) >>> 0;\n sums[1] = (this.buffer[1] + other.buffer[1]) >>> 0;\n sums[0] = (this.buffer[0] + other.buffer[0]) >>> 0;\n\n if (sums[0] < (this.buffer[0] >>> 0)) {\n ++sums[1];\n }\n if (sums[1] < (this.buffer[1] >>> 0)) {\n ++sums[2];\n }\n if (sums[2] < (this.buffer[2] >>> 0)) {\n ++sums[3];\n }\n\n this.buffer[3] = sums[3];\n this.buffer[2] = sums[2];\n this.buffer[1] = sums[1];\n this.buffer[0] = sums[0];\n\n return this;\n }\n\n public hex(): string {\n return `${intAsHex(this.buffer[3])} ${intAsHex(this.buffer[2])} ${intAsHex(this.buffer[1])} ${intAsHex(this.buffer[0])}`;\n }\n\n /** @nocollapse */\n public static multiply(left: Int128, right: Int128): Int128 {\n let rtrn = new Int128(new Uint32Array(left.buffer));\n return rtrn.times(right);\n }\n\n /** @nocollapse */\n public static add(left: Int128, right: Int128): Int128 {\n let rtrn = new Int128(new Uint32Array(left.buffer));\n return rtrn.plus(right);\n }\n\n /** @nocollapse */\n public static from(val: any, out_buffer = new Uint32Array(4)): Int128 {\n return Int128.fromString(\n typeof(val) === 'string' ? val : val.toString(),\n out_buffer\n );\n }\n\n /** @nocollapse */\n public static fromNumber(num: number, out_buffer = new Uint32Array(4)): Int128 {\n // Always parse numbers as strings - pulling out high and low bits\n // directly seems to lose precision sometimes\n // For example:\n // > -4613034156400212000 >>> 0\n // 721782784\n // The correct lower 32-bits are 721782752\n return Int128.fromString(num.toString(), out_buffer);\n }\n\n /** @nocollapse */\n public static fromString(str: string, out_buffer = new Uint32Array(4)): Int128 {\n // TODO: Assert that out_buffer is 0 and length = 4\n const negate = str.startsWith('-');\n const length = str.length;\n\n let out = new Int128(out_buffer);\n for (let posn = negate ? 1 : 0; posn < length;) {\n const group = kInt32DecimalDigits < length - posn ?\n kInt32DecimalDigits : length - posn;\n const chunk = new Int128(new Uint32Array([parseInt(str.substr(posn, group), 10), 0, 0, 0]));\n const multiple = new Int128(new Uint32Array([kPowersOfTen[group], 0, 0, 0]));\n\n out.times(multiple);\n out.plus(chunk);\n\n posn += group;\n }\n\n return negate ? out.negate() : out;\n }\n\n /** @nocollapse */\n public static convertArray(values: (string|number)[]): Uint32Array {\n // TODO: Distinguish between string and number at compile-time\n const data = new Uint32Array(values.length * 4);\n for (let i = -1, n = values.length; ++i < n;) {\n Int128.from(values[i], new Uint32Array(data.buffer, data.byteOffset + 4 * 4 * i, 4));\n }\n return data;\n }\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/util/math.d.ts b/frontend/node_modules/apache-arrow/util/math.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..23ab0a0c2248ef037f51557cff77d8d69ae79c13 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/math.d.ts @@ -0,0 +1,16 @@ +/** + * Convert uint16 (logically a float16) to a JS float64. Inspired by numpy's `npy_half_to_double`: + * https://github.com/numpy/numpy/blob/5a5987291dc95376bb098be8d8e5391e89e77a2c/numpy/core/src/npymath/halffloat.c#L29 + * @param h {number} the uint16 to convert + * @private + * @ignore + */ +export declare function uint16ToFloat64(h: number): number; +/** + * Convert a float64 to uint16 (assuming the float64 is logically a float16). Inspired by numpy's `npy_double_to_half`: + * https://github.com/numpy/numpy/blob/5a5987291dc95376bb098be8d8e5391e89e77a2c/numpy/core/src/npymath/halffloat.c#L43 + * @param d {number} The float64 to convert + * @private + * @ignore + */ +export declare function float64ToUint16(d: number): number; diff --git a/frontend/node_modules/apache-arrow/util/math.js b/frontend/node_modules/apache-arrow/util/math.js new file mode 100644 index 0000000000000000000000000000000000000000..0735b714ec5436677319e894e5d3256950a75910 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/math.js @@ -0,0 +1,106 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const f64 = new Float64Array(1); +const u32 = new Uint32Array(f64.buffer); +/** + * Convert uint16 (logically a float16) to a JS float64. Inspired by numpy's `npy_half_to_double`: + * https://github.com/numpy/numpy/blob/5a5987291dc95376bb098be8d8e5391e89e77a2c/numpy/core/src/npymath/halffloat.c#L29 + * @param h {number} the uint16 to convert + * @private + * @ignore + */ +function uint16ToFloat64(h) { + let expo = (h & 0x7C00) >> 10; + let sigf = (h & 0x03FF) / 1024; + let sign = (-1) ** ((h & 0x8000) >> 15); + switch (expo) { + case 0x1F: return sign * (sigf ? NaN : 1 / 0); + case 0x00: return sign * (sigf ? 6.103515625e-5 * sigf : 0); + } + return sign * (2 ** (expo - 15)) * (1 + sigf); +} +exports.uint16ToFloat64 = uint16ToFloat64; +/** + * Convert a float64 to uint16 (assuming the float64 is logically a float16). Inspired by numpy's `npy_double_to_half`: + * https://github.com/numpy/numpy/blob/5a5987291dc95376bb098be8d8e5391e89e77a2c/numpy/core/src/npymath/halffloat.c#L43 + * @param d {number} The float64 to convert + * @private + * @ignore + */ +function float64ToUint16(d) { + if (d !== d) { + return 0x7E00; + } // NaN + f64[0] = d; + // Magic numbers: + // 0x80000000 = 10000000 00000000 00000000 00000000 -- masks the 32nd bit + // 0x7ff00000 = 01111111 11110000 00000000 00000000 -- masks the 21st-31st bits + // 0x000fffff = 00000000 00001111 11111111 11111111 -- masks the 1st-20th bit + let sign = (u32[1] & 0x80000000) >> 16 & 0xFFFF; + let expo = (u32[1] & 0x7ff00000), sigf = 0x0000; + if (expo >= 0x40f00000) { + // + // If exponent overflowed, the float16 is either NaN or Infinity. + // Rules to propagate the sign bit: mantissa > 0 ? NaN : +/-Infinity + // + // Magic numbers: + // 0x40F00000 = 01000000 11110000 00000000 00000000 -- 6-bit exponent overflow + // 0x7C000000 = 01111100 00000000 00000000 00000000 -- masks the 27th-31st bits + // + // returns: + // qNaN, aka 32256 decimal, 0x7E00 hex, or 01111110 00000000 binary + // sNaN, aka 32000 decimal, 0x7D00 hex, or 01111101 00000000 binary + // +inf, aka 31744 decimal, 0x7C00 hex, or 01111100 00000000 binary + // -inf, aka 64512 decimal, 0xFC00 hex, or 11111100 00000000 binary + // + // If mantissa is greater than 23 bits, set to +Infinity like numpy + if (u32[0] > 0) { + expo = 0x7C00; + } + else { + expo = (expo & 0x7C000000) >> 16; + sigf = (u32[1] & 0x000fffff) >> 10; + } + } + else if (expo <= 0x3f000000) { + // + // If exponent underflowed, the float is either signed zero or subnormal. + // + // Magic numbers: + // 0x3F000000 = 00111111 00000000 00000000 00000000 -- 6-bit exponent underflow + // + sigf = 0x100000 + (u32[1] & 0x000fffff); + sigf = 0x100000 + (sigf << ((expo >> 20) - 998)) >> 21; + expo = 0; + } + else { + // + // No overflow or underflow, rebase the exponent and round the mantissa + // Magic numbers: + // 0x200 = 00000010 00000000 -- masks off the 10th bit + // + // Ensure the first mantissa bit (the 10th one) is 1 and round + expo = (expo - 0x3f000000) >> 10; + sigf = ((u32[1] & 0x000fffff) + 0x200) >> 10; + } + return sign | expo | sigf & 0xFFFF; +} +exports.float64ToUint16 = float64ToUint16; + +//# sourceMappingURL=math.js.map diff --git a/frontend/node_modules/apache-arrow/util/math.js.map b/frontend/node_modules/apache-arrow/util/math.js.map new file mode 100644 index 0000000000000000000000000000000000000000..7559bf83650d0ee9e5b2178e3eeb8fc6efb393e4 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/math.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["util/math.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,MAAM,GAAG,GAAG,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC;AAChC,MAAM,GAAG,GAAG,IAAI,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAExC;;;;;;GAMG;AACH,SAAgB,eAAe,CAAC,CAAS;IACrC,IAAI,IAAI,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;IAC9B,IAAI,IAAI,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,GAAG,IAAI,CAAC;IAC/B,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;IACxC,QAAQ,IAAI,EAAE;QACV,KAAK,IAAI,CAAC,CAAC,OAAO,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QAC9C,KAAK,IAAI,CAAC,CAAC,OAAO,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KAC/D;IACD,OAAO,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAA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,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;QACvD,IAAI,GAAG,CAAC,CAAC;KACZ;SAAM;QACH,EAAE;QACF,uEAAuE;QACvE,iBAAiB;QACjB,sDAAsD;QACtD,EAAE;QAEF,8DAA8D;QAC9D,IAAI,GAAG,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC;QACjC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;KAChD;IAED,OAAO,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AACvC,CAAC;AA3DD,0CA2DC","file":"math.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nconst f64 = new Float64Array(1);\nconst u32 = new Uint32Array(f64.buffer);\n\n/**\n * Convert uint16 (logically a float16) to a JS float64. Inspired by numpy's `npy_half_to_double`:\n * https://github.com/numpy/numpy/blob/5a5987291dc95376bb098be8d8e5391e89e77a2c/numpy/core/src/npymath/halffloat.c#L29\n * @param h {number} the uint16 to convert\n * @private\n * @ignore\n */\nexport function uint16ToFloat64(h: number) {\n let expo = (h & 0x7C00) >> 10;\n let sigf = (h & 0x03FF) / 1024;\n let sign = (-1) ** ((h & 0x8000) >> 15);\n switch (expo) {\n case 0x1F: return sign * (sigf ? NaN : 1 / 0);\n case 0x00: return sign * (sigf ? 6.103515625e-5 * sigf : 0);\n }\n return sign * (2 ** (expo - 15)) * (1 + sigf);\n}\n\n/**\n * Convert a float64 to uint16 (assuming the float64 is logically a float16). Inspired by numpy's `npy_double_to_half`:\n * https://github.com/numpy/numpy/blob/5a5987291dc95376bb098be8d8e5391e89e77a2c/numpy/core/src/npymath/halffloat.c#L43\n * @param d {number} The float64 to convert\n * @private\n * @ignore\n */\nexport function float64ToUint16(d: number) {\n\n if (d !== d) { return 0x7E00; } // NaN\n\n f64[0] = d;\n\n // Magic numbers:\n // 0x80000000 = 10000000 00000000 00000000 00000000 -- masks the 32nd bit\n // 0x7ff00000 = 01111111 11110000 00000000 00000000 -- masks the 21st-31st bits\n // 0x000fffff = 00000000 00001111 11111111 11111111 -- masks the 1st-20th bit\n\n let sign = (u32[1] & 0x80000000) >> 16 & 0xFFFF;\n let expo = (u32[1] & 0x7ff00000), sigf = 0x0000;\n\n if (expo >= 0x40f00000) {\n //\n // If exponent overflowed, the float16 is either NaN or Infinity.\n // Rules to propagate the sign bit: mantissa > 0 ? NaN : +/-Infinity\n //\n // Magic numbers:\n // 0x40F00000 = 01000000 11110000 00000000 00000000 -- 6-bit exponent overflow\n // 0x7C000000 = 01111100 00000000 00000000 00000000 -- masks the 27th-31st bits\n //\n // returns:\n // qNaN, aka 32256 decimal, 0x7E00 hex, or 01111110 00000000 binary\n // sNaN, aka 32000 decimal, 0x7D00 hex, or 01111101 00000000 binary\n // +inf, aka 31744 decimal, 0x7C00 hex, or 01111100 00000000 binary\n // -inf, aka 64512 decimal, 0xFC00 hex, or 11111100 00000000 binary\n //\n // If mantissa is greater than 23 bits, set to +Infinity like numpy\n if (u32[0] > 0) {\n expo = 0x7C00;\n } else {\n expo = (expo & 0x7C000000) >> 16;\n sigf = (u32[1] & 0x000fffff) >> 10;\n }\n } else if (expo <= 0x3f000000) {\n //\n // If exponent underflowed, the float is either signed zero or subnormal.\n //\n // Magic numbers:\n // 0x3F000000 = 00111111 00000000 00000000 00000000 -- 6-bit exponent underflow\n //\n sigf = 0x100000 + (u32[1] & 0x000fffff);\n sigf = 0x100000 + (sigf << ((expo >> 20) - 998)) >> 21;\n expo = 0;\n } else {\n //\n // No overflow or underflow, rebase the exponent and round the mantissa\n // Magic numbers:\n // 0x200 = 00000010 00000000 -- masks off the 10th bit\n //\n\n // Ensure the first mantissa bit (the 10th one) is 1 and round\n expo = (expo - 0x3f000000) >> 10;\n sigf = ((u32[1] & 0x000fffff) + 0x200) >> 10;\n }\n\n return sign | expo | sigf & 0xFFFF;\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/util/math.mjs b/frontend/node_modules/apache-arrow/util/math.mjs new file mode 100644 index 0000000000000000000000000000000000000000..626f2de60e94351ded4f721234aa8a94694e1a93 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/math.mjs @@ -0,0 +1,102 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +const f64 = new Float64Array(1); +const u32 = new Uint32Array(f64.buffer); +/** + * Convert uint16 (logically a float16) to a JS float64. Inspired by numpy's `npy_half_to_double`: + * https://github.com/numpy/numpy/blob/5a5987291dc95376bb098be8d8e5391e89e77a2c/numpy/core/src/npymath/halffloat.c#L29 + * @param h {number} the uint16 to convert + * @private + * @ignore + */ +export function uint16ToFloat64(h) { + let expo = (h & 0x7C00) >> 10; + let sigf = (h & 0x03FF) / 1024; + let sign = (-1) ** ((h & 0x8000) >> 15); + switch (expo) { + case 0x1F: return sign * (sigf ? NaN : 1 / 0); + case 0x00: return sign * (sigf ? 6.103515625e-5 * sigf : 0); + } + return sign * (2 ** (expo - 15)) * (1 + sigf); +} +/** + * Convert a float64 to uint16 (assuming the float64 is logically a float16). Inspired by numpy's `npy_double_to_half`: + * https://github.com/numpy/numpy/blob/5a5987291dc95376bb098be8d8e5391e89e77a2c/numpy/core/src/npymath/halffloat.c#L43 + * @param d {number} The float64 to convert + * @private + * @ignore + */ +export function float64ToUint16(d) { + if (d !== d) { + return 0x7E00; + } // NaN + f64[0] = d; + // Magic numbers: + // 0x80000000 = 10000000 00000000 00000000 00000000 -- masks the 32nd bit + // 0x7ff00000 = 01111111 11110000 00000000 00000000 -- masks the 21st-31st bits + // 0x000fffff = 00000000 00001111 11111111 11111111 -- masks the 1st-20th bit + let sign = (u32[1] & 0x80000000) >> 16 & 0xFFFF; + let expo = (u32[1] & 0x7ff00000), sigf = 0x0000; + if (expo >= 0x40f00000) { + // + // If exponent overflowed, the float16 is either NaN or Infinity. + // Rules to propagate the sign bit: mantissa > 0 ? NaN : +/-Infinity + // + // Magic numbers: + // 0x40F00000 = 01000000 11110000 00000000 00000000 -- 6-bit exponent overflow + // 0x7C000000 = 01111100 00000000 00000000 00000000 -- masks the 27th-31st bits + // + // returns: + // qNaN, aka 32256 decimal, 0x7E00 hex, or 01111110 00000000 binary + // sNaN, aka 32000 decimal, 0x7D00 hex, or 01111101 00000000 binary + // +inf, aka 31744 decimal, 0x7C00 hex, or 01111100 00000000 binary + // -inf, aka 64512 decimal, 0xFC00 hex, or 11111100 00000000 binary + // + // If mantissa is greater than 23 bits, set to +Infinity like numpy + if (u32[0] > 0) { + expo = 0x7C00; + } + else { + expo = (expo & 0x7C000000) >> 16; + sigf = (u32[1] & 0x000fffff) >> 10; + } + } + else if (expo <= 0x3f000000) { + // + // If exponent underflowed, the float is either signed zero or subnormal. + // + // Magic numbers: + // 0x3F000000 = 00111111 00000000 00000000 00000000 -- 6-bit exponent underflow + // + sigf = 0x100000 + (u32[1] & 0x000fffff); + sigf = 0x100000 + (sigf << ((expo >> 20) - 998)) >> 21; + expo = 0; + } + else { + // + // No overflow or underflow, rebase the exponent and round the mantissa + // Magic numbers: + // 0x200 = 00000010 00000000 -- masks off the 10th bit + // + // Ensure the first mantissa bit (the 10th one) is 1 and round + expo = (expo - 0x3f000000) >> 10; + sigf = ((u32[1] & 0x000fffff) + 0x200) >> 10; + } + return sign | expo | sigf & 0xFFFF; +} + +//# sourceMappingURL=math.mjs.map diff --git a/frontend/node_modules/apache-arrow/util/math.mjs.map b/frontend/node_modules/apache-arrow/util/math.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..86f7ce76781e6516d42e6ca0ccf043a814c693ba --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/math.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["util/math.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,MAAM,GAAG,GAAG,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC;AAChC,MAAM,GAAG,GAAG,IAAI,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAExC;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,CAAS;IACrC,IAAI,IAAI,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;IAC9B,IAAI,IAAI,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,GAAG,IAAI,CAAC;IAC/B,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;IACxC,QAAQ,IAAI,EAAE;QACV,KAAK,IAAI,CAAC,CAA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GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC;SACtC;KACJ;SAAM,IAAI,IAAI,IAAI,UAAU,EAAE;QAC3B,EAAE;QACF,yEAAyE;QACzE,EAAE;QACF,iBAAiB;QACjB,+EAA+E;QAC/E,EAAE;QACF,IAAI,GAAG,QAAQ,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC;QACxC,IAAI,GAAG,QAAQ,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;QACvD,IAAI,GAAG,CAAC,CAAC;KACZ;SAAM;QACH,EAAE;QACF,uEAAuE;QACvE,iBAAiB;QACjB,sDAAsD;QACtD,EAAE;QAEF,8DAA8D;QAC9D,IAAI,GAAG,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC;QACjC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;KAChD;IAED,OAAO,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AACvC,CAAC","file":"math.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nconst f64 = new Float64Array(1);\nconst u32 = new Uint32Array(f64.buffer);\n\n/**\n * Convert uint16 (logically a float16) to a JS float64. Inspired by numpy's `npy_half_to_double`:\n * https://github.com/numpy/numpy/blob/5a5987291dc95376bb098be8d8e5391e89e77a2c/numpy/core/src/npymath/halffloat.c#L29\n * @param h {number} the uint16 to convert\n * @private\n * @ignore\n */\nexport function uint16ToFloat64(h: number) {\n let expo = (h & 0x7C00) >> 10;\n let sigf = (h & 0x03FF) / 1024;\n let sign = (-1) ** ((h & 0x8000) >> 15);\n switch (expo) {\n case 0x1F: return sign * (sigf ? NaN : 1 / 0);\n case 0x00: return sign * (sigf ? 6.103515625e-5 * sigf : 0);\n }\n return sign * (2 ** (expo - 15)) * (1 + sigf);\n}\n\n/**\n * Convert a float64 to uint16 (assuming the float64 is logically a float16). Inspired by numpy's `npy_double_to_half`:\n * https://github.com/numpy/numpy/blob/5a5987291dc95376bb098be8d8e5391e89e77a2c/numpy/core/src/npymath/halffloat.c#L43\n * @param d {number} The float64 to convert\n * @private\n * @ignore\n */\nexport function float64ToUint16(d: number) {\n\n if (d !== d) { return 0x7E00; } // NaN\n\n f64[0] = d;\n\n // Magic numbers:\n // 0x80000000 = 10000000 00000000 00000000 00000000 -- masks the 32nd bit\n // 0x7ff00000 = 01111111 11110000 00000000 00000000 -- masks the 21st-31st bits\n // 0x000fffff = 00000000 00001111 11111111 11111111 -- masks the 1st-20th bit\n\n let sign = (u32[1] & 0x80000000) >> 16 & 0xFFFF;\n let expo = (u32[1] & 0x7ff00000), sigf = 0x0000;\n\n if (expo >= 0x40f00000) {\n //\n // If exponent overflowed, the float16 is either NaN or Infinity.\n // Rules to propagate the sign bit: mantissa > 0 ? NaN : +/-Infinity\n //\n // Magic numbers:\n // 0x40F00000 = 01000000 11110000 00000000 00000000 -- 6-bit exponent overflow\n // 0x7C000000 = 01111100 00000000 00000000 00000000 -- masks the 27th-31st bits\n //\n // returns:\n // qNaN, aka 32256 decimal, 0x7E00 hex, or 01111110 00000000 binary\n // sNaN, aka 32000 decimal, 0x7D00 hex, or 01111101 00000000 binary\n // +inf, aka 31744 decimal, 0x7C00 hex, or 01111100 00000000 binary\n // -inf, aka 64512 decimal, 0xFC00 hex, or 11111100 00000000 binary\n //\n // If mantissa is greater than 23 bits, set to +Infinity like numpy\n if (u32[0] > 0) {\n expo = 0x7C00;\n } else {\n expo = (expo & 0x7C000000) >> 16;\n sigf = (u32[1] & 0x000fffff) >> 10;\n }\n } else if (expo <= 0x3f000000) {\n //\n // If exponent underflowed, the float is either signed zero or subnormal.\n //\n // Magic numbers:\n // 0x3F000000 = 00111111 00000000 00000000 00000000 -- 6-bit exponent underflow\n //\n sigf = 0x100000 + (u32[1] & 0x000fffff);\n sigf = 0x100000 + (sigf << ((expo >> 20) - 998)) >> 21;\n expo = 0;\n } else {\n //\n // No overflow or underflow, rebase the exponent and round the mantissa\n // Magic numbers:\n // 0x200 = 00000010 00000000 -- masks off the 10th bit\n //\n\n // Ensure the first mantissa bit (the 10th one) is 1 and round\n expo = (expo - 0x3f000000) >> 10;\n sigf = ((u32[1] & 0x000fffff) + 0x200) >> 10;\n }\n\n return sign | expo | sigf & 0xFFFF;\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/util/pretty.d.ts b/frontend/node_modules/apache-arrow/util/pretty.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..2816c8de465ff3af57f8cc98d38ab36a17e7a40a --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/pretty.d.ts @@ -0,0 +1,2 @@ +/** @ignore */ +export declare function valueToString(x: any): any; diff --git a/frontend/node_modules/apache-arrow/util/pretty.js b/frontend/node_modules/apache-arrow/util/pretty.js new file mode 100644 index 0000000000000000000000000000000000000000..5e770599d0994c21d68a89933a9a145ce5e48b85 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/pretty.js @@ -0,0 +1,44 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +/** @ignore */ const undf = void (0); +/** @ignore */ +function valueToString(x) { + if (x === null) { + return 'null'; + } + if (x === undf) { + return 'undefined'; + } + switch (typeof x) { + case 'number': return `${x}`; + case 'bigint': return `${x}`; + case 'string': return `"${x}"`; + } + // If [Symbol.toPrimitive] is implemented (like in BN) + // use it instead of JSON.stringify(). This ensures we + // print BigInts, Decimals, and Binary in their native + // representation + if (typeof x[Symbol.toPrimitive] === 'function') { + return x[Symbol.toPrimitive]('string'); + } + return ArrayBuffer.isView(x) ? `[${x}]` : JSON.stringify(x); +} +exports.valueToString = valueToString; + +//# sourceMappingURL=pretty.js.map diff --git a/frontend/node_modules/apache-arrow/util/pretty.js.map b/frontend/node_modules/apache-arrow/util/pretty.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d28a07c8aacf131f70660ebf99691f55756aec9b --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/pretty.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["util/pretty.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,cAAc,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;AAErC,cAAc;AACd,SAAgB,aAAa,CAAC,CAAM;IAChC,IAAI,CAAC,KAAK,IAAI,EAAE;QAAE,OAAO,MAAM,CAAC;KAAE;IAClC,IAAI,CAAC,KAAK,IAAI,EAAE;QAAE,OAAO,WAAW,CAAC;KAAE;IACvC,QAAQ,OAAO,CAAC,EAAE;QACd,KAAK,QAAQ,CAAC,CAAC,OAAO,GAAG,CAAC,EAAE,CAAC;QAC7B,KAAK,QAAQ,CAAC,CAAC,OAAO,GAAG,CAAC,EAAE,CAAC;QAC7B,KAAK,QAAQ,CAAC,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC;KAClC;IACD,sDAAsD;IACtD,sDAAsD;IACtD,sDAAsD;IACtD,iBAAiB;IACjB,IAAI,OAAO,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,UAAU,EAAE;QAC7C,OAAO,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,CAAC;KAC1C;IACD,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAChE,CAAC;AAhBD,sCAgBC","file":"pretty.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n/** @ignore */ const undf = void (0);\n\n/** @ignore */\nexport function valueToString(x: any) {\n if (x === null) { return 'null'; }\n if (x === undf) { return 'undefined'; }\n switch (typeof x) {\n case 'number': return `${x}`;\n case 'bigint': return `${x}`;\n case 'string': return `\"${x}\"`;\n }\n // If [Symbol.toPrimitive] is implemented (like in BN)\n // use it instead of JSON.stringify(). This ensures we\n // print BigInts, Decimals, and Binary in their native\n // representation\n if (typeof x[Symbol.toPrimitive] === 'function') {\n return x[Symbol.toPrimitive]('string');\n }\n return ArrayBuffer.isView(x) ? `[${x}]` : JSON.stringify(x);\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/util/pretty.mjs b/frontend/node_modules/apache-arrow/util/pretty.mjs new file mode 100644 index 0000000000000000000000000000000000000000..11a0027154eb8c19cee7f2137a04e057b7bf0290 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/pretty.mjs @@ -0,0 +1,41 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +/** @ignore */ const undf = void (0); +/** @ignore */ +export function valueToString(x) { + if (x === null) { + return 'null'; + } + if (x === undf) { + return 'undefined'; + } + switch (typeof x) { + case 'number': return `${x}`; + case 'bigint': return `${x}`; + case 'string': return `"${x}"`; + } + // If [Symbol.toPrimitive] is implemented (like in BN) + // use it instead of JSON.stringify(). This ensures we + // print BigInts, Decimals, and Binary in their native + // representation + if (typeof x[Symbol.toPrimitive] === 'function') { + return x[Symbol.toPrimitive]('string'); + } + return ArrayBuffer.isView(x) ? `[${x}]` : JSON.stringify(x); +} + +//# sourceMappingURL=pretty.mjs.map diff --git a/frontend/node_modules/apache-arrow/util/pretty.mjs.map b/frontend/node_modules/apache-arrow/util/pretty.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..192cc4133b441f09b1087ebcfe96c0cba4e3cd80 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/pretty.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["util/pretty.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,cAAc,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;AAErC,cAAc;AACd,MAAM,UAAU,aAAa,CAAC,CAAM;IAChC,IAAI,CAAC,KAAK,IAAI,EAAE;QAAE,OAAO,MAAM,CAAC;KAAE;IAClC,IAAI,CAAC,KAAK,IAAI,EAAE;QAAE,OAAO,WAAW,CAAC;KAAE;IACvC,QAAQ,OAAO,CAAC,EAAE;QACd,KAAK,QAAQ,CAAC,CAAC,OAAO,GAAG,CAAC,EAAE,CAAC;QAC7B,KAAK,QAAQ,CAAC,CAAC,OAAO,GAAG,CAAC,EAAE,CAAC;QAC7B,KAAK,QAAQ,CAAC,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC;KAClC;IACD,sDAAsD;IACtD,sDAAsD;IACtD,sDAAsD;IACtD,iBAAiB;IACjB,IAAI,OAAO,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,UAAU,EAAE;QAC7C,OAAO,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,CAAC;KAC1C;IACD,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAChE,CAAC","file":"pretty.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n/** @ignore */ const undf = void (0);\n\n/** @ignore */\nexport function valueToString(x: any) {\n if (x === null) { return 'null'; }\n if (x === undf) { return 'undefined'; }\n switch (typeof x) {\n case 'number': return `${x}`;\n case 'bigint': return `${x}`;\n case 'string': return `\"${x}\"`;\n }\n // If [Symbol.toPrimitive] is implemented (like in BN)\n // use it instead of JSON.stringify(). This ensures we\n // print BigInts, Decimals, and Binary in their native\n // representation\n if (typeof x[Symbol.toPrimitive] === 'function') {\n return x[Symbol.toPrimitive]('string');\n }\n return ArrayBuffer.isView(x) ? `[${x}]` : JSON.stringify(x);\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/util/recordbatch.d.ts b/frontend/node_modules/apache-arrow/util/recordbatch.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..46bef9240728f702faa4502e7af16f369817b852 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/recordbatch.d.ts @@ -0,0 +1,19 @@ +import { Column } from '../column'; +import { Vector } from '../vector'; +import { DataType } from '../type'; +import { Data } from '../data'; +import { Schema } from '../schema'; +import { Chunked } from '../vector/chunked'; +import { RecordBatch } from '../recordbatch'; +/** @ignore */ +export declare function ensureSameLengthData(schema: Schema, chunks: Data[], batchLength?: number): [Schema, number, Data[]]; +/** @ignore */ +export declare function distributeColumnsIntoRecordBatches(columns: Column[]): [Schema, RecordBatch[]]; +/** @ignore */ +export declare function distributeVectorsIntoRecordBatches(schema: Schema, vecs: (Vector | Chunked)[]): [Schema, RecordBatch[]]; diff --git a/frontend/node_modules/apache-arrow/util/recordbatch.js b/frontend/node_modules/apache-arrow/util/recordbatch.js new file mode 100644 index 0000000000000000000000000000000000000000..df1baecefac7932a0690391ba3786a2438a0c099 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/recordbatch.js @@ -0,0 +1,109 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const data_1 = require("../data"); +const schema_1 = require("../schema"); +const chunked_1 = require("../vector/chunked"); +const recordbatch_1 = require("../recordbatch"); +const noopBuf = new Uint8Array(0); +const nullBufs = (bitmapLength) => [ + noopBuf, noopBuf, new Uint8Array(bitmapLength), noopBuf +]; +/** @ignore */ +function ensureSameLengthData(schema, chunks, batchLength = chunks.reduce((l, c) => Math.max(l, c.length), 0)) { + let data; + let field; + let i = -1, n = chunks.length; + const fields = [...schema.fields]; + const batchData = []; + const bitmapLength = ((batchLength + 63) & ~63) >> 3; + while (++i < n) { + if ((data = chunks[i]) && data.length === batchLength) { + batchData[i] = data; + } + else { + (field = fields[i]).nullable || (fields[i] = fields[i].clone({ nullable: true })); + batchData[i] = data ? data._changeLengthAndBackfillNullBitmap(batchLength) + : data_1.Data.new(field.type, 0, batchLength, batchLength, nullBufs(bitmapLength)); + } + } + return [new schema_1.Schema(fields), batchLength, batchData]; +} +exports.ensureSameLengthData = ensureSameLengthData; +/** @ignore */ +function distributeColumnsIntoRecordBatches(columns) { + return distributeVectorsIntoRecordBatches(new schema_1.Schema(columns.map(({ field }) => field)), columns); +} +exports.distributeColumnsIntoRecordBatches = distributeColumnsIntoRecordBatches; +/** @ignore */ +function distributeVectorsIntoRecordBatches(schema, vecs) { + return uniformlyDistributeChunksAcrossRecordBatches(schema, vecs.map((v) => v instanceof chunked_1.Chunked ? v.chunks.map((c) => c.data) : [v.data])); +} +exports.distributeVectorsIntoRecordBatches = distributeVectorsIntoRecordBatches; +/** @ignore */ +function uniformlyDistributeChunksAcrossRecordBatches(schema, columns) { + const fields = [...schema.fields]; + const batchArgs = []; + const memo = { numBatches: columns.reduce((n, c) => Math.max(n, c.length), 0) }; + let numBatches = 0, batchLength = 0; + let i = -1, numColumns = columns.length; + let child, childData = []; + while (memo.numBatches-- > 0) { + for (batchLength = Number.POSITIVE_INFINITY, i = -1; ++i < numColumns;) { + childData[i] = child = columns[i].shift(); + batchLength = Math.min(batchLength, child ? child.length : batchLength); + } + if (isFinite(batchLength)) { + childData = distributeChildData(fields, batchLength, childData, columns, memo); + if (batchLength > 0) { + batchArgs[numBatches++] = [batchLength, childData.slice()]; + } + } + } + return [ + schema = new schema_1.Schema(fields, schema.metadata), + batchArgs.map((xs) => new recordbatch_1.RecordBatch(schema, ...xs)) + ]; +} +/** @ignore */ +function distributeChildData(fields, batchLength, childData, columns, memo) { + let data; + let field; + let length = 0, i = -1, n = columns.length; + const bitmapLength = ((batchLength + 63) & ~63) >> 3; + while (++i < n) { + if ((data = childData[i]) && ((length = data.length) >= batchLength)) { + if (length === batchLength) { + childData[i] = data; + } + else { + childData[i] = data.slice(0, batchLength); + data = data.slice(batchLength, length - batchLength); + memo.numBatches = Math.max(memo.numBatches, columns[i].unshift(data)); + } + } + else { + (field = fields[i]).nullable || (fields[i] = field.clone({ nullable: true })); + childData[i] = data ? data._changeLengthAndBackfillNullBitmap(batchLength) + : data_1.Data.new(field.type, 0, batchLength, batchLength, nullBufs(bitmapLength)); + } + } + return childData; +} + +//# sourceMappingURL=recordbatch.js.map diff --git a/frontend/node_modules/apache-arrow/util/recordbatch.js.map b/frontend/node_modules/apache-arrow/util/recordbatch.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f4a3e4ec9cef7506c361608bf119c9559ee31761 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/recordbatch.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["util/recordbatch.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAKrB,kCAAwC;AACxC,sCAA0C;AAC1C,+CAA4C;AAC5C,gDAA6C;AAE7C,MAAM,OAAO,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;AAClC,MAAM,QAAQ,GAAG,CAAC,YAAoB,EAAE,EAAE,CAAW;IACjD,OAAO,EAAE,OAAO,EAAE,IAAI,UAAU,CAAC,YAAY,CAAC,EAAE,OAAO;CAC1C,CAAC;AAElB,cAAc;AACd,SAAgB,oBAAoB,CAChC,MAAiB,EACjB,MAA0B,EAC1B,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAE/D,IAAI,IAAsB,CAAC;IAC3B,IAAI,KAAwB,CAAC;IAC7B,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC;IAC9B,MAAM,MAAM,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IAClC,MAAM,SAAS,GAAG,EAAwB,CAAC;IAC3C,MAAM,YAAY,G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,EAAE,MAAM,GAAG,WAAW,CAAC,CAAC;gBACrD,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;aACzE;SACJ;aAAM;YACH,CAAC,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAsB,CAAC,CAAC;YACnG,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,kCAAkC,CAAC,WAAW,CAAC;gBACtE,CAAC,CAAC,WAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAqB,CAAC;SACvG;KACJ;IACD,OAAO,SAAS,CAAC;AACrB,CAAC","file":"recordbatch.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Column } from '../column';\nimport { Vector } from '../vector';\nimport { DataType } from '../type';\nimport { Data, Buffers } from '../data';\nimport { Schema, Field } from '../schema';\nimport { Chunked } from '../vector/chunked';\nimport { RecordBatch } from '../recordbatch';\n\nconst noopBuf = new Uint8Array(0);\nconst nullBufs = (bitmapLength: number) => [\n noopBuf, noopBuf, new Uint8Array(bitmapLength), noopBuf\n] as Buffers;\n\n/** @ignore */\nexport function ensureSameLengthData(\n schema: Schema,\n chunks: Data[],\n batchLength = chunks.reduce((l, c) => Math.max(l, c.length), 0)\n) {\n let data: Data;\n let field: Field;\n let i = -1, n = chunks.length;\n const fields = [...schema.fields];\n const batchData = [] as Data[];\n const bitmapLength = ((batchLength + 63) & ~63) >> 3;\n while (++i < n) {\n if ((data = chunks[i]) && data.length === batchLength) {\n batchData[i] = data;\n } else {\n (field = fields[i]).nullable || (fields[i] = fields[i].clone({ nullable: true }) as Field);\n batchData[i] = data ? data._changeLengthAndBackfillNullBitmap(batchLength)\n : Data.new(field.type, 0, batchLength, batchLength, nullBufs(bitmapLength)) as Data;\n }\n }\n return [new Schema(fields), batchLength, batchData] as [Schema, number, Data[]];\n}\n\n/** @ignore */\nexport function distributeColumnsIntoRecordBatches(columns: Column[]): [Schema, RecordBatch[]] {\n return distributeVectorsIntoRecordBatches(new Schema(columns.map(({ field }) => field)), columns);\n}\n\n/** @ignore */\nexport function distributeVectorsIntoRecordBatches(schema: Schema, vecs: (Vector | Chunked)[]): [Schema, RecordBatch[]] {\n return uniformlyDistributeChunksAcrossRecordBatches(schema, vecs.map((v) => v instanceof Chunked ? v.chunks.map((c) => c.data) : [v.data]));\n}\n\n/** @ignore */\nfunction uniformlyDistributeChunksAcrossRecordBatches(schema: Schema, columns: Data[][]): [Schema, RecordBatch[]] {\n\n const fields = [...schema.fields];\n const batchArgs = [] as [number, Data[]][];\n const memo = { numBatches: columns.reduce((n, c) => Math.max(n, c.length), 0) };\n\n let numBatches = 0, batchLength = 0;\n let i: number = -1, numColumns = columns.length;\n let child: Data, childData: Data[] = [];\n\n while (memo.numBatches-- > 0) {\n\n for (batchLength = Number.POSITIVE_INFINITY, i = -1; ++i < numColumns;) {\n childData[i] = child = columns[i].shift()!;\n batchLength = Math.min(batchLength, child ? child.length : batchLength);\n }\n\n if (isFinite(batchLength)) {\n childData = distributeChildData(fields, batchLength, childData, columns, memo);\n if (batchLength > 0) {\n batchArgs[numBatches++] = [batchLength, childData.slice()];\n }\n }\n }\n return [\n schema = new Schema(fields, schema.metadata),\n batchArgs.map((xs) => new RecordBatch(schema, ...xs))\n ];\n}\n\n/** @ignore */\nfunction distributeChildData(fields: Field[], batchLength: number, childData: Data[], columns: Data[][], memo: { numBatches: number }) {\n let data: Data;\n let field: Field;\n let length = 0, i = -1, n = columns.length;\n const bitmapLength = ((batchLength + 63) & ~63) >> 3;\n while (++i < n) {\n if ((data = childData[i]) && ((length = data.length) >= batchLength)) {\n if (length === batchLength) {\n childData[i] = data;\n } else {\n childData[i] = data.slice(0, batchLength);\n data = data.slice(batchLength, length - batchLength);\n memo.numBatches = Math.max(memo.numBatches, columns[i].unshift(data));\n }\n } else {\n (field = fields[i]).nullable || (fields[i] = field.clone({ nullable: true }) as Field);\n childData[i] = data ? data._changeLengthAndBackfillNullBitmap(batchLength)\n : Data.new(field.type, 0, batchLength, batchLength, nullBufs(bitmapLength)) as Data;\n }\n }\n return childData;\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/util/recordbatch.mjs b/frontend/node_modules/apache-arrow/util/recordbatch.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c50f60e3068b90b88780ca338d4921b6dc1b1944 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/recordbatch.mjs @@ -0,0 +1,104 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { Data } from '../data'; +import { Schema } from '../schema'; +import { Chunked } from '../vector/chunked'; +import { RecordBatch } from '../recordbatch'; +const noopBuf = new Uint8Array(0); +const nullBufs = (bitmapLength) => [ + noopBuf, noopBuf, new Uint8Array(bitmapLength), noopBuf +]; +/** @ignore */ +export function ensureSameLengthData(schema, chunks, batchLength = chunks.reduce((l, c) => Math.max(l, c.length), 0)) { + let data; + let field; + let i = -1, n = chunks.length; + const fields = [...schema.fields]; + const batchData = []; + const bitmapLength = ((batchLength + 63) & ~63) >> 3; + while (++i < n) { + if ((data = chunks[i]) && data.length === batchLength) { + batchData[i] = data; + } + else { + (field = fields[i]).nullable || (fields[i] = fields[i].clone({ nullable: true })); + batchData[i] = data ? data._changeLengthAndBackfillNullBitmap(batchLength) + : Data.new(field.type, 0, batchLength, batchLength, nullBufs(bitmapLength)); + } + } + return [new Schema(fields), batchLength, batchData]; +} +/** @ignore */ +export function distributeColumnsIntoRecordBatches(columns) { + return distributeVectorsIntoRecordBatches(new Schema(columns.map(({ field }) => field)), columns); +} +/** @ignore */ +export function distributeVectorsIntoRecordBatches(schema, vecs) { + return uniformlyDistributeChunksAcrossRecordBatches(schema, vecs.map((v) => v instanceof Chunked ? v.chunks.map((c) => c.data) : [v.data])); +} +/** @ignore */ +function uniformlyDistributeChunksAcrossRecordBatches(schema, columns) { + const fields = [...schema.fields]; + const batchArgs = []; + const memo = { numBatches: columns.reduce((n, c) => Math.max(n, c.length), 0) }; + let numBatches = 0, batchLength = 0; + let i = -1, numColumns = columns.length; + let child, childData = []; + while (memo.numBatches-- > 0) { + for (batchLength = Number.POSITIVE_INFINITY, i = -1; ++i < numColumns;) { + childData[i] = child = columns[i].shift(); + batchLength = Math.min(batchLength, child ? child.length : batchLength); + } + if (isFinite(batchLength)) { + childData = distributeChildData(fields, batchLength, childData, columns, memo); + if (batchLength > 0) { + batchArgs[numBatches++] = [batchLength, childData.slice()]; + } + } + } + return [ + schema = new Schema(fields, schema.metadata), + batchArgs.map((xs) => new RecordBatch(schema, ...xs)) + ]; +} +/** @ignore */ +function distributeChildData(fields, batchLength, childData, columns, memo) { + let data; + let field; + let length = 0, i = -1, n = columns.length; + const bitmapLength = ((batchLength + 63) & ~63) >> 3; + while (++i < n) { + if ((data = childData[i]) && ((length = data.length) >= batchLength)) { + if (length === batchLength) { + childData[i] = data; + } + else { + childData[i] = data.slice(0, batchLength); + data = data.slice(batchLength, length - batchLength); + memo.numBatches = Math.max(memo.numBatches, columns[i].unshift(data)); + } + } + else { + (field = fields[i]).nullable || (fields[i] = field.clone({ nullable: true })); + childData[i] = data ? data._changeLengthAndBackfillNullBitmap(batchLength) + : Data.new(field.type, 0, batchLength, batchLength, nullBufs(bitmapLength)); + } + } + return childData; +} + +//# sourceMappingURL=recordbatch.mjs.map diff --git a/frontend/node_modules/apache-arrow/util/recordbatch.mjs.map b/frontend/node_modules/apache-arrow/util/recordbatch.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..bdef10d5f2cbe70cdf30bf8def0ea392f455f867 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/recordbatch.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["util/recordbatch.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAKrB,OAAO,EAAE,IAAI,EAAW,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,MAAM,EAAS,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;AAClC,MAAM,Q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,CAAC;AACrB,CAAC","file":"recordbatch.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Column } from '../column';\nimport { Vector } from '../vector';\nimport { DataType } from '../type';\nimport { Data, Buffers } from '../data';\nimport { Schema, Field } from '../schema';\nimport { Chunked } from '../vector/chunked';\nimport { RecordBatch } from '../recordbatch';\n\nconst noopBuf = new Uint8Array(0);\nconst nullBufs = (bitmapLength: number) => [\n noopBuf, noopBuf, new Uint8Array(bitmapLength), noopBuf\n] as Buffers;\n\n/** @ignore */\nexport function ensureSameLengthData(\n schema: Schema,\n chunks: Data[],\n batchLength = chunks.reduce((l, c) => Math.max(l, c.length), 0)\n) {\n let data: Data;\n let field: Field;\n let i = -1, n = chunks.length;\n const fields = [...schema.fields];\n const batchData = [] as Data[];\n const bitmapLength = ((batchLength + 63) & ~63) >> 3;\n while (++i < n) {\n if ((data = chunks[i]) && data.length === batchLength) {\n batchData[i] = data;\n } else {\n (field = fields[i]).nullable || (fields[i] = fields[i].clone({ nullable: true }) as Field);\n batchData[i] = data ? data._changeLengthAndBackfillNullBitmap(batchLength)\n : Data.new(field.type, 0, batchLength, batchLength, nullBufs(bitmapLength)) as Data;\n }\n }\n return [new Schema(fields), batchLength, batchData] as [Schema, number, Data[]];\n}\n\n/** @ignore */\nexport function distributeColumnsIntoRecordBatches(columns: Column[]): [Schema, RecordBatch[]] {\n return distributeVectorsIntoRecordBatches(new Schema(columns.map(({ field }) => field)), columns);\n}\n\n/** @ignore */\nexport function distributeVectorsIntoRecordBatches(schema: Schema, vecs: (Vector | Chunked)[]): [Schema, RecordBatch[]] {\n return uniformlyDistributeChunksAcrossRecordBatches(schema, vecs.map((v) => v instanceof Chunked ? v.chunks.map((c) => c.data) : [v.data]));\n}\n\n/** @ignore */\nfunction uniformlyDistributeChunksAcrossRecordBatches(schema: Schema, columns: Data[][]): [Schema, RecordBatch[]] {\n\n const fields = [...schema.fields];\n const batchArgs = [] as [number, Data[]][];\n const memo = { numBatches: columns.reduce((n, c) => Math.max(n, c.length), 0) };\n\n let numBatches = 0, batchLength = 0;\n let i: number = -1, numColumns = columns.length;\n let child: Data, childData: Data[] = [];\n\n while (memo.numBatches-- > 0) {\n\n for (batchLength = Number.POSITIVE_INFINITY, i = -1; ++i < numColumns;) {\n childData[i] = child = columns[i].shift()!;\n batchLength = Math.min(batchLength, child ? child.length : batchLength);\n }\n\n if (isFinite(batchLength)) {\n childData = distributeChildData(fields, batchLength, childData, columns, memo);\n if (batchLength > 0) {\n batchArgs[numBatches++] = [batchLength, childData.slice()];\n }\n }\n }\n return [\n schema = new Schema(fields, schema.metadata),\n batchArgs.map((xs) => new RecordBatch(schema, ...xs))\n ];\n}\n\n/** @ignore */\nfunction distributeChildData(fields: Field[], batchLength: number, childData: Data[], columns: Data[][], memo: { numBatches: number }) {\n let data: Data;\n let field: Field;\n let length = 0, i = -1, n = columns.length;\n const bitmapLength = ((batchLength + 63) & ~63) >> 3;\n while (++i < n) {\n if ((data = childData[i]) && ((length = data.length) >= batchLength)) {\n if (length === batchLength) {\n childData[i] = data;\n } else {\n childData[i] = data.slice(0, batchLength);\n data = data.slice(batchLength, length - batchLength);\n memo.numBatches = Math.max(memo.numBatches, columns[i].unshift(data));\n }\n } else {\n (field = fields[i]).nullable || (fields[i] = field.clone({ nullable: true }) as Field);\n childData[i] = data ? data._changeLengthAndBackfillNullBitmap(batchLength)\n : Data.new(field.type, 0, batchLength, batchLength, nullBufs(bitmapLength)) as Data;\n }\n }\n return childData;\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/util/utf8.d.ts b/frontend/node_modules/apache-arrow/util/utf8.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3b49839872f9a13ddefede9001c31ed19cabc2cd --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/utf8.d.ts @@ -0,0 +1,4 @@ +/** @ignore */ +export declare const decodeUtf8: (input: ArrayBuffer | SharedArrayBuffer | ArrayBufferView) => string; +/** @ignore */ +export declare const encodeUtf8: (value?: string | undefined) => Uint8Array; diff --git a/frontend/node_modules/apache-arrow/util/utf8.js b/frontend/node_modules/apache-arrow/util/utf8.js new file mode 100644 index 0000000000000000000000000000000000000000..909c9fa9ba3e83c41ec221adeee286d55b98f51d --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/utf8.js @@ -0,0 +1,45 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const buffer_1 = require("./buffer"); +const text_encoding_utf_8_1 = require("text-encoding-utf-8"); +/** @ignore @suppress {missingRequire} */ +const _Buffer = typeof Buffer === 'function' ? Buffer : null; +/** @ignore */ +const useNativeEncoders = typeof TextDecoder === 'function' && typeof TextEncoder === 'function'; +/** @ignore */ +exports.decodeUtf8 = ((TextDecoder) => { + if (useNativeEncoders || !_Buffer) { + const decoder = new TextDecoder('utf-8'); + return (buffer) => decoder.decode(buffer); + } + return (input) => { + const { buffer, byteOffset, length } = buffer_1.toUint8Array(input); + return _Buffer.from(buffer, byteOffset, length).toString(); + }; +})(typeof TextDecoder !== 'undefined' ? TextDecoder : text_encoding_utf_8_1.TextDecoder); +/** @ignore */ +exports.encodeUtf8 = ((TextEncoder) => { + if (useNativeEncoders || !_Buffer) { + const encoder = new TextEncoder(); + return (value) => encoder.encode(value); + } + return (input = '') => buffer_1.toUint8Array(_Buffer.from(input, 'utf8')); +})(typeof TextEncoder !== 'undefined' ? TextEncoder : text_encoding_utf_8_1.TextEncoder); + +//# sourceMappingURL=utf8.js.map diff --git a/frontend/node_modules/apache-arrow/util/utf8.js.map b/frontend/node_modules/apache-arrow/util/utf8.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d3de2e77eeaea201b53b7fb293ed020e99673345 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/utf8.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["util/utf8.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,qCAAwC;AACxC,6DAG6B;AAE7B,yCAAyC;AACzC,MAAM,OAAO,GAAG,OAAO,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;AAC7D,cAAc;AACd,MAAM,iBAAiB,GAAG,OAAO,WAAW,KAAK,UAAU,IAAI,OAAO,WAAW,KAAK,UAAU,CAAC;AAEjG,cAAc;AACD,QAAA,UAAU,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE;IACvC,IAAI,iBAAiB,IAAI,CAAC,OAAO,EAAE;QAC/B,MAAM,OAAO,GAAG,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO,CAAC,MAAsC,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;KAC7E;IACD,OAAO,CAAC,KAAwC,EAAE,EAAE;QAChD,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,qBAAY,CAAC,KAAK,CAAC,CAAC;QAC3D,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC/D,CAAC,CAAC;AACN,CAAC,CAAC,CAAC,OAAO,WAAW,KAAK,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,iCAAmB,CAAC,CAAC;AAE3E,cAAc;AACD,QAAA,UAAU,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE;IACvC,IAAI,iBAAiB,IAAI,CAAC,OAAO,EAAE;QAC/B,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;QAClC,OAAO,CAAC,KAAc,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;KACpD;IACD,OAAO,CAAC,KAAK,GAAG,EAAE,EAAE,EAAE,CAAC,qBAAY,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AACrE,CAAC,CAAC,CAAC,OAAO,WAAW,KAAK,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,iCAAmB,CAAC,CAAC","file":"utf8.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { toUint8Array } from './buffer';\nimport {\n TextDecoder as TextDecoderPolyfill,\n TextEncoder as TextEncoderPolyfill,\n} from 'text-encoding-utf-8';\n\n/** @ignore @suppress {missingRequire} */\nconst _Buffer = typeof Buffer === 'function' ? Buffer : null;\n/** @ignore */\nconst useNativeEncoders = typeof TextDecoder === 'function' && typeof TextEncoder === 'function';\n\n/** @ignore */\nexport const decodeUtf8 = ((TextDecoder) => {\n if (useNativeEncoders || !_Buffer) {\n const decoder = new TextDecoder('utf-8');\n return (buffer?: ArrayBuffer | ArrayBufferView) => decoder.decode(buffer);\n }\n return (input: ArrayBufferLike | ArrayBufferView) => {\n const { buffer, byteOffset, length } = toUint8Array(input);\n return _Buffer.from(buffer, byteOffset, length).toString();\n };\n})(typeof TextDecoder !== 'undefined' ? TextDecoder : TextDecoderPolyfill);\n\n/** @ignore */\nexport const encodeUtf8 = ((TextEncoder) => {\n if (useNativeEncoders || !_Buffer) {\n const encoder = new TextEncoder();\n return (value?: string) => encoder.encode(value);\n }\n return (input = '') => toUint8Array(_Buffer.from(input, 'utf8'));\n})(typeof TextEncoder !== 'undefined' ? TextEncoder : TextEncoderPolyfill);\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/util/utf8.mjs b/frontend/node_modules/apache-arrow/util/utf8.mjs new file mode 100644 index 0000000000000000000000000000000000000000..250b92272be5a9945f6b02527fdc461ce3c240fd --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/utf8.mjs @@ -0,0 +1,43 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { toUint8Array } from './buffer'; +import { TextDecoder as TextDecoderPolyfill, TextEncoder as TextEncoderPolyfill, } from 'text-encoding-utf-8'; +/** @ignore @suppress {missingRequire} */ +const _Buffer = typeof Buffer === 'function' ? Buffer : null; +/** @ignore */ +const useNativeEncoders = typeof TextDecoder === 'function' && typeof TextEncoder === 'function'; +/** @ignore */ +export const decodeUtf8 = ((TextDecoder) => { + if (useNativeEncoders || !_Buffer) { + const decoder = new TextDecoder('utf-8'); + return (buffer) => decoder.decode(buffer); + } + return (input) => { + const { buffer, byteOffset, length } = toUint8Array(input); + return _Buffer.from(buffer, byteOffset, length).toString(); + }; +})(typeof TextDecoder !== 'undefined' ? TextDecoder : TextDecoderPolyfill); +/** @ignore */ +export const encodeUtf8 = ((TextEncoder) => { + if (useNativeEncoders || !_Buffer) { + const encoder = new TextEncoder(); + return (value) => encoder.encode(value); + } + return (input = '') => toUint8Array(_Buffer.from(input, 'utf8')); +})(typeof TextEncoder !== 'undefined' ? TextEncoder : TextEncoderPolyfill); + +//# sourceMappingURL=utf8.mjs.map diff --git a/frontend/node_modules/apache-arrow/util/utf8.mjs.map b/frontend/node_modules/apache-arrow/util/utf8.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..73723ae5158b4b2985a286b06497b4fd38230a53 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/utf8.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["util/utf8.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,OAAO,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pD;IACD,OAAO,CAAC,KAAK,GAAG,EAAE,EAAE,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AACrE,CAAC,CAAC,CAAC,OAAO,WAAW,KAAK,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC","file":"utf8.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { toUint8Array } from './buffer';\nimport {\n TextDecoder as TextDecoderPolyfill,\n TextEncoder as TextEncoderPolyfill,\n} from 'text-encoding-utf-8';\n\n/** @ignore @suppress {missingRequire} */\nconst _Buffer = typeof Buffer === 'function' ? Buffer : null;\n/** @ignore */\nconst useNativeEncoders = typeof TextDecoder === 'function' && typeof TextEncoder === 'function';\n\n/** @ignore */\nexport const decodeUtf8 = ((TextDecoder) => {\n if (useNativeEncoders || !_Buffer) {\n const decoder = new TextDecoder('utf-8');\n return (buffer?: ArrayBuffer | ArrayBufferView) => decoder.decode(buffer);\n }\n return (input: ArrayBufferLike | ArrayBufferView) => {\n const { buffer, byteOffset, length } = toUint8Array(input);\n return _Buffer.from(buffer, byteOffset, length).toString();\n };\n})(typeof TextDecoder !== 'undefined' ? TextDecoder : TextDecoderPolyfill);\n\n/** @ignore */\nexport const encodeUtf8 = ((TextEncoder) => {\n if (useNativeEncoders || !_Buffer) {\n const encoder = new TextEncoder();\n return (value?: string) => encoder.encode(value);\n }\n return (input = '') => toUint8Array(_Buffer.from(input, 'utf8'));\n})(typeof TextEncoder !== 'undefined' ? TextEncoder : TextEncoderPolyfill);\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/util/vector.d.ts b/frontend/node_modules/apache-arrow/util/vector.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7d206643c49578c7f0433eae585773007a3e5d42 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/vector.d.ts @@ -0,0 +1,16 @@ +/** @ignore */ +declare type RangeLike = { + length: number; + stride?: number; +}; +/** @ignore */ +declare type ClampThen = (source: T, index: number) => any; +/** @ignore */ +declare type ClampRangeThen = (source: T, offset: number, length: number) => any; +export declare function clampIndex(source: T, index: number): number; +export declare function clampIndex = ClampThen>(source: T, index: number, then: N): ReturnType; +export declare function clampRange(source: T, begin: number | undefined, end: number | undefined): [number, number]; +export declare function clampRange = ClampRangeThen>(source: T, begin: number | undefined, end: number | undefined, then: N): ReturnType; +/** @ignore */ +export declare function createElementComparator(search: any): (value: any) => boolean; +export {}; diff --git a/frontend/node_modules/apache-arrow/util/vector.js b/frontend/node_modules/apache-arrow/util/vector.js new file mode 100644 index 0000000000000000000000000000000000000000..1ed9afa3d92aee9c6e349222cd5a8a20040e8ed1 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/vector.js @@ -0,0 +1,191 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const vector_1 = require("../vector"); +const row_1 = require("../vector/row"); +const buffer_1 = require("../util/buffer"); +const compat_1 = require("./compat"); +/** @ignore */ +function clampIndex(source, index, then) { + const length = source.length; + const adjust = index > -1 ? index : (length + (index % length)); + return then ? then(source, adjust) : adjust; +} +exports.clampIndex = clampIndex; +/** @ignore */ +let tmp; +/** @ignore */ +function clampRange(source, begin, end, then) { + // Adjust args similar to Array.prototype.slice. Normalize begin/end to + // clamp between 0 and length, and wrap around on negative indices, e.g. + // slice(-1, 5) or slice(5, -1) + let { length: len = 0 } = source; + let lhs = typeof begin !== 'number' ? 0 : begin; + let rhs = typeof end !== 'number' ? len : end; + // wrap around on negative start/end positions + (lhs < 0) && (lhs = ((lhs % len) + len) % len); + (rhs < 0) && (rhs = ((rhs % len) + len) % len); + // ensure lhs <= rhs + (rhs < lhs) && (tmp = lhs, lhs = rhs, rhs = tmp); + // ensure rhs <= length + (rhs > len) && (rhs = len); + return then ? then(source, lhs, rhs) : [lhs, rhs]; +} +exports.clampRange = clampRange; +const big0 = compat_1.BigIntAvailable ? compat_1.BigInt(0) : 0; +const isNaNFast = (value) => value !== value; +/** @ignore */ +function createElementComparator(search) { + let typeofSearch = typeof search; + // Compare primitives + if (typeofSearch !== 'object' || search === null) { + // Compare NaN + if (isNaNFast(search)) { + return isNaNFast; + } + return typeofSearch !== 'bigint' + ? (value) => value === search + : (value) => (big0 + value) === search; + } + // Compare Dates + if (search instanceof Date) { + const valueOfSearch = search.valueOf(); + return (value) => value instanceof Date ? (value.valueOf() === valueOfSearch) : false; + } + // Compare TypedArrays + if (ArrayBuffer.isView(search)) { + return (value) => value ? buffer_1.compareArrayLike(search, value) : false; + } + // Compare Maps and Rows + if (search instanceof Map) { + return creatMapComparator(search); + } + // Compare Array-likes + if (Array.isArray(search)) { + return createArrayLikeComparator(search); + } + // Compare Vectors + if (search instanceof vector_1.Vector) { + return createVectorComparator(search); + } + // Compare non-empty Objects + return createObjectComparator(search); +} +exports.createElementComparator = createElementComparator; +/** @ignore */ +function createArrayLikeComparator(lhs) { + const comparators = []; + for (let i = -1, n = lhs.length; ++i < n;) { + comparators[i] = createElementComparator(lhs[i]); + } + return createSubElementsComparator(comparators); +} +/** @ignore */ +function creatMapComparator(lhs) { + let i = -1; + const comparators = []; + lhs.forEach((v) => comparators[++i] = createElementComparator(v)); + return createSubElementsComparator(comparators); +} +/** @ignore */ +function createVectorComparator(lhs) { + const comparators = []; + for (let i = -1, n = lhs.length; ++i < n;) { + comparators[i] = createElementComparator(lhs.get(i)); + } + return createSubElementsComparator(comparators); +} +/** @ignore */ +function createObjectComparator(lhs) { + const keys = Object.keys(lhs); + // Only compare non-empty Objects + if (keys.length === 0) { + return () => false; + } + const comparators = []; + for (let i = -1, n = keys.length; ++i < n;) { + comparators[i] = createElementComparator(lhs[keys[i]]); + } + return createSubElementsComparator(comparators, keys); +} +function createSubElementsComparator(comparators, keys) { + return (rhs) => { + if (!rhs || typeof rhs !== 'object') { + return false; + } + switch (rhs.constructor) { + case Array: return compareArray(comparators, rhs); + case Map: + case row_1.MapRow: + case row_1.StructRow: + return compareObject(comparators, rhs, rhs.keys()); + case Object: + case undefined: // support `Object.create(null)` objects + return compareObject(comparators, rhs, keys || Object.keys(rhs)); + } + return rhs instanceof vector_1.Vector ? compareVector(comparators, rhs) : false; + }; +} +function compareArray(comparators, arr) { + const n = comparators.length; + if (arr.length !== n) { + return false; + } + for (let i = -1; ++i < n;) { + if (!(comparators[i](arr[i]))) { + return false; + } + } + return true; +} +function compareVector(comparators, vec) { + const n = comparators.length; + if (vec.length !== n) { + return false; + } + for (let i = -1; ++i < n;) { + if (!(comparators[i](vec.get(i)))) { + return false; + } + } + return true; +} +function compareObject(comparators, obj, keys) { + const lKeyItr = keys[Symbol.iterator](); + const rKeyItr = obj instanceof Map ? obj.keys() : Object.keys(obj)[Symbol.iterator](); + const rValItr = obj instanceof Map ? obj.values() : Object.values(obj)[Symbol.iterator](); + let i = 0; + let n = comparators.length; + let rVal = rValItr.next(); + let lKey = lKeyItr.next(); + let rKey = rKeyItr.next(); + for (; i < n && !lKey.done && !rKey.done && !rVal.done; ++i, lKey = lKeyItr.next(), rKey = rKeyItr.next(), rVal = rValItr.next()) { + if (lKey.value !== rKey.value || !comparators[i](rVal.value)) { + break; + } + } + if (i === n && lKey.done && rKey.done && rVal.done) { + return true; + } + lKeyItr.return && lKeyItr.return(); + rKeyItr.return && rKeyItr.return(); + rValItr.return && rValItr.return(); + return false; +} + +//# sourceMappingURL=vector.js.map diff --git a/frontend/node_modules/apache-arrow/util/vector.js.map b/frontend/node_modules/apache-arrow/util/vector.js.map new file mode 100644 index 0000000000000000000000000000000000000000..25c878c248aa9c939dfe733c61074335bc2f0f31 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/vector.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["util/vector.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,sCAAmC;AACnC,uCAAkD;AAClD,2CAAkD;AAClD,qCAAmD;AAWnD,cAAc;AACd,SAAgB,UAAU,CAA6D,MAAS,EAAE,KAAa,EAAE,IAAQ;IACrH,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7B,MAAM,MAAM,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC;IAChE,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AAChD,CAAC;AAJD,gCAIC;AAED,cAAc;AACd,IAAI,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AAC,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;IAE1F,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,IAAI,CAAC,GAAG,WAAW,CAAC,MAAM,CAAC;IAC3B,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAC1B,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAC1B,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAE1B,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EACjD,EAAE,CAAC,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,EAAE;QAC3E,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;YAC1D,MAAM;SACT;KACJ;IACD,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE;QAChD,OAAO,IAAI,CAAC;KACf;IACD,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IACnC,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IACnC,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IACnC,OAAO,KAAK,CAAC;AACjB,CAAC","file":"vector.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Vector } from '../vector';\nimport { MapRow, StructRow } from '../vector/row';\nimport { compareArrayLike } from '../util/buffer';\nimport { BigInt, BigIntAvailable } from './compat';\n\n/** @ignore */\ntype RangeLike = { length: number; stride?: number };\n/** @ignore */\ntype ClampThen = (source: T, index: number) => any;\n/** @ignore */\ntype ClampRangeThen = (source: T, offset: number, length: number) => any;\n\nexport function clampIndex(source: T, index: number): number;\nexport function clampIndex = ClampThen>(source: T, index: number, then: N): ReturnType;\n/** @ignore */\nexport function clampIndex = ClampThen>(source: T, index: number, then?: N) {\n const length = source.length;\n const adjust = index > -1 ? index : (length + (index % length));\n return then ? then(source, adjust) : adjust;\n}\n\n/** @ignore */\nlet tmp: number;\nexport function clampRange(source: T, begin: number | undefined, end: number | undefined): [number, number];\nexport function clampRange = ClampRangeThen>(source: T, begin: number | undefined, end: number | undefined, then: N): ReturnType;\n/** @ignore */\nexport function clampRange = ClampRangeThen>(source: T, begin: number | undefined, end: number | undefined, then?: N) {\n\n // Adjust args similar to Array.prototype.slice. Normalize begin/end to\n // clamp between 0 and length, and wrap around on negative indices, e.g.\n // slice(-1, 5) or slice(5, -1)\n let { length: len = 0 } = source;\n let lhs = typeof begin !== 'number' ? 0 : begin;\n let rhs = typeof end !== 'number' ? len : end;\n // wrap around on negative start/end positions\n (lhs < 0) && (lhs = ((lhs % len) + len) % len);\n (rhs < 0) && (rhs = ((rhs % len) + len) % len);\n // ensure lhs <= rhs\n (rhs < lhs) && (tmp = lhs, lhs = rhs, rhs = tmp);\n // ensure rhs <= length\n (rhs > len) && (rhs = len);\n\n return then ? then(source, lhs, rhs) : [lhs, rhs];\n}\n\nconst big0 = BigIntAvailable ? BigInt(0) : 0;\nconst isNaNFast = (value: any) => value !== value;\n\n/** @ignore */\nexport function createElementComparator(search: any) {\n let typeofSearch = typeof search;\n // Compare primitives\n if (typeofSearch !== 'object' || search === null) {\n // Compare NaN\n if (isNaNFast(search)) {\n return isNaNFast;\n }\n return typeofSearch !== 'bigint'\n ? (value: any) => value === search\n : (value: any) => (big0 + value) === search;\n }\n // Compare Dates\n if (search instanceof Date) {\n const valueOfSearch = search.valueOf();\n return (value: any) => value instanceof Date ? (value.valueOf() === valueOfSearch) : false;\n }\n // Compare TypedArrays\n if (ArrayBuffer.isView(search)) {\n return (value: any) => value ? compareArrayLike(search, value) : false;\n }\n // Compare Maps and Rows\n if (search instanceof Map) { return creatMapComparator(search); }\n // Compare Array-likes\n if (Array.isArray(search)) { return createArrayLikeComparator(search); }\n // Compare Vectors\n if (search instanceof Vector) { return createVectorComparator(search); }\n // Compare non-empty Objects\n return createObjectComparator(search);\n}\n\n/** @ignore */\nfunction createArrayLikeComparator(lhs: ArrayLike) {\n const comparators = [] as ((x: any) => boolean)[];\n for (let i = -1, n = lhs.length; ++i < n;) {\n comparators[i] = createElementComparator(lhs[i]);\n }\n return createSubElementsComparator(comparators);\n}\n\n/** @ignore */\nfunction creatMapComparator(lhs: Map) {\n let i = -1;\n const comparators = [] as ((x: any) => boolean)[];\n lhs.forEach((v) => comparators[++i] = createElementComparator(v));\n return createSubElementsComparator(comparators);\n}\n\n/** @ignore */\nfunction createVectorComparator(lhs: Vector) {\n const comparators = [] as ((x: any) => boolean)[];\n for (let i = -1, n = lhs.length; ++i < n;) {\n comparators[i] = createElementComparator(lhs.get(i));\n }\n return createSubElementsComparator(comparators);\n}\n\n/** @ignore */\nfunction createObjectComparator(lhs: any) {\n const keys = Object.keys(lhs);\n // Only compare non-empty Objects\n if (keys.length === 0) { return () => false; }\n const comparators = [] as ((x: any) => boolean)[];\n for (let i = -1, n = keys.length; ++i < n;) {\n comparators[i] = createElementComparator(lhs[keys[i]]);\n }\n return createSubElementsComparator(comparators, keys);\n}\n\nfunction createSubElementsComparator(comparators: ((x: any) => boolean)[], keys?: Iterable) {\n return (rhs: any) => {\n if (!rhs || typeof rhs !== 'object') {\n return false;\n }\n switch (rhs.constructor) {\n case Array: return compareArray(comparators, rhs);\n case Map:\n case MapRow:\n case StructRow:\n return compareObject(comparators, rhs, rhs.keys());\n case Object:\n case undefined: // support `Object.create(null)` objects\n return compareObject(comparators, rhs, keys || Object.keys(rhs));\n }\n return rhs instanceof Vector ? compareVector(comparators, rhs) : false;\n };\n}\n\nfunction compareArray(comparators: ((x: any) => boolean)[], arr: any[]) {\n const n = comparators.length;\n if (arr.length !== n) { return false; }\n for (let i = -1; ++i < n;) {\n if (!(comparators[i](arr[i]))) { return false; }\n }\n return true;\n}\n\nfunction compareVector(comparators: ((x: any) => boolean)[], vec: Vector) {\n const n = comparators.length;\n if (vec.length !== n) { return false; }\n for (let i = -1; ++i < n;) {\n if (!(comparators[i](vec.get(i)))) { return false; }\n }\n return true;\n}\n\nfunction compareObject(comparators: ((x: any) => boolean)[], obj: Map, keys: Iterable) {\n\n const lKeyItr = keys[Symbol.iterator]();\n const rKeyItr = obj instanceof Map ? obj.keys() : Object.keys(obj)[Symbol.iterator]();\n const rValItr = obj instanceof Map ? obj.values() : Object.values(obj)[Symbol.iterator]();\n\n let i = 0;\n let n = comparators.length;\n let rVal = rValItr.next();\n let lKey = lKeyItr.next();\n let rKey = rKeyItr.next();\n\n for (; i < n && !lKey.done && !rKey.done && !rVal.done;\n ++i, lKey = lKeyItr.next(), rKey = rKeyItr.next(), rVal = rValItr.next()) {\n if (lKey.value !== rKey.value || !comparators[i](rVal.value)) {\n break;\n }\n }\n if (i === n && lKey.done && rKey.done && rVal.done) {\n return true;\n }\n lKeyItr.return && lKeyItr.return();\n rKeyItr.return && rKeyItr.return();\n rValItr.return && rValItr.return();\n return false;\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/util/vector.mjs b/frontend/node_modules/apache-arrow/util/vector.mjs new file mode 100644 index 0000000000000000000000000000000000000000..81a15d94fc24863c4cbf9c279cabe6bde8541911 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/vector.mjs @@ -0,0 +1,186 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { Vector } from '../vector'; +import { MapRow, StructRow } from '../vector/row'; +import { compareArrayLike } from '../util/buffer'; +import { BigInt, BigIntAvailable } from './compat'; +/** @ignore */ +export function clampIndex(source, index, then) { + const length = source.length; + const adjust = index > -1 ? index : (length + (index % length)); + return then ? then(source, adjust) : adjust; +} +/** @ignore */ +let tmp; +/** @ignore */ +export function clampRange(source, begin, end, then) { + // Adjust args similar to Array.prototype.slice. Normalize begin/end to + // clamp between 0 and length, and wrap around on negative indices, e.g. + // slice(-1, 5) or slice(5, -1) + let { length: len = 0 } = source; + let lhs = typeof begin !== 'number' ? 0 : begin; + let rhs = typeof end !== 'number' ? len : end; + // wrap around on negative start/end positions + (lhs < 0) && (lhs = ((lhs % len) + len) % len); + (rhs < 0) && (rhs = ((rhs % len) + len) % len); + // ensure lhs <= rhs + (rhs < lhs) && (tmp = lhs, lhs = rhs, rhs = tmp); + // ensure rhs <= length + (rhs > len) && (rhs = len); + return then ? then(source, lhs, rhs) : [lhs, rhs]; +} +const big0 = BigIntAvailable ? BigInt(0) : 0; +const isNaNFast = (value) => value !== value; +/** @ignore */ +export function createElementComparator(search) { + let typeofSearch = typeof search; + // Compare primitives + if (typeofSearch !== 'object' || search === null) { + // Compare NaN + if (isNaNFast(search)) { + return isNaNFast; + } + return typeofSearch !== 'bigint' + ? (value) => value === search + : (value) => (big0 + value) === search; + } + // Compare Dates + if (search instanceof Date) { + const valueOfSearch = search.valueOf(); + return (value) => value instanceof Date ? (value.valueOf() === valueOfSearch) : false; + } + // Compare TypedArrays + if (ArrayBuffer.isView(search)) { + return (value) => value ? compareArrayLike(search, value) : false; + } + // Compare Maps and Rows + if (search instanceof Map) { + return creatMapComparator(search); + } + // Compare Array-likes + if (Array.isArray(search)) { + return createArrayLikeComparator(search); + } + // Compare Vectors + if (search instanceof Vector) { + return createVectorComparator(search); + } + // Compare non-empty Objects + return createObjectComparator(search); +} +/** @ignore */ +function createArrayLikeComparator(lhs) { + const comparators = []; + for (let i = -1, n = lhs.length; ++i < n;) { + comparators[i] = createElementComparator(lhs[i]); + } + return createSubElementsComparator(comparators); +} +/** @ignore */ +function creatMapComparator(lhs) { + let i = -1; + const comparators = []; + lhs.forEach((v) => comparators[++i] = createElementComparator(v)); + return createSubElementsComparator(comparators); +} +/** @ignore */ +function createVectorComparator(lhs) { + const comparators = []; + for (let i = -1, n = lhs.length; ++i < n;) { + comparators[i] = createElementComparator(lhs.get(i)); + } + return createSubElementsComparator(comparators); +} +/** @ignore */ +function createObjectComparator(lhs) { + const keys = Object.keys(lhs); + // Only compare non-empty Objects + if (keys.length === 0) { + return () => false; + } + const comparators = []; + for (let i = -1, n = keys.length; ++i < n;) { + comparators[i] = createElementComparator(lhs[keys[i]]); + } + return createSubElementsComparator(comparators, keys); +} +function createSubElementsComparator(comparators, keys) { + return (rhs) => { + if (!rhs || typeof rhs !== 'object') { + return false; + } + switch (rhs.constructor) { + case Array: return compareArray(comparators, rhs); + case Map: + case MapRow: + case StructRow: + return compareObject(comparators, rhs, rhs.keys()); + case Object: + case undefined: // support `Object.create(null)` objects + return compareObject(comparators, rhs, keys || Object.keys(rhs)); + } + return rhs instanceof Vector ? compareVector(comparators, rhs) : false; + }; +} +function compareArray(comparators, arr) { + const n = comparators.length; + if (arr.length !== n) { + return false; + } + for (let i = -1; ++i < n;) { + if (!(comparators[i](arr[i]))) { + return false; + } + } + return true; +} +function compareVector(comparators, vec) { + const n = comparators.length; + if (vec.length !== n) { + return false; + } + for (let i = -1; ++i < n;) { + if (!(comparators[i](vec.get(i)))) { + return false; + } + } + return true; +} +function compareObject(comparators, obj, keys) { + const lKeyItr = keys[Symbol.iterator](); + const rKeyItr = obj instanceof Map ? obj.keys() : Object.keys(obj)[Symbol.iterator](); + const rValItr = obj instanceof Map ? obj.values() : Object.values(obj)[Symbol.iterator](); + let i = 0; + let n = comparators.length; + let rVal = rValItr.next(); + let lKey = lKeyItr.next(); + let rKey = rKeyItr.next(); + for (; i < n && !lKey.done && !rKey.done && !rVal.done; ++i, lKey = lKeyItr.next(), rKey = rKeyItr.next(), rVal = rValItr.next()) { + if (lKey.value !== rKey.value || !comparators[i](rVal.value)) { + break; + } + } + if (i === n && lKey.done && rKey.done && rVal.done) { + return true; + } + lKeyItr.return && lKeyItr.return(); + rKeyItr.return && rKeyItr.return(); + rValItr.return && rValItr.return(); + return false; +} + +//# sourceMappingURL=vector.mjs.map diff --git a/frontend/node_modules/apache-arrow/util/vector.mjs.map b/frontend/node_modules/apache-arrow/util/vector.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..dc8ee1b7c1ccc9d943bbbecf28fe21119ba59792 --- /dev/null +++ b/frontend/node_modules/apache-arrow/util/vector.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["util/vector.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4D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O,CAAC,IAAI,EAAE,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,EAAE;QAC3E,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;YAC1D,MAAM;SACT;KACJ;IACD,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE;QAChD,OAAO,IAAI,CAAC;KACf;IACD,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IACnC,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IACnC,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IACnC,OAAO,KAAK,CAAC;AACjB,CAAC","file":"vector.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Vector } from '../vector';\nimport { MapRow, StructRow } from '../vector/row';\nimport { compareArrayLike } from '../util/buffer';\nimport { BigInt, BigIntAvailable } from './compat';\n\n/** @ignore */\ntype RangeLike = { length: number; stride?: number };\n/** @ignore */\ntype ClampThen = (source: T, index: number) => any;\n/** @ignore */\ntype ClampRangeThen = (source: T, offset: number, length: number) => any;\n\nexport function clampIndex(source: T, index: number): number;\nexport function clampIndex = ClampThen>(source: T, index: number, then: N): ReturnType;\n/** @ignore */\nexport function clampIndex = ClampThen>(source: T, index: number, then?: N) {\n const length = source.length;\n const adjust = index > -1 ? index : (length + (index % length));\n return then ? then(source, adjust) : adjust;\n}\n\n/** @ignore */\nlet tmp: number;\nexport function clampRange(source: T, begin: number | undefined, end: number | undefined): [number, number];\nexport function clampRange = ClampRangeThen>(source: T, begin: number | undefined, end: number | undefined, then: N): ReturnType;\n/** @ignore */\nexport function clampRange = ClampRangeThen>(source: T, begin: number | undefined, end: number | undefined, then?: N) {\n\n // Adjust args similar to Array.prototype.slice. Normalize begin/end to\n // clamp between 0 and length, and wrap around on negative indices, e.g.\n // slice(-1, 5) or slice(5, -1)\n let { length: len = 0 } = source;\n let lhs = typeof begin !== 'number' ? 0 : begin;\n let rhs = typeof end !== 'number' ? len : end;\n // wrap around on negative start/end positions\n (lhs < 0) && (lhs = ((lhs % len) + len) % len);\n (rhs < 0) && (rhs = ((rhs % len) + len) % len);\n // ensure lhs <= rhs\n (rhs < lhs) && (tmp = lhs, lhs = rhs, rhs = tmp);\n // ensure rhs <= length\n (rhs > len) && (rhs = len);\n\n return then ? then(source, lhs, rhs) : [lhs, rhs];\n}\n\nconst big0 = BigIntAvailable ? BigInt(0) : 0;\nconst isNaNFast = (value: any) => value !== value;\n\n/** @ignore */\nexport function createElementComparator(search: any) {\n let typeofSearch = typeof search;\n // Compare primitives\n if (typeofSearch !== 'object' || search === null) {\n // Compare NaN\n if (isNaNFast(search)) {\n return isNaNFast;\n }\n return typeofSearch !== 'bigint'\n ? (value: any) => value === search\n : (value: any) => (big0 + value) === search;\n }\n // Compare Dates\n if (search instanceof Date) {\n const valueOfSearch = search.valueOf();\n return (value: any) => value instanceof Date ? (value.valueOf() === valueOfSearch) : false;\n }\n // Compare TypedArrays\n if (ArrayBuffer.isView(search)) {\n return (value: any) => value ? compareArrayLike(search, value) : false;\n }\n // Compare Maps and Rows\n if (search instanceof Map) { return creatMapComparator(search); }\n // Compare Array-likes\n if (Array.isArray(search)) { return createArrayLikeComparator(search); }\n // Compare Vectors\n if (search instanceof Vector) { return createVectorComparator(search); }\n // Compare non-empty Objects\n return createObjectComparator(search);\n}\n\n/** @ignore */\nfunction createArrayLikeComparator(lhs: ArrayLike) {\n const comparators = [] as ((x: any) => boolean)[];\n for (let i = -1, n = lhs.length; ++i < n;) {\n comparators[i] = createElementComparator(lhs[i]);\n }\n return createSubElementsComparator(comparators);\n}\n\n/** @ignore */\nfunction creatMapComparator(lhs: Map) {\n let i = -1;\n const comparators = [] as ((x: any) => boolean)[];\n lhs.forEach((v) => comparators[++i] = createElementComparator(v));\n return createSubElementsComparator(comparators);\n}\n\n/** @ignore */\nfunction createVectorComparator(lhs: Vector) {\n const comparators = [] as ((x: any) => boolean)[];\n for (let i = -1, n = lhs.length; ++i < n;) {\n comparators[i] = createElementComparator(lhs.get(i));\n }\n return createSubElementsComparator(comparators);\n}\n\n/** @ignore */\nfunction createObjectComparator(lhs: any) {\n const keys = Object.keys(lhs);\n // Only compare non-empty Objects\n if (keys.length === 0) { return () => false; }\n const comparators = [] as ((x: any) => boolean)[];\n for (let i = -1, n = keys.length; ++i < n;) {\n comparators[i] = createElementComparator(lhs[keys[i]]);\n }\n return createSubElementsComparator(comparators, keys);\n}\n\nfunction createSubElementsComparator(comparators: ((x: any) => boolean)[], keys?: Iterable) {\n return (rhs: any) => {\n if (!rhs || typeof rhs !== 'object') {\n return false;\n }\n switch (rhs.constructor) {\n case Array: return compareArray(comparators, rhs);\n case Map:\n case MapRow:\n case StructRow:\n return compareObject(comparators, rhs, rhs.keys());\n case Object:\n case undefined: // support `Object.create(null)` objects\n return compareObject(comparators, rhs, keys || Object.keys(rhs));\n }\n return rhs instanceof Vector ? compareVector(comparators, rhs) : false;\n };\n}\n\nfunction compareArray(comparators: ((x: any) => boolean)[], arr: any[]) {\n const n = comparators.length;\n if (arr.length !== n) { return false; }\n for (let i = -1; ++i < n;) {\n if (!(comparators[i](arr[i]))) { return false; }\n }\n return true;\n}\n\nfunction compareVector(comparators: ((x: any) => boolean)[], vec: Vector) {\n const n = comparators.length;\n if (vec.length !== n) { return false; }\n for (let i = -1; ++i < n;) {\n if (!(comparators[i](vec.get(i)))) { return false; }\n }\n return true;\n}\n\nfunction compareObject(comparators: ((x: any) => boolean)[], obj: Map, keys: Iterable) {\n\n const lKeyItr = keys[Symbol.iterator]();\n const rKeyItr = obj instanceof Map ? obj.keys() : Object.keys(obj)[Symbol.iterator]();\n const rValItr = obj instanceof Map ? obj.values() : Object.values(obj)[Symbol.iterator]();\n\n let i = 0;\n let n = comparators.length;\n let rVal = rValItr.next();\n let lKey = lKeyItr.next();\n let rKey = rKeyItr.next();\n\n for (; i < n && !lKey.done && !rKey.done && !rVal.done;\n ++i, lKey = lKeyItr.next(), rKey = rKeyItr.next(), rVal = rValItr.next()) {\n if (lKey.value !== rKey.value || !comparators[i](rVal.value)) {\n break;\n }\n }\n if (i === n && lKey.done && rKey.done && rVal.done) {\n return true;\n }\n lKeyItr.return && lKeyItr.return();\n rKeyItr.return && rKeyItr.return();\n rValItr.return && rValItr.return();\n return false;\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector.d.ts b/frontend/node_modules/apache-arrow/vector.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..59df355799af12ef022e54af946c286228ec8304 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector.d.ts @@ -0,0 +1,40 @@ +import { Data } from './data'; +import { DataType } from './type'; +import { Chunked } from './vector/chunked'; +/** @ignore */ +export interface Clonable { + clone(...args: any[]): R; +} +/** @ignore */ +export interface Sliceable { + slice(begin?: number, end?: number): R; +} +/** @ignore */ +export interface Applicative { + concat(...others: Vector[]): R; + readonly [Symbol.isConcatSpreadable]: boolean; +} +export interface AbstractVector extends Clonable>, Sliceable>, Applicative> { + readonly TType: T['TType']; + readonly TArray: T['TArray']; + readonly TValue: T['TValue']; +} +export declare abstract class AbstractVector implements Iterable { + abstract readonly data: Data; + abstract readonly type: T; + abstract readonly typeId: T['TType']; + abstract readonly length: number; + abstract readonly stride: number; + abstract readonly nullCount: number; + abstract readonly byteLength: number; + abstract readonly numChildren: number; + abstract readonly ArrayType: T['ArrayType']; + abstract isValid(index: number): boolean; + abstract get(index: number): T['TValue'] | null; + abstract set(index: number, value: T['TValue'] | null): void; + abstract indexOf(value: T['TValue'] | null, fromIndex?: number): number; + abstract [Symbol.iterator](): IterableIterator; + abstract toArray(): T['TArray']; + abstract getChildAt(index: number): Vector | null; +} +export { AbstractVector as Vector }; diff --git a/frontend/node_modules/apache-arrow/vector.js b/frontend/node_modules/apache-arrow/vector.js new file mode 100644 index 0000000000000000000000000000000000000000..06c38285fbd52b9233a3f42273f2a92bab38491b --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector.js @@ -0,0 +1,24 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +class AbstractVector { +} +exports.AbstractVector = AbstractVector; +exports.Vector = AbstractVector; + +//# sourceMappingURL=vector.js.map diff --git a/frontend/node_modules/apache-arrow/vector.js.map b/frontend/node_modules/apache-arrow/vector.js.map new file mode 100644 index 0000000000000000000000000000000000000000..519e671114aefb37621b7c2dae49ef45e82f31e4 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAgCrB,MAAsB,cAAc;CAqBnC;AArBD,wCAqBC;AAE0B,gCAAM","file":"vector.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from './data';\nimport { DataType } from './type';\nimport { Chunked } from './vector/chunked';\n\n/** @ignore */\nexport interface Clonable {\n clone(...args: any[]): R;\n}\n\n/** @ignore */\nexport interface Sliceable {\n slice(begin?: number, end?: number): R;\n}\n\n/** @ignore */\nexport interface Applicative {\n concat(...others: Vector[]): R;\n readonly [Symbol.isConcatSpreadable]: boolean;\n}\n\nexport interface AbstractVector\n extends Clonable>,\n Sliceable>,\n Applicative> {\n\n readonly TType: T['TType'];\n readonly TArray: T['TArray'];\n readonly TValue: T['TValue'];\n}\n\nexport abstract class AbstractVector implements Iterable {\n\n public abstract readonly data: Data;\n public abstract readonly type: T;\n public abstract readonly typeId: T['TType'];\n public abstract readonly length: number;\n public abstract readonly stride: number;\n public abstract readonly nullCount: number;\n public abstract readonly byteLength: number;\n public abstract readonly numChildren: number;\n\n public abstract readonly ArrayType: T['ArrayType'];\n\n public abstract isValid(index: number): boolean;\n public abstract get(index: number): T['TValue'] | null;\n public abstract set(index: number, value: T['TValue'] | null): void;\n public abstract indexOf(value: T['TValue'] | null, fromIndex?: number): number;\n public abstract [Symbol.iterator](): IterableIterator;\n\n public abstract toArray(): T['TArray'];\n public abstract getChildAt(index: number): Vector | null;\n}\n\nexport { AbstractVector as Vector };\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector.mjs b/frontend/node_modules/apache-arrow/vector.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b26ddab5ca9ebf52dc6028ce627692faf28806df --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector.mjs @@ -0,0 +1,21 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +export class AbstractVector { +} +export { AbstractVector as Vector }; + +//# sourceMappingURL=vector.mjs.map diff --git a/frontend/node_modules/apache-arrow/vector.mjs.map b/frontend/node_modules/apache-arrow/vector.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..04451eb2992950c31e0e649f34c9e905cffc191f --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAgCrB,MAAM,OAAgB,cAAc;CAqBnC;AAED,OAAO,EAAE,cAAc,IAAI,MAAM,EAAE,CAAC","file":"vector.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from './data';\nimport { DataType } from './type';\nimport { Chunked } from './vector/chunked';\n\n/** @ignore */\nexport interface Clonable {\n clone(...args: any[]): R;\n}\n\n/** @ignore */\nexport interface Sliceable {\n slice(begin?: number, end?: number): R;\n}\n\n/** @ignore */\nexport interface Applicative {\n concat(...others: Vector[]): R;\n readonly [Symbol.isConcatSpreadable]: boolean;\n}\n\nexport interface AbstractVector\n extends Clonable>,\n Sliceable>,\n Applicative> {\n\n readonly TType: T['TType'];\n readonly TArray: T['TArray'];\n readonly TValue: T['TValue'];\n}\n\nexport abstract class AbstractVector implements Iterable {\n\n public abstract readonly data: Data;\n public abstract readonly type: T;\n public abstract readonly typeId: T['TType'];\n public abstract readonly length: number;\n public abstract readonly stride: number;\n public abstract readonly nullCount: number;\n public abstract readonly byteLength: number;\n public abstract readonly numChildren: number;\n\n public abstract readonly ArrayType: T['ArrayType'];\n\n public abstract isValid(index: number): boolean;\n public abstract get(index: number): T['TValue'] | null;\n public abstract set(index: number, value: T['TValue'] | null): void;\n public abstract indexOf(value: T['TValue'] | null, fromIndex?: number): number;\n public abstract [Symbol.iterator](): IterableIterator;\n\n public abstract toArray(): T['TArray'];\n public abstract getChildAt(index: number): Vector | null;\n}\n\nexport { AbstractVector as Vector };\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/base.d.ts b/frontend/node_modules/apache-arrow/vector/base.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..04671a47d7ef760023f1209507c726636a8bd379 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/base.d.ts @@ -0,0 +1,37 @@ +import { Data } from '../data'; +import { DataType } from '../type'; +import { Chunked } from './chunked'; +import { VectorType as V } from '../interfaces'; +import { AbstractVector, Vector, Clonable, Sliceable, Applicative } from '../vector'; +/** @ignore */ +export interface BaseVector extends Clonable>, Sliceable>, Applicative> { + slice(begin?: number, end?: number): V; + concat(...others: Vector[]): Chunked; + clone(data: Data, children?: Vector[]): V; +} +/** @ignore */ +export declare abstract class BaseVector extends AbstractVector implements Clonable>, Sliceable>, Applicative> { + protected _children?: Vector[]; + constructor(data: Data, children?: Vector[]); + readonly data: Data; + readonly numChildren: number; + readonly type: T; + readonly typeId: T["TType"]; + readonly length: number; + readonly offset: number; + readonly stride: number; + readonly nullCount: number; + readonly byteLength: number; + readonly VectorName: string; + readonly ArrayType: T['ArrayType']; + readonly values: T["TArray"]; + readonly typeIds: T["TArray"]; + readonly nullBitmap: Uint8Array; + readonly valueOffsets: Int32Array; + readonly [Symbol.toStringTag]: string; + isValid(index: number): boolean; + getChildAt(index: number): Vector | null; + toJSON(): any; + protected _sliceInternal(self: this, begin: number, end: number): any; + protected _bindDataAccessors(data: Data): void; +} diff --git a/frontend/node_modules/apache-arrow/vector/base.js b/frontend/node_modules/apache-arrow/vector/base.js new file mode 100644 index 0000000000000000000000000000000000000000..09de1270ddcd57e470821457c4bdce86de4ac768 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/base.js @@ -0,0 +1,82 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const enum_1 = require("../enum"); +const chunked_1 = require("./chunked"); +const vector_1 = require("../util/vector"); +const vector_2 = require("../vector"); +/** @ignore */ +class BaseVector extends vector_2.AbstractVector { + constructor(data, children) { + super(); + this._children = children; + this.numChildren = data.childData.length; + this._bindDataAccessors(this.data = data); + } + get type() { return this.data.type; } + get typeId() { return this.data.typeId; } + get length() { return this.data.length; } + get offset() { return this.data.offset; } + get stride() { return this.data.stride; } + get nullCount() { return this.data.nullCount; } + get byteLength() { return this.data.byteLength; } + get VectorName() { return `${enum_1.Type[this.typeId]}Vector`; } + get ArrayType() { return this.type.ArrayType; } + get values() { return this.data.values; } + get typeIds() { return this.data.typeIds; } + get nullBitmap() { return this.data.nullBitmap; } + get valueOffsets() { return this.data.valueOffsets; } + get [Symbol.toStringTag]() { return `${this.VectorName}<${this.type[Symbol.toStringTag]}>`; } + clone(data, children = this._children) { + return vector_2.Vector.new(data, children); + } + concat(...others) { + return chunked_1.Chunked.concat(this, ...others); + } + slice(begin, end) { + // Adjust args similar to Array.prototype.slice. Normalize begin/end to + // clamp between 0 and length, and wrap around on negative indices, e.g. + // slice(-1, 5) or slice(5, -1) + return vector_1.clampRange(this, begin, end, this._sliceInternal); + } + isValid(index) { + if (this.nullCount > 0) { + const idx = this.offset + index; + const val = this.nullBitmap[idx >> 3]; + const mask = (val & (1 << (idx % 8))); + return mask !== 0; + } + return true; + } + getChildAt(index) { + return index < 0 || index >= this.numChildren ? null : ((this._children || (this._children = []))[index] || + (this._children[index] = vector_2.Vector.new(this.data.childData[index]))); + } + toJSON() { return [...this]; } + _sliceInternal(self, begin, end) { + return self.clone(self.data.slice(begin, end - begin), null); + } + // @ts-ignore + _bindDataAccessors(data) { + // Implementation in src/vectors/index.ts due to circular dependency/packaging shenanigans + } +} +exports.BaseVector = BaseVector; +BaseVector.prototype[Symbol.isConcatSpreadable] = true; + +//# sourceMappingURL=base.js.map diff --git a/frontend/node_modules/apache-arrow/vector/base.js.map b/frontend/node_modules/apache-arrow/vector/base.js.map new file mode 100644 index 0000000000000000000000000000000000000000..bd5d28b8a4a77d37121349a13b924baf0f143523 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/base.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/base.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAGrB,kCAA+B;AAE/B,uCAAoC;AACpC,2CAA4C;AAE5C,sCAAqF;AASrF,cAAc;AACd,MAAsB,UAAqC,SAAQ,uBAAiB;IAKhF,YAAY,IAAa,EAAE,QAAmB;QAC1C,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;QACzC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IAC9C,CAAC;IAKD,IAAW,IAAI,KAAK,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5C,IAAW,MAAM,KAAK,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAChD,IAAW,MAAM,KAAK,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAChD,IAAW,MAAM,KAAK,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;I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CA2EC;AAEA,UAAU,CAAC,SAAiB,CAAC,MAAM,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC","file":"base.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Type } from '../enum';\nimport { DataType } from '../type';\nimport { Chunked } from './chunked';\nimport { clampRange } from '../util/vector';\nimport { VectorType as V } from '../interfaces';\nimport { AbstractVector, Vector, Clonable, Sliceable, Applicative } from '../vector';\n\n/** @ignore */\nexport interface BaseVector extends Clonable>, Sliceable>, Applicative> {\n slice(begin?: number, end?: number): V;\n concat(...others: Vector[]): Chunked;\n clone(data: Data, children?: Vector[]): V;\n}\n\n/** @ignore */\nexport abstract class BaseVector extends AbstractVector\n implements Clonable>, Sliceable>, Applicative> {\n\n protected _children?: Vector[];\n\n constructor(data: Data, children?: Vector[]) {\n super();\n this._children = children;\n this.numChildren = data.childData.length;\n this._bindDataAccessors(this.data = data);\n }\n\n public readonly data: Data;\n public readonly numChildren: number;\n\n public get type() { return this.data.type; }\n public get typeId() { return this.data.typeId; }\n public get length() { return this.data.length; }\n public get offset() { return this.data.offset; }\n public get stride() { return this.data.stride; }\n public get nullCount() { return this.data.nullCount; }\n public get byteLength() { return this.data.byteLength; }\n public get VectorName() { return `${Type[this.typeId]}Vector`; }\n\n public get ArrayType(): T['ArrayType'] { return this.type.ArrayType; }\n\n public get values() { return this.data.values; }\n public get typeIds() { return this.data.typeIds; }\n public get nullBitmap() { return this.data.nullBitmap; }\n public get valueOffsets() { return this.data.valueOffsets; }\n\n public get [Symbol.toStringTag]() { return `${this.VectorName}<${this.type[Symbol.toStringTag]}>`; }\n\n public clone(data: Data, children = this._children) {\n return Vector.new(data, children) as any;\n }\n\n public concat(...others: Vector[]) {\n return Chunked.concat(this, ...others);\n }\n\n public slice(begin?: number, end?: number) {\n // Adjust args similar to Array.prototype.slice. Normalize begin/end to\n // clamp between 0 and length, and wrap around on negative indices, e.g.\n // slice(-1, 5) or slice(5, -1)\n return clampRange(this, begin, end, this._sliceInternal);\n }\n\n public isValid(index: number): boolean {\n if (this.nullCount > 0) {\n const idx = this.offset + index;\n const val = this.nullBitmap[idx >> 3];\n const mask = (val & (1 << (idx % 8)));\n return mask !== 0;\n }\n return true;\n }\n\n public getChildAt(index: number): Vector | null {\n return index < 0 || index >= this.numChildren ? null : (\n (this._children || (this._children = []))[index] ||\n (this._children[index] = Vector.new(this.data.childData[index] as Data))\n ) as Vector;\n }\n\n public toJSON(): any { return [...this]; }\n\n protected _sliceInternal(self: this, begin: number, end: number) {\n return self.clone(self.data.slice(begin, end - begin), null!);\n }\n\n // @ts-ignore\n protected _bindDataAccessors(data: Data) {\n // Implementation in src/vectors/index.ts due to circular dependency/packaging shenanigans\n }\n}\n\n(BaseVector.prototype as any)[Symbol.isConcatSpreadable] = true;\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/base.mjs b/frontend/node_modules/apache-arrow/vector/base.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e73668bfefbc97b3fb6865d2ae3eedcc4f56c0e3 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/base.mjs @@ -0,0 +1,79 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { Type } from '../enum'; +import { Chunked } from './chunked'; +import { clampRange } from '../util/vector'; +import { AbstractVector, Vector } from '../vector'; +/** @ignore */ +export class BaseVector extends AbstractVector { + constructor(data, children) { + super(); + this._children = children; + this.numChildren = data.childData.length; + this._bindDataAccessors(this.data = data); + } + get type() { return this.data.type; } + get typeId() { return this.data.typeId; } + get length() { return this.data.length; } + get offset() { return this.data.offset; } + get stride() { return this.data.stride; } + get nullCount() { return this.data.nullCount; } + get byteLength() { return this.data.byteLength; } + get VectorName() { return `${Type[this.typeId]}Vector`; } + get ArrayType() { return this.type.ArrayType; } + get values() { return this.data.values; } + get typeIds() { return this.data.typeIds; } + get nullBitmap() { return this.data.nullBitmap; } + get valueOffsets() { return this.data.valueOffsets; } + get [Symbol.toStringTag]() { return `${this.VectorName}<${this.type[Symbol.toStringTag]}>`; } + clone(data, children = this._children) { + return Vector.new(data, children); + } + concat(...others) { + return Chunked.concat(this, ...others); + } + slice(begin, end) { + // Adjust args similar to Array.prototype.slice. Normalize begin/end to + // clamp between 0 and length, and wrap around on negative indices, e.g. + // slice(-1, 5) or slice(5, -1) + return clampRange(this, begin, end, this._sliceInternal); + } + isValid(index) { + if (this.nullCount > 0) { + const idx = this.offset + index; + const val = this.nullBitmap[idx >> 3]; + const mask = (val & (1 << (idx % 8))); + return mask !== 0; + } + return true; + } + getChildAt(index) { + return index < 0 || index >= this.numChildren ? null : ((this._children || (this._children = []))[index] || + (this._children[index] = Vector.new(this.data.childData[index]))); + } + toJSON() { return [...this]; } + _sliceInternal(self, begin, end) { + return self.clone(self.data.slice(begin, end - begin), null); + } + // @ts-ignore + _bindDataAccessors(data) { + // Implementation in src/vectors/index.ts due to circular dependency/packaging shenanigans + } +} +BaseVector.prototype[Symbol.isConcatSpreadable] = true; + +//# sourceMappingURL=base.mjs.map diff --git a/frontend/node_modules/apache-arrow/vector/base.mjs.map b/frontend/node_modules/apache-arrow/vector/base.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..87432b8d6a1a4c4d4bb2dc1a871135c2fb70679a --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/base.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/base.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAGrB,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAE,MAAM,EAAoC,MAAM,WAAW,CAAC;AASrF,cAAc;AACd,MAAM,OAAgB,UAAqC,SAAQ,cAAiB;IAKhF,YAAY,IAAa,EAAE,QAAmB;QAC1C,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;QACzC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IAC9C,CAAC;IAKD,IAAW,IAAI,KAAK,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5C,IAAW,MAAM,KAAK,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAChD,IAAW,MAAM,KAAK,OAAO,IAAI,CAAC,IAAI,CAA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,CAAC,CAAC;IAClE,CAAC;IAED,aAAa;IACH,kBAAkB,CAAC,IAAa;QACtC,0FAA0F;IAC9F,CAAC;CACJ;AAEA,UAAU,CAAC,SAAiB,CAAC,MAAM,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC","file":"base.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Type } from '../enum';\nimport { DataType } from '../type';\nimport { Chunked } from './chunked';\nimport { clampRange } from '../util/vector';\nimport { VectorType as V } from '../interfaces';\nimport { AbstractVector, Vector, Clonable, Sliceable, Applicative } from '../vector';\n\n/** @ignore */\nexport interface BaseVector extends Clonable>, Sliceable>, Applicative> {\n slice(begin?: number, end?: number): V;\n concat(...others: Vector[]): Chunked;\n clone(data: Data, children?: Vector[]): V;\n}\n\n/** @ignore */\nexport abstract class BaseVector extends AbstractVector\n implements Clonable>, Sliceable>, Applicative> {\n\n protected _children?: Vector[];\n\n constructor(data: Data, children?: Vector[]) {\n super();\n this._children = children;\n this.numChildren = data.childData.length;\n this._bindDataAccessors(this.data = data);\n }\n\n public readonly data: Data;\n public readonly numChildren: number;\n\n public get type() { return this.data.type; }\n public get typeId() { return this.data.typeId; }\n public get length() { return this.data.length; }\n public get offset() { return this.data.offset; }\n public get stride() { return this.data.stride; }\n public get nullCount() { return this.data.nullCount; }\n public get byteLength() { return this.data.byteLength; }\n public get VectorName() { return `${Type[this.typeId]}Vector`; }\n\n public get ArrayType(): T['ArrayType'] { return this.type.ArrayType; }\n\n public get values() { return this.data.values; }\n public get typeIds() { return this.data.typeIds; }\n public get nullBitmap() { return this.data.nullBitmap; }\n public get valueOffsets() { return this.data.valueOffsets; }\n\n public get [Symbol.toStringTag]() { return `${this.VectorName}<${this.type[Symbol.toStringTag]}>`; }\n\n public clone(data: Data, children = this._children) {\n return Vector.new(data, children) as any;\n }\n\n public concat(...others: Vector[]) {\n return Chunked.concat(this, ...others);\n }\n\n public slice(begin?: number, end?: number) {\n // Adjust args similar to Array.prototype.slice. Normalize begin/end to\n // clamp between 0 and length, and wrap around on negative indices, e.g.\n // slice(-1, 5) or slice(5, -1)\n return clampRange(this, begin, end, this._sliceInternal);\n }\n\n public isValid(index: number): boolean {\n if (this.nullCount > 0) {\n const idx = this.offset + index;\n const val = this.nullBitmap[idx >> 3];\n const mask = (val & (1 << (idx % 8)));\n return mask !== 0;\n }\n return true;\n }\n\n public getChildAt(index: number): Vector | null {\n return index < 0 || index >= this.numChildren ? null : (\n (this._children || (this._children = []))[index] ||\n (this._children[index] = Vector.new(this.data.childData[index] as Data))\n ) as Vector;\n }\n\n public toJSON(): any { return [...this]; }\n\n protected _sliceInternal(self: this, begin: number, end: number) {\n return self.clone(self.data.slice(begin, end - begin), null!);\n }\n\n // @ts-ignore\n protected _bindDataAccessors(data: Data) {\n // Implementation in src/vectors/index.ts due to circular dependency/packaging shenanigans\n }\n}\n\n(BaseVector.prototype as any)[Symbol.isConcatSpreadable] = true;\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/binary.d.ts b/frontend/node_modules/apache-arrow/vector/binary.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b316a60e90a3eb2bee49afad34495e02b2d8206c --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/binary.d.ts @@ -0,0 +1,6 @@ +import { BaseVector } from './base'; +import { Binary } from '../type'; +/** @ignore */ +export declare class BinaryVector extends BaseVector { + asUtf8(): import("./utf8").Utf8Vector; +} diff --git a/frontend/node_modules/apache-arrow/vector/binary.js b/frontend/node_modules/apache-arrow/vector/binary.js new file mode 100644 index 0000000000000000000000000000000000000000..eb0a6a499b4fca34550e28e8a0c53ac2d732c695 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/binary.js @@ -0,0 +1,30 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const vector_1 = require("../vector"); +const base_1 = require("./base"); +const type_1 = require("../type"); +/** @ignore */ +class BinaryVector extends base_1.BaseVector { + asUtf8() { + return vector_1.Vector.new(this.data.clone(new type_1.Utf8())); + } +} +exports.BinaryVector = BinaryVector; + +//# sourceMappingURL=binary.js.map diff --git a/frontend/node_modules/apache-arrow/vector/binary.js.map b/frontend/node_modules/apache-arrow/vector/binary.js.map new file mode 100644 index 0000000000000000000000000000000000000000..8822d1a9d298329985f9b4a83b05f00558b683c8 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/binary.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/binary.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,sCAAmC;AACnC,iCAAoC;AACpC,kCAAuC;AAEvC,cAAc;AACd,MAAa,YAAa,SAAQ,iBAAkB;IACzC,MAAM;QACT,OAAO,eAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,WAAI,EAAE,CAAC,CAAC,CAAC;IACnD,CAAC;CACJ;AAJD,oCAIC","file":"binary.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Vector } from '../vector';\nimport { BaseVector } from './base';\nimport { Binary, Utf8 } from '../type';\n\n/** @ignore */\nexport class BinaryVector extends BaseVector {\n public asUtf8() {\n return Vector.new(this.data.clone(new Utf8()));\n }\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/binary.mjs b/frontend/node_modules/apache-arrow/vector/binary.mjs new file mode 100644 index 0000000000000000000000000000000000000000..2322428e30721bf97060c9816461f8d7c8ac311b --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/binary.mjs @@ -0,0 +1,27 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { Vector } from '../vector'; +import { BaseVector } from './base'; +import { Utf8 } from '../type'; +/** @ignore */ +export class BinaryVector extends BaseVector { + asUtf8() { + return Vector.new(this.data.clone(new Utf8())); + } +} + +//# sourceMappingURL=binary.mjs.map diff --git a/frontend/node_modules/apache-arrow/vector/binary.mjs.map b/frontend/node_modules/apache-arrow/vector/binary.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..b49ba64e5df042c69c8b0f934974e4fb0cf1d712 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/binary.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/binary.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAU,IAAI,EAAE,MAAM,SAAS,CAAC;AAEvC,cAAc;AACd,MAAM,OAAO,YAAa,SAAQ,UAAkB;IACzC,MAAM;QACT,OAAO,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC;IACnD,CAAC;CACJ","file":"binary.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Vector } from '../vector';\nimport { BaseVector } from './base';\nimport { Binary, Utf8 } from '../type';\n\n/** @ignore */\nexport class BinaryVector extends BaseVector {\n public asUtf8() {\n return Vector.new(this.data.clone(new Utf8()));\n }\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/bool.d.ts b/frontend/node_modules/apache-arrow/vector/bool.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..da1f62070d2f1d7641c799204494351deff727fa --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/bool.d.ts @@ -0,0 +1,12 @@ +import { Bool } from '../type'; +import { Chunked } from './chunked'; +import { BaseVector } from './base'; +import { VectorBuilderOptions } from './index'; +import { VectorBuilderOptionsAsync } from './index'; +/** @ignore */ +export declare class BoolVector extends BaseVector { + static from(input: Iterable): BoolVector; + static from(input: AsyncIterable): Promise; + static from(input: VectorBuilderOptions): Chunked; + static from(input: VectorBuilderOptionsAsync): Promise>; +} diff --git a/frontend/node_modules/apache-arrow/vector/bool.js b/frontend/node_modules/apache-arrow/vector/bool.js new file mode 100644 index 0000000000000000000000000000000000000000..7a945e2077a865ebc0d3335d49f5aba401fe089f --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/bool.js @@ -0,0 +1,31 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const type_1 = require("../type"); +const base_1 = require("./base"); +const index_1 = require("./index"); +/** @ignore */ +class BoolVector extends base_1.BaseVector { + /** @nocollapse */ + static from(input) { + return index_1.vectorFromValuesWithType(() => new type_1.Bool(), input); + } +} +exports.BoolVector = BoolVector; + +//# sourceMappingURL=bool.js.map diff --git a/frontend/node_modules/apache-arrow/vector/bool.js.map b/frontend/node_modules/apache-arrow/vector/bool.js.map new file mode 100644 index 0000000000000000000000000000000000000000..4b17a25a0558805e0e2895b6fa161a3bc2656c33 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/bool.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/bool.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,kCAA+B;AAE/B,iCAAoC;AAEpC,mCAAmD;AAGnD,cAAc;AACd,MAAa,UAAW,SAAQ,iBAAgB;IAK5C,kBAAkB;IACX,MAAM,CAAC,IAAI,CAAc,KAA8I;QAC1K,OAAO,gCAAwB,CAAC,GAAG,EAAE,CAAC,IAAI,WAAI,EAAE,EAAE,KAAK,CAAC,CAAC;IAC7D,CAAC;CACJ;AATD,gCASC","file":"bool.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Bool } from '../type';\nimport { Chunked } from './chunked';\nimport { BaseVector } from './base';\nimport { VectorBuilderOptions } from './index';\nimport { vectorFromValuesWithType } from './index';\nimport { VectorBuilderOptionsAsync } from './index';\n\n/** @ignore */\nexport class BoolVector extends BaseVector {\n public static from(input: Iterable): BoolVector;\n public static from(input: AsyncIterable): Promise;\n public static from(input: VectorBuilderOptions): Chunked;\n public static from(input: VectorBuilderOptionsAsync): Promise>;\n /** @nocollapse */\n public static from(input: Iterable | AsyncIterable | VectorBuilderOptions | VectorBuilderOptionsAsync) {\n return vectorFromValuesWithType(() => new Bool(), input);\n }\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/bool.mjs b/frontend/node_modules/apache-arrow/vector/bool.mjs new file mode 100644 index 0000000000000000000000000000000000000000..3ad901c320a3ff16abc7b2a3959b45ec0a216979 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/bool.mjs @@ -0,0 +1,28 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { Bool } from '../type'; +import { BaseVector } from './base'; +import { vectorFromValuesWithType } from './index'; +/** @ignore */ +export class BoolVector extends BaseVector { + /** @nocollapse */ + static from(input) { + return vectorFromValuesWithType(() => new Bool(), input); + } +} + +//# sourceMappingURL=bool.mjs.map diff --git a/frontend/node_modules/apache-arrow/vector/bool.mjs.map b/frontend/node_modules/apache-arrow/vector/bool.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..3721b2ffab5c79f1a4c3bd52bfe24b2c2c5d181f --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/bool.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/bool.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAGnD,cAAc;AACd,MAAM,OAAO,UAAW,SAAQ,UAAgB;IAK5C,kBAAkB;IACX,MAAM,CAAC,IAAI,CAAc,KAA8I;QAC1K,OAAO,wBAAwB,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC;IAC7D,CAAC;CACJ","file":"bool.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Bool } from '../type';\nimport { Chunked } from './chunked';\nimport { BaseVector } from './base';\nimport { VectorBuilderOptions } from './index';\nimport { vectorFromValuesWithType } from './index';\nimport { VectorBuilderOptionsAsync } from './index';\n\n/** @ignore */\nexport class BoolVector extends BaseVector {\n public static from(input: Iterable): BoolVector;\n public static from(input: AsyncIterable): Promise;\n public static from(input: VectorBuilderOptions): Chunked;\n public static from(input: VectorBuilderOptionsAsync): Promise>;\n /** @nocollapse */\n public static from(input: Iterable | AsyncIterable | VectorBuilderOptions | VectorBuilderOptionsAsync) {\n return vectorFromValuesWithType(() => new Bool(), input);\n }\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/chunked.d.ts b/frontend/node_modules/apache-arrow/vector/chunked.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..5bfb98e2a0aac739825b89d428820b986a09b43d --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/chunked.d.ts @@ -0,0 +1,56 @@ +import { Data } from '../data'; +import { DataType, Dictionary } from '../type'; +import { AbstractVector, Vector } from '../vector'; +import { Clonable, Sliceable, Applicative } from '../vector'; +/** @ignore */ +declare type ChunkedDict = T extends Dictionary ? Vector : null | never; +/** @ignore */ +declare type ChunkedKeys = T extends Dictionary ? Vector | Chunked : null | never; +/** @ignore */ +export declare type SearchContinuation = (column: T, chunkIndex: number, valueIndex: number) => any; +/** @ignore */ +export declare class Chunked extends AbstractVector implements Clonable>, Sliceable>, Applicative> { + /** @nocollapse */ + static flatten(...vectors: (Vector | Vector[])[]): Vector[]; + /** @nocollapse */ + static concat(...vectors: (Vector | Vector[])[]): Chunked; + protected _type: T; + protected _length: number; + protected _chunks: Vector[]; + protected _numChildren: number; + protected _children?: Chunked[]; + protected _nullCount: number; + protected _chunkOffsets: Uint32Array; + constructor(type: T, chunks?: Vector[], offsets?: Uint32Array); + readonly type: T; + readonly length: number; + readonly chunks: Vector[]; + readonly typeId: T['TType']; + readonly VectorName: string; + readonly data: Data; + readonly ArrayType: any; + readonly numChildren: number; + readonly stride: number; + readonly byteLength: number; + readonly nullCount: number; + protected _indices?: ChunkedKeys; + readonly indices: ChunkedKeys | null; + readonly dictionary: ChunkedDict | null; + [Symbol.iterator](): IterableIterator; + clone(chunks?: Vector[]): Chunked; + concat(...others: Vector[]): Chunked; + slice(begin?: number, end?: number): Chunked; + getChildAt(index: number): Chunked | null; + search(index: number): [number, number] | null; + search>>(index: number, then?: N): ReturnType; + isValid(index: number): boolean; + get(index: number): T['TValue'] | null; + set(index: number, value: T['TValue'] | null): void; + indexOf(element: T['TValue'], offset?: number): number; + toArray(): T['TArray']; + protected getInternal({ _chunks }: Chunked, i: number, j: number): T["TValue"] | null; + protected isValidInternal({ _chunks }: Chunked, i: number, j: number): boolean; + protected indexOfInternal({ _chunks }: Chunked, chunkIndex: number, fromIndex: number, element: T['TValue']): number; + protected _sliceInternal(self: Chunked, begin: number, end: number): Chunked; +} +export {}; diff --git a/frontend/node_modules/apache-arrow/vector/chunked.js b/frontend/node_modules/apache-arrow/vector/chunked.js new file mode 100644 index 0000000000000000000000000000000000000000..d700758bd66c96e9d86a774d231f288c6365513f --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/chunked.js @@ -0,0 +1,244 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const vector_1 = require("../util/vector"); +const type_1 = require("../type"); +const args_1 = require("../util/args"); +const vector_2 = require("../vector"); +/** @ignore */ +class Chunked extends vector_2.AbstractVector { + constructor(type, chunks = [], offsets = calculateOffsets(chunks)) { + super(); + this._nullCount = -1; + this._type = type; + this._chunks = chunks; + this._chunkOffsets = offsets; + this._length = offsets[offsets.length - 1]; + this._numChildren = (this._type.children || []).length; + } + /** @nocollapse */ + static flatten(...vectors) { + return args_1.selectChunkArgs(vector_2.Vector, vectors); + } + /** @nocollapse */ + static concat(...vectors) { + const chunks = Chunked.flatten(...vectors); + return new Chunked(chunks[0].type, chunks); + } + get type() { return this._type; } + get length() { return this._length; } + get chunks() { return this._chunks; } + get typeId() { return this._type.typeId; } + get VectorName() { return `Chunked<${this._type}>`; } + get data() { + return this._chunks[0] ? this._chunks[0].data : null; + } + get ArrayType() { return this._type.ArrayType; } + get numChildren() { return this._numChildren; } + get stride() { return this._chunks[0] ? this._chunks[0].stride : 1; } + get byteLength() { + return this._chunks.reduce((byteLength, chunk) => byteLength + chunk.byteLength, 0); + } + get nullCount() { + let nullCount = this._nullCount; + if (nullCount < 0) { + this._nullCount = nullCount = this._chunks.reduce((x, { nullCount }) => x + nullCount, 0); + } + return nullCount; + } + get indices() { + if (type_1.DataType.isDictionary(this._type)) { + if (!this._indices) { + const chunks = this._chunks; + this._indices = (chunks.length === 1 + ? chunks[0].indices + : Chunked.concat(...chunks.map((x) => x.indices))); + } + return this._indices; + } + return null; + } + get dictionary() { + if (type_1.DataType.isDictionary(this._type)) { + return this._chunks[this._chunks.length - 1].data.dictionary; + } + return null; + } + *[Symbol.iterator]() { + for (const chunk of this._chunks) { + yield* chunk; + } + } + clone(chunks = this._chunks) { + return new Chunked(this._type, chunks); + } + concat(...others) { + return this.clone(Chunked.flatten(this, ...others)); + } + slice(begin, end) { + return vector_1.clampRange(this, begin, end, this._sliceInternal); + } + getChildAt(index) { + if (index < 0 || index >= this._numChildren) { + return null; + } + let columns = this._children || (this._children = []); + let child, field, chunks; + if (child = columns[index]) { + return child; + } + if (field = (this._type.children || [])[index]) { + chunks = this._chunks + .map((vector) => vector.getChildAt(index)) + .filter((vec) => vec != null); + if (chunks.length > 0) { + return (columns[index] = new Chunked(field.type, chunks)); + } + } + return null; + } + search(index, then) { + let idx = index; + // binary search to find the child vector and value indices + let offsets = this._chunkOffsets, rhs = offsets.length - 1; + // return early if out of bounds, or if there's just one child + if (idx < 0) { + return null; + } + if (idx >= offsets[rhs]) { + return null; + } + if (rhs <= 1) { + return then ? then(this, 0, idx) : [0, idx]; + } + let lhs = 0, pos = 0, mid = 0; + do { + if (lhs + 1 === rhs) { + return then ? then(this, lhs, idx - pos) : [lhs, idx - pos]; + } + mid = lhs + ((rhs - lhs) / 2) | 0; + idx >= offsets[mid] ? (lhs = mid) : (rhs = mid); + } while (idx < offsets[rhs] && idx >= (pos = offsets[lhs])); + return null; + } + isValid(index) { + return !!this.search(index, this.isValidInternal); + } + get(index) { + return this.search(index, this.getInternal); + } + set(index, value) { + this.search(index, ({ chunks }, i, j) => chunks[i].set(j, value)); + } + indexOf(element, offset) { + if (offset && typeof offset === 'number') { + return this.search(offset, (self, i, j) => this.indexOfInternal(self, i, j, element)); + } + return this.indexOfInternal(this, 0, Math.max(0, offset || 0), element); + } + toArray() { + const { chunks } = this; + const n = chunks.length; + let ArrayType = this._type.ArrayType; + if (n <= 0) { + return new ArrayType(0); + } + if (n <= 1) { + return chunks[0].toArray(); + } + let len = 0, src = new Array(n); + for (let i = -1; ++i < n;) { + len += (src[i] = chunks[i].toArray()).length; + } + if (ArrayType !== src[0].constructor) { + ArrayType = src[0].constructor; + } + let dst = new ArrayType(len); + let set = ArrayType === Array ? arraySet : typedSet; + for (let i = -1, idx = 0; ++i < n;) { + idx = set(src[i], dst, idx); + } + return dst; + } + getInternal({ _chunks }, i, j) { return _chunks[i].get(j); } + isValidInternal({ _chunks }, i, j) { return _chunks[i].isValid(j); } + indexOfInternal({ _chunks }, chunkIndex, fromIndex, element) { + let i = chunkIndex - 1, n = _chunks.length; + let start = fromIndex, offset = 0, found = -1; + while (++i < n) { + if (~(found = _chunks[i].indexOf(element, start))) { + return offset + found; + } + start = 0; + offset += _chunks[i].length; + } + return -1; + } + _sliceInternal(self, begin, end) { + const slices = []; + const { chunks, _chunkOffsets: chunkOffsets } = self; + for (let i = -1, n = chunks.length; ++i < n;) { + const chunk = chunks[i]; + const chunkLength = chunk.length; + const chunkOffset = chunkOffsets[i]; + // If the child is to the right of the slice boundary, we can stop + if (chunkOffset >= end) { + break; + } + // If the child is to the left of of the slice boundary, exclude + if (begin >= chunkOffset + chunkLength) { + continue; + } + // If the child is between both left and right boundaries, include w/o slicing + if (chunkOffset >= begin && (chunkOffset + chunkLength) <= end) { + slices.push(chunk); + continue; + } + // If the child overlaps one of the slice boundaries, include that slice + const from = Math.max(0, begin - chunkOffset); + const to = Math.min(end - chunkOffset, chunkLength); + slices.push(chunk.slice(from, to)); + } + return self.clone(slices); + } +} +exports.Chunked = Chunked; +/** @ignore */ +function calculateOffsets(vectors) { + let offsets = new Uint32Array((vectors || []).length + 1); + let offset = offsets[0] = 0, length = offsets.length; + for (let index = 0; ++index < length;) { + offsets[index] = (offset += vectors[index - 1].length); + } + return offsets; +} +/** @ignore */ +const typedSet = (src, dst, offset) => { + dst.set(src, offset); + return (offset + src.length); +}; +/** @ignore */ +const arraySet = (src, dst, offset) => { + let idx = offset; + for (let i = -1, n = src.length; ++i < n;) { + dst[idx++] = src[i]; + } + return idx; +}; + +//# sourceMappingURL=chunked.js.map diff --git a/frontend/node_modules/apache-arrow/vector/chunked.js.map b/frontend/node_modules/apache-arrow/vector/chunked.js.map new file mode 100644 index 0000000000000000000000000000000000000000..0867afab9b0792829d41f9d17a9ef96c5ce006de --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/chunked.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/chunked.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,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AC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;CACJ;AAtND,0BAsNC;AAED,cAAc;AACd,SAAS,gBAAgB,CAAqB,OAAoB;IAC9D,IAAI,OAAO,GAAG,IAAI,WAAW,CAAC,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC1D,IAAI,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IACrD,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,EAAE,KAAK,GAAG,MAAM,GAAG;QACnC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,IAAI,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;KAC1D;IACD,OAAO,OAAO,CAAC;AACnB,CAAC;AAED,cAAc;AACd,MAAM,QAAQ,GAAG,CAAC,GAAe,EAAE,GAAe,EAAE,MAAc,EAAE,EAAE;IAClE,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACrB,OAAO,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC,CAAC;AAEF,cAAc;AACd,MAAM,QAAQ,GAAG,CAAC,GAAU,EAAE,GAAU,EAAE,MAAc,EAAE,EAAE;IACxD,IAAI,GAAG,GAAG,MAAM,CAAC;IACjB,KAAK,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG;QACvC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;KACvB;IACD,OAAO,GAAG,CAAC;AACf,CAAC,CAAC","file":"chunked.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Field } from '../schema';\nimport { clampRange } from '../util/vector';\nimport { DataType, Dictionary } from '../type';\nimport { selectChunkArgs } from '../util/args';\nimport { DictionaryVector } from './dictionary';\nimport { AbstractVector, Vector } from '../vector';\nimport { Clonable, Sliceable, Applicative } from '../vector';\n\n/** @ignore */\ntype ChunkedDict = T extends Dictionary ? Vector : null | never;\n/** @ignore */\ntype ChunkedKeys = T extends Dictionary ? Vector | Chunked : null | never;\n\n/** @ignore */\nexport type SearchContinuation = (column: T, chunkIndex: number, valueIndex: number) => any;\n\n/** @ignore */\nexport class Chunked\n extends AbstractVector\n implements Clonable>,\n Sliceable>,\n Applicative> {\n\n /** @nocollapse */\n public static flatten(...vectors: (Vector | Vector[])[]) {\n return selectChunkArgs>(Vector, vectors);\n }\n\n /** @nocollapse */\n public static concat(...vectors: (Vector | Vector[])[]) {\n const chunks = Chunked.flatten(...vectors);\n return new Chunked(chunks[0].type, chunks);\n }\n\n protected _type: T;\n protected _length: number;\n protected _chunks: Vector[];\n protected _numChildren: number;\n protected _children?: Chunked[];\n protected _nullCount: number = -1;\n protected _chunkOffsets: Uint32Array;\n\n constructor(type: T, chunks: Vector[] = [], offsets = calculateOffsets(chunks)) {\n super();\n this._type = type;\n this._chunks = chunks;\n this._chunkOffsets = offsets;\n this._length = offsets[offsets.length - 1];\n this._numChildren = (this._type.children || []).length;\n }\n\n public get type() { return this._type; }\n public get length() { return this._length; }\n public get chunks() { return this._chunks; }\n public get typeId(): T['TType'] { return this._type.typeId; }\n public get VectorName() { return `Chunked<${this._type}>`; }\n public get data(): Data {\n return this._chunks[0] ? this._chunks[0].data : null;\n }\n\n public get ArrayType() { return this._type.ArrayType; }\n public get numChildren() { return this._numChildren; }\n public get stride() { return this._chunks[0] ? this._chunks[0].stride : 1; }\n public get byteLength(): number {\n return this._chunks.reduce((byteLength, chunk) => byteLength + chunk.byteLength, 0);\n }\n public get nullCount() {\n let nullCount = this._nullCount;\n if (nullCount < 0) {\n this._nullCount = nullCount = this._chunks.reduce((x, { nullCount }) => x + nullCount, 0);\n }\n return nullCount;\n }\n\n protected _indices?: ChunkedKeys;\n public get indices(): ChunkedKeys | null {\n if (DataType.isDictionary(this._type)) {\n if (!this._indices) {\n const chunks = ( this._chunks) as DictionaryVector[];\n this._indices = (chunks.length === 1\n ? chunks[0].indices\n : Chunked.concat(...chunks.map((x) => x.indices))) as ChunkedKeys;\n }\n return this._indices;\n }\n return null;\n }\n public get dictionary(): ChunkedDict | null {\n if (DataType.isDictionary(this._type)) {\n return this._chunks[this._chunks.length - 1].data.dictionary as ChunkedDict;\n }\n return null;\n }\n\n public *[Symbol.iterator](): IterableIterator {\n for (const chunk of this._chunks) {\n yield* chunk;\n }\n }\n\n public clone(chunks = this._chunks): Chunked {\n return new Chunked(this._type, chunks);\n }\n\n public concat(...others: Vector[]): Chunked {\n return this.clone(Chunked.flatten(this, ...others));\n }\n\n public slice(begin?: number, end?: number): Chunked {\n return clampRange(this, begin, end, this._sliceInternal);\n }\n\n public getChildAt(index: number): Chunked | null {\n\n if (index < 0 || index >= this._numChildren) { return null; }\n\n let columns = this._children || (this._children = []);\n let child: Chunked, field: Field, chunks: Vector[];\n\n if (child = columns[index]) { return child; }\n if (field = ((this._type.children || [])[index] as Field)) {\n chunks = this._chunks\n .map((vector) => vector.getChildAt(index))\n .filter((vec): vec is Vector => vec != null);\n if (chunks.length > 0) {\n return (columns[index] = new Chunked(field.type, chunks));\n }\n }\n\n return null;\n }\n\n public search(index: number): [number, number] | null;\n public search>>(index: number, then?: N): ReturnType;\n public search>>(index: number, then?: N) {\n let idx = index;\n // binary search to find the child vector and value indices\n let offsets = this._chunkOffsets, rhs = offsets.length - 1;\n // return early if out of bounds, or if there's just one child\n if (idx < 0 ) { return null; }\n if (idx >= offsets[rhs]) { return null; }\n if (rhs <= 1 ) { return then ? then(this, 0, idx) : [0, idx]; }\n let lhs = 0, pos = 0, mid = 0;\n do {\n if (lhs + 1 === rhs) {\n return then ? then(this, lhs, idx - pos) : [lhs, idx - pos];\n }\n mid = lhs + ((rhs - lhs) / 2) | 0;\n idx >= offsets[mid] ? (lhs = mid) : (rhs = mid);\n } while (idx < offsets[rhs] && idx >= (pos = offsets[lhs]));\n return null;\n }\n\n public isValid(index: number): boolean {\n return !!this.search(index, this.isValidInternal);\n }\n\n public get(index: number): T['TValue'] | null {\n return this.search(index, this.getInternal);\n }\n\n public set(index: number, value: T['TValue'] | null): void {\n this.search(index, ({ chunks }, i, j) => chunks[i].set(j, value));\n }\n\n public indexOf(element: T['TValue'], offset?: number): number {\n if (offset && typeof offset === 'number') {\n return this.search(offset, (self, i, j) => this.indexOfInternal(self, i, j, element))!;\n }\n return this.indexOfInternal(this, 0, Math.max(0, offset || 0), element);\n }\n\n public toArray(): T['TArray'] {\n const { chunks } = this;\n const n = chunks.length;\n let ArrayType: any = this._type.ArrayType;\n if (n <= 0) { return new ArrayType(0); }\n if (n <= 1) { return chunks[0].toArray(); }\n let len = 0, src = new Array(n);\n for (let i = -1; ++i < n;) {\n len += (src[i] = chunks[i].toArray()).length;\n }\n if (ArrayType !== src[0].constructor) {\n ArrayType = src[0].constructor;\n }\n let dst = new ArrayType(len);\n let set: any = ArrayType === Array ? arraySet : typedSet;\n for (let i = -1, idx = 0; ++i < n;) {\n idx = set(src[i], dst, idx);\n }\n return dst;\n }\n\n protected getInternal({ _chunks }: Chunked, i: number, j: number) { return _chunks[i].get(j); }\n protected isValidInternal({ _chunks }: Chunked, i: number, j: number) { return _chunks[i].isValid(j); }\n protected indexOfInternal({ _chunks }: Chunked, chunkIndex: number, fromIndex: number, element: T['TValue']) {\n let i = chunkIndex - 1, n = _chunks.length;\n let start = fromIndex, offset = 0, found = -1;\n while (++i < n) {\n if (~(found = _chunks[i].indexOf(element, start))) {\n return offset + found;\n }\n start = 0;\n offset += _chunks[i].length;\n }\n return -1;\n }\n\n protected _sliceInternal(self: Chunked, begin: number, end: number) {\n const slices: Vector[] = [];\n const { chunks, _chunkOffsets: chunkOffsets } = self;\n for (let i = -1, n = chunks.length; ++i < n;) {\n const chunk = chunks[i];\n const chunkLength = chunk.length;\n const chunkOffset = chunkOffsets[i];\n // If the child is to the right of the slice boundary, we can stop\n if (chunkOffset >= end) { break; }\n // If the child is to the left of of the slice boundary, exclude\n if (begin >= chunkOffset + chunkLength) { continue; }\n // If the child is between both left and right boundaries, include w/o slicing\n if (chunkOffset >= begin && (chunkOffset + chunkLength) <= end) {\n slices.push(chunk);\n continue;\n }\n // If the child overlaps one of the slice boundaries, include that slice\n const from = Math.max(0, begin - chunkOffset);\n const to = Math.min(end - chunkOffset, chunkLength);\n slices.push(chunk.slice(from, to) as Vector);\n }\n return self.clone(slices);\n }\n}\n\n/** @ignore */\nfunction calculateOffsets(vectors: Vector[]) {\n let offsets = new Uint32Array((vectors || []).length + 1);\n let offset = offsets[0] = 0, length = offsets.length;\n for (let index = 0; ++index < length;) {\n offsets[index] = (offset += vectors[index - 1].length);\n }\n return offsets;\n}\n\n/** @ignore */\nconst typedSet = (src: TypedArray, dst: TypedArray, offset: number) => {\n dst.set(src, offset);\n return (offset + src.length);\n};\n\n/** @ignore */\nconst arraySet = (src: any[], dst: any[], offset: number) => {\n let idx = offset;\n for (let i = -1, n = src.length; ++i < n;) {\n dst[idx++] = src[i];\n }\n return idx;\n};\n\n/** @ignore */\ninterface TypedArray extends ArrayBufferView {\n readonly length: number;\n readonly [n: number]: number;\n set(array: ArrayLike, offset?: number): void;\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/chunked.mjs b/frontend/node_modules/apache-arrow/vector/chunked.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f0da2baddb7fd6b876b30c29f4bbf8140281f769 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/chunked.mjs @@ -0,0 +1,241 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { clampRange } from '../util/vector'; +import { DataType } from '../type'; +import { selectChunkArgs } from '../util/args'; +import { AbstractVector, Vector } from '../vector'; +/** @ignore */ +export class Chunked extends AbstractVector { + constructor(type, chunks = [], offsets = calculateOffsets(chunks)) { + super(); + this._nullCount = -1; + this._type = type; + this._chunks = chunks; + this._chunkOffsets = offsets; + this._length = offsets[offsets.length - 1]; + this._numChildren = (this._type.children || []).length; + } + /** @nocollapse */ + static flatten(...vectors) { + return selectChunkArgs(Vector, vectors); + } + /** @nocollapse */ + static concat(...vectors) { + const chunks = Chunked.flatten(...vectors); + return new Chunked(chunks[0].type, chunks); + } + get type() { return this._type; } + get length() { return this._length; } + get chunks() { return this._chunks; } + get typeId() { return this._type.typeId; } + get VectorName() { return `Chunked<${this._type}>`; } + get data() { + return this._chunks[0] ? this._chunks[0].data : null; + } + get ArrayType() { return this._type.ArrayType; } + get numChildren() { return this._numChildren; } + get stride() { return this._chunks[0] ? this._chunks[0].stride : 1; } + get byteLength() { + return this._chunks.reduce((byteLength, chunk) => byteLength + chunk.byteLength, 0); + } + get nullCount() { + let nullCount = this._nullCount; + if (nullCount < 0) { + this._nullCount = nullCount = this._chunks.reduce((x, { nullCount }) => x + nullCount, 0); + } + return nullCount; + } + get indices() { + if (DataType.isDictionary(this._type)) { + if (!this._indices) { + const chunks = this._chunks; + this._indices = (chunks.length === 1 + ? chunks[0].indices + : Chunked.concat(...chunks.map((x) => x.indices))); + } + return this._indices; + } + return null; + } + get dictionary() { + if (DataType.isDictionary(this._type)) { + return this._chunks[this._chunks.length - 1].data.dictionary; + } + return null; + } + *[Symbol.iterator]() { + for (const chunk of this._chunks) { + yield* chunk; + } + } + clone(chunks = this._chunks) { + return new Chunked(this._type, chunks); + } + concat(...others) { + return this.clone(Chunked.flatten(this, ...others)); + } + slice(begin, end) { + return clampRange(this, begin, end, this._sliceInternal); + } + getChildAt(index) { + if (index < 0 || index >= this._numChildren) { + return null; + } + let columns = this._children || (this._children = []); + let child, field, chunks; + if (child = columns[index]) { + return child; + } + if (field = (this._type.children || [])[index]) { + chunks = this._chunks + .map((vector) => vector.getChildAt(index)) + .filter((vec) => vec != null); + if (chunks.length > 0) { + return (columns[index] = new Chunked(field.type, chunks)); + } + } + return null; + } + search(index, then) { + let idx = index; + // binary search to find the child vector and value indices + let offsets = this._chunkOffsets, rhs = offsets.length - 1; + // return early if out of bounds, or if there's just one child + if (idx < 0) { + return null; + } + if (idx >= offsets[rhs]) { + return null; + } + if (rhs <= 1) { + return then ? then(this, 0, idx) : [0, idx]; + } + let lhs = 0, pos = 0, mid = 0; + do { + if (lhs + 1 === rhs) { + return then ? then(this, lhs, idx - pos) : [lhs, idx - pos]; + } + mid = lhs + ((rhs - lhs) / 2) | 0; + idx >= offsets[mid] ? (lhs = mid) : (rhs = mid); + } while (idx < offsets[rhs] && idx >= (pos = offsets[lhs])); + return null; + } + isValid(index) { + return !!this.search(index, this.isValidInternal); + } + get(index) { + return this.search(index, this.getInternal); + } + set(index, value) { + this.search(index, ({ chunks }, i, j) => chunks[i].set(j, value)); + } + indexOf(element, offset) { + if (offset && typeof offset === 'number') { + return this.search(offset, (self, i, j) => this.indexOfInternal(self, i, j, element)); + } + return this.indexOfInternal(this, 0, Math.max(0, offset || 0), element); + } + toArray() { + const { chunks } = this; + const n = chunks.length; + let ArrayType = this._type.ArrayType; + if (n <= 0) { + return new ArrayType(0); + } + if (n <= 1) { + return chunks[0].toArray(); + } + let len = 0, src = new Array(n); + for (let i = -1; ++i < n;) { + len += (src[i] = chunks[i].toArray()).length; + } + if (ArrayType !== src[0].constructor) { + ArrayType = src[0].constructor; + } + let dst = new ArrayType(len); + let set = ArrayType === Array ? arraySet : typedSet; + for (let i = -1, idx = 0; ++i < n;) { + idx = set(src[i], dst, idx); + } + return dst; + } + getInternal({ _chunks }, i, j) { return _chunks[i].get(j); } + isValidInternal({ _chunks }, i, j) { return _chunks[i].isValid(j); } + indexOfInternal({ _chunks }, chunkIndex, fromIndex, element) { + let i = chunkIndex - 1, n = _chunks.length; + let start = fromIndex, offset = 0, found = -1; + while (++i < n) { + if (~(found = _chunks[i].indexOf(element, start))) { + return offset + found; + } + start = 0; + offset += _chunks[i].length; + } + return -1; + } + _sliceInternal(self, begin, end) { + const slices = []; + const { chunks, _chunkOffsets: chunkOffsets } = self; + for (let i = -1, n = chunks.length; ++i < n;) { + const chunk = chunks[i]; + const chunkLength = chunk.length; + const chunkOffset = chunkOffsets[i]; + // If the child is to the right of the slice boundary, we can stop + if (chunkOffset >= end) { + break; + } + // If the child is to the left of of the slice boundary, exclude + if (begin >= chunkOffset + chunkLength) { + continue; + } + // If the child is between both left and right boundaries, include w/o slicing + if (chunkOffset >= begin && (chunkOffset + chunkLength) <= end) { + slices.push(chunk); + continue; + } + // If the child overlaps one of the slice boundaries, include that slice + const from = Math.max(0, begin - chunkOffset); + const to = Math.min(end - chunkOffset, chunkLength); + slices.push(chunk.slice(from, to)); + } + return self.clone(slices); + } +} +/** @ignore */ +function calculateOffsets(vectors) { + let offsets = new Uint32Array((vectors || []).length + 1); + let offset = offsets[0] = 0, length = offsets.length; + for (let index = 0; ++index < length;) { + offsets[index] = (offset += vectors[index - 1].length); + } + return offsets; +} +/** @ignore */ +const typedSet = (src, dst, offset) => { + dst.set(src, offset); + return (offset + src.length); +}; +/** @ignore */ +const arraySet = (src, dst, offset) => { + let idx = offset; + for (let i = -1, n = src.length; ++i < n;) { + dst[idx++] = src[i]; + } + return idx; +}; + +//# sourceMappingURL=chunked.mjs.map diff --git a/frontend/node_modules/apache-arrow/vector/chunked.mjs.map b/frontend/node_modules/apache-arrow/vector/chunked.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..6d771c5c763ea1641c2d10ef0568c88b035452e2 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/chunked.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/chunked.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAIrB,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAc,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAWnD,cAAc;AACd,MAAM,OAAO,OACT,SAAQ,cAAiB;IAwBzB,YAAY,IAAO,EAAE,SAAsB,EAAE,EAAE,OAAO,GAAG,gBAAgB,CAAC,MAAM,CAAC;QAC7E,KAAK,EAAE,CAAC;QAJF,eAAU,GAAW,CAAC,CAAC,CAAC;QAK9B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO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,CAAC,MAAM,CAAC,CAAC;KAC1D;IACD,OAAO,OAAO,CAAC;AACnB,CAAC;AAED,cAAc;AACd,MAAM,QAAQ,GAAG,CAAC,GAAe,EAAE,GAAe,EAAE,MAAc,EAAE,EAAE;IAClE,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACrB,OAAO,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC,CAAC;AAEF,cAAc;AACd,MAAM,QAAQ,GAAG,CAAC,GAAU,EAAE,GAAU,EAAE,MAAc,EAAE,EAAE;IACxD,IAAI,GAAG,GAAG,MAAM,CAAC;IACjB,KAAK,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG;QACvC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;KACvB;IACD,OAAO,GAAG,CAAC;AACf,CAAC,CAAC","file":"chunked.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Field } from '../schema';\nimport { clampRange } from '../util/vector';\nimport { DataType, Dictionary } from '../type';\nimport { selectChunkArgs } from '../util/args';\nimport { DictionaryVector } from './dictionary';\nimport { AbstractVector, Vector } from '../vector';\nimport { Clonable, Sliceable, Applicative } from '../vector';\n\n/** @ignore */\ntype ChunkedDict = T extends Dictionary ? Vector : null | never;\n/** @ignore */\ntype ChunkedKeys = T extends Dictionary ? Vector | Chunked : null | never;\n\n/** @ignore */\nexport type SearchContinuation = (column: T, chunkIndex: number, valueIndex: number) => any;\n\n/** @ignore */\nexport class Chunked\n extends AbstractVector\n implements Clonable>,\n Sliceable>,\n Applicative> {\n\n /** @nocollapse */\n public static flatten(...vectors: (Vector | Vector[])[]) {\n return selectChunkArgs>(Vector, vectors);\n }\n\n /** @nocollapse */\n public static concat(...vectors: (Vector | Vector[])[]) {\n const chunks = Chunked.flatten(...vectors);\n return new Chunked(chunks[0].type, chunks);\n }\n\n protected _type: T;\n protected _length: number;\n protected _chunks: Vector[];\n protected _numChildren: number;\n protected _children?: Chunked[];\n protected _nullCount: number = -1;\n protected _chunkOffsets: Uint32Array;\n\n constructor(type: T, chunks: Vector[] = [], offsets = calculateOffsets(chunks)) {\n super();\n this._type = type;\n this._chunks = chunks;\n this._chunkOffsets = offsets;\n this._length = offsets[offsets.length - 1];\n this._numChildren = (this._type.children || []).length;\n }\n\n public get type() { return this._type; }\n public get length() { return this._length; }\n public get chunks() { return this._chunks; }\n public get typeId(): T['TType'] { return this._type.typeId; }\n public get VectorName() { return `Chunked<${this._type}>`; }\n public get data(): Data {\n return this._chunks[0] ? this._chunks[0].data : null;\n }\n\n public get ArrayType() { return this._type.ArrayType; }\n public get numChildren() { return this._numChildren; }\n public get stride() { return this._chunks[0] ? this._chunks[0].stride : 1; }\n public get byteLength(): number {\n return this._chunks.reduce((byteLength, chunk) => byteLength + chunk.byteLength, 0);\n }\n public get nullCount() {\n let nullCount = this._nullCount;\n if (nullCount < 0) {\n this._nullCount = nullCount = this._chunks.reduce((x, { nullCount }) => x + nullCount, 0);\n }\n return nullCount;\n }\n\n protected _indices?: ChunkedKeys;\n public get indices(): ChunkedKeys | null {\n if (DataType.isDictionary(this._type)) {\n if (!this._indices) {\n const chunks = ( this._chunks) as DictionaryVector[];\n this._indices = (chunks.length === 1\n ? chunks[0].indices\n : Chunked.concat(...chunks.map((x) => x.indices))) as ChunkedKeys;\n }\n return this._indices;\n }\n return null;\n }\n public get dictionary(): ChunkedDict | null {\n if (DataType.isDictionary(this._type)) {\n return this._chunks[this._chunks.length - 1].data.dictionary as ChunkedDict;\n }\n return null;\n }\n\n public *[Symbol.iterator](): IterableIterator {\n for (const chunk of this._chunks) {\n yield* chunk;\n }\n }\n\n public clone(chunks = this._chunks): Chunked {\n return new Chunked(this._type, chunks);\n }\n\n public concat(...others: Vector[]): Chunked {\n return this.clone(Chunked.flatten(this, ...others));\n }\n\n public slice(begin?: number, end?: number): Chunked {\n return clampRange(this, begin, end, this._sliceInternal);\n }\n\n public getChildAt(index: number): Chunked | null {\n\n if (index < 0 || index >= this._numChildren) { return null; }\n\n let columns = this._children || (this._children = []);\n let child: Chunked, field: Field, chunks: Vector[];\n\n if (child = columns[index]) { return child; }\n if (field = ((this._type.children || [])[index] as Field)) {\n chunks = this._chunks\n .map((vector) => vector.getChildAt(index))\n .filter((vec): vec is Vector => vec != null);\n if (chunks.length > 0) {\n return (columns[index] = new Chunked(field.type, chunks));\n }\n }\n\n return null;\n }\n\n public search(index: number): [number, number] | null;\n public search>>(index: number, then?: N): ReturnType;\n public search>>(index: number, then?: N) {\n let idx = index;\n // binary search to find the child vector and value indices\n let offsets = this._chunkOffsets, rhs = offsets.length - 1;\n // return early if out of bounds, or if there's just one child\n if (idx < 0 ) { return null; }\n if (idx >= offsets[rhs]) { return null; }\n if (rhs <= 1 ) { return then ? then(this, 0, idx) : [0, idx]; }\n let lhs = 0, pos = 0, mid = 0;\n do {\n if (lhs + 1 === rhs) {\n return then ? then(this, lhs, idx - pos) : [lhs, idx - pos];\n }\n mid = lhs + ((rhs - lhs) / 2) | 0;\n idx >= offsets[mid] ? (lhs = mid) : (rhs = mid);\n } while (idx < offsets[rhs] && idx >= (pos = offsets[lhs]));\n return null;\n }\n\n public isValid(index: number): boolean {\n return !!this.search(index, this.isValidInternal);\n }\n\n public get(index: number): T['TValue'] | null {\n return this.search(index, this.getInternal);\n }\n\n public set(index: number, value: T['TValue'] | null): void {\n this.search(index, ({ chunks }, i, j) => chunks[i].set(j, value));\n }\n\n public indexOf(element: T['TValue'], offset?: number): number {\n if (offset && typeof offset === 'number') {\n return this.search(offset, (self, i, j) => this.indexOfInternal(self, i, j, element))!;\n }\n return this.indexOfInternal(this, 0, Math.max(0, offset || 0), element);\n }\n\n public toArray(): T['TArray'] {\n const { chunks } = this;\n const n = chunks.length;\n let ArrayType: any = this._type.ArrayType;\n if (n <= 0) { return new ArrayType(0); }\n if (n <= 1) { return chunks[0].toArray(); }\n let len = 0, src = new Array(n);\n for (let i = -1; ++i < n;) {\n len += (src[i] = chunks[i].toArray()).length;\n }\n if (ArrayType !== src[0].constructor) {\n ArrayType = src[0].constructor;\n }\n let dst = new ArrayType(len);\n let set: any = ArrayType === Array ? arraySet : typedSet;\n for (let i = -1, idx = 0; ++i < n;) {\n idx = set(src[i], dst, idx);\n }\n return dst;\n }\n\n protected getInternal({ _chunks }: Chunked, i: number, j: number) { return _chunks[i].get(j); }\n protected isValidInternal({ _chunks }: Chunked, i: number, j: number) { return _chunks[i].isValid(j); }\n protected indexOfInternal({ _chunks }: Chunked, chunkIndex: number, fromIndex: number, element: T['TValue']) {\n let i = chunkIndex - 1, n = _chunks.length;\n let start = fromIndex, offset = 0, found = -1;\n while (++i < n) {\n if (~(found = _chunks[i].indexOf(element, start))) {\n return offset + found;\n }\n start = 0;\n offset += _chunks[i].length;\n }\n return -1;\n }\n\n protected _sliceInternal(self: Chunked, begin: number, end: number) {\n const slices: Vector[] = [];\n const { chunks, _chunkOffsets: chunkOffsets } = self;\n for (let i = -1, n = chunks.length; ++i < n;) {\n const chunk = chunks[i];\n const chunkLength = chunk.length;\n const chunkOffset = chunkOffsets[i];\n // If the child is to the right of the slice boundary, we can stop\n if (chunkOffset >= end) { break; }\n // If the child is to the left of of the slice boundary, exclude\n if (begin >= chunkOffset + chunkLength) { continue; }\n // If the child is between both left and right boundaries, include w/o slicing\n if (chunkOffset >= begin && (chunkOffset + chunkLength) <= end) {\n slices.push(chunk);\n continue;\n }\n // If the child overlaps one of the slice boundaries, include that slice\n const from = Math.max(0, begin - chunkOffset);\n const to = Math.min(end - chunkOffset, chunkLength);\n slices.push(chunk.slice(from, to) as Vector);\n }\n return self.clone(slices);\n }\n}\n\n/** @ignore */\nfunction calculateOffsets(vectors: Vector[]) {\n let offsets = new Uint32Array((vectors || []).length + 1);\n let offset = offsets[0] = 0, length = offsets.length;\n for (let index = 0; ++index < length;) {\n offsets[index] = (offset += vectors[index - 1].length);\n }\n return offsets;\n}\n\n/** @ignore */\nconst typedSet = (src: TypedArray, dst: TypedArray, offset: number) => {\n dst.set(src, offset);\n return (offset + src.length);\n};\n\n/** @ignore */\nconst arraySet = (src: any[], dst: any[], offset: number) => {\n let idx = offset;\n for (let i = -1, n = src.length; ++i < n;) {\n dst[idx++] = src[i];\n }\n return idx;\n};\n\n/** @ignore */\ninterface TypedArray extends ArrayBufferView {\n readonly length: number;\n readonly [n: number]: number;\n set(array: ArrayLike, offset?: number): void;\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/date.d.ts b/frontend/node_modules/apache-arrow/vector/date.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ff4fae5490ca7e1d37a2cfac48263a07efbe575c --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/date.d.ts @@ -0,0 +1,25 @@ +import { DateUnit } from '../enum'; +import { Chunked } from './chunked'; +import { BaseVector } from './base'; +import { VectorType as V } from '../interfaces'; +import { VectorBuilderOptions } from './index'; +import { VectorBuilderOptionsAsync } from './index'; +import { Date_, DateDay, DateMillisecond } from '../type'; +/** @ignore */ +declare type FromArgs = [Iterable, T['unit']]; +/** @ignore */ +export declare class DateVector extends BaseVector { + static from(...args: FromArgs): V; + static from(...args: FromArgs): V; + static from(input: Iterable): V; + static from(input: AsyncIterable): Promise>; + static from(input: VectorBuilderOptions): Chunked; + static from(input: VectorBuilderOptionsAsync): Promise>; +} +/** @ignore */ +export declare class DateDayVector extends DateVector { +} +/** @ignore */ +export declare class DateMillisecondVector extends DateVector { +} +export {}; diff --git a/frontend/node_modules/apache-arrow/vector/date.js b/frontend/node_modules/apache-arrow/vector/date.js new file mode 100644 index 0000000000000000000000000000000000000000..68542ae56ddef86a8b004fc32e1cae733dde48d4 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/date.js @@ -0,0 +1,43 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const enum_1 = require("../enum"); +const base_1 = require("./base"); +const index_1 = require("./index"); +const type_1 = require("../type"); +/** @ignore */ +class DateVector extends base_1.BaseVector { + /** @nocollapse */ + static from(...args) { + if (args.length === 2) { + return index_1.vectorFromValuesWithType(() => args[1] === enum_1.DateUnit.DAY ? new type_1.DateDay() : new type_1.DateMillisecond(), args[0]); + } + return index_1.vectorFromValuesWithType(() => new type_1.DateMillisecond(), args[0]); + } +} +exports.DateVector = DateVector; +/** @ignore */ +class DateDayVector extends DateVector { +} +exports.DateDayVector = DateDayVector; +/** @ignore */ +class DateMillisecondVector extends DateVector { +} +exports.DateMillisecondVector = DateMillisecondVector; + +//# sourceMappingURL=date.js.map diff --git a/frontend/node_modules/apache-arrow/vector/date.js.map b/frontend/node_modules/apache-arrow/vector/date.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f13a7d5419425f166020fe0ffd0ee2ac456db6bb --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/date.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/date.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,kCAAmC;AAEnC,iCAAoC;AAGpC,mCAAmD;AAEnD,kCAA2D;AAK3D,cAAc;AACd,MAAa,UAAoC,SAAQ,iBAAa;IAOlE,kBAAkB;IACX,MAAM,CAAC,IAAI,CAA+B,GAAG,IAAiJ;QACjM,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;YACnB,OAAO,gCAAwB,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,eAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,cAAO,EAAE,CAAC,CAAC,CAAC,IAAI,sBAAe,EAAO,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;SACzH;QACD,OAAO,gCAAwB,CAAC,GAAG,EAAE,CAAC,IAAI,sBAAe,EAAO,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/E,CAAC;CACJ;AAdD,gCAcC;AAED,cAAc;AACd,MAAa,aAAc,SAAQ,UAAmB;CAAG;AAAzD,sCAAyD;AAEzD,cAAc;AACd,MAAa,qBAAsB,SAAQ,UAA2B;CAAG;AAAzE,sDAAyE","file":"date.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { DateUnit } from '../enum';\nimport { Chunked } from './chunked';\nimport { BaseVector } from './base';\nimport { VectorType as V } from '../interfaces';\nimport { VectorBuilderOptions } from './index';\nimport { vectorFromValuesWithType } from './index';\nimport { VectorBuilderOptionsAsync } from './index';\nimport { Date_, DateDay, DateMillisecond } from '../type';\n\n/** @ignore */\ntype FromArgs = [Iterable, T['unit']];\n\n/** @ignore */\nexport class DateVector extends BaseVector {\n public static from(...args: FromArgs): V;\n public static from(...args: FromArgs): V;\n public static from(input: Iterable): V;\n public static from(input: AsyncIterable): Promise>;\n public static from(input: VectorBuilderOptions): Chunked;\n public static from(input: VectorBuilderOptionsAsync): Promise>;\n /** @nocollapse */\n public static from(...args: FromArgs | [Iterable | AsyncIterable | VectorBuilderOptions | VectorBuilderOptionsAsync]) {\n if (args.length === 2) {\n return vectorFromValuesWithType(() => args[1] === DateUnit.DAY ? new DateDay() : new DateMillisecond() as T, args[0]);\n }\n return vectorFromValuesWithType(() => new DateMillisecond() as T, args[0]);\n }\n}\n\n/** @ignore */\nexport class DateDayVector extends DateVector {}\n\n/** @ignore */\nexport class DateMillisecondVector extends DateVector {}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/date.mjs b/frontend/node_modules/apache-arrow/vector/date.mjs new file mode 100644 index 0000000000000000000000000000000000000000..cdef9e418953804252345205b08bce92f0efd1c4 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/date.mjs @@ -0,0 +1,38 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { DateUnit } from '../enum'; +import { BaseVector } from './base'; +import { vectorFromValuesWithType } from './index'; +import { DateDay, DateMillisecond } from '../type'; +/** @ignore */ +export class DateVector extends BaseVector { + /** @nocollapse */ + static from(...args) { + if (args.length === 2) { + return vectorFromValuesWithType(() => args[1] === DateUnit.DAY ? new DateDay() : new DateMillisecond(), args[0]); + } + return vectorFromValuesWithType(() => new DateMillisecond(), args[0]); + } +} +/** @ignore */ +export class DateDayVector extends DateVector { +} +/** @ignore */ +export class DateMillisecondVector extends DateVector { +} + +//# sourceMappingURL=date.mjs.map diff --git a/frontend/node_modules/apache-arrow/vector/date.mjs.map b/frontend/node_modules/apache-arrow/vector/date.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..1fbd226556ead03b4c80cf2a227e7f80137d67e0 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/date.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/date.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAGpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEnD,OAAO,EAAS,OAAO,EAAE,eAAe,EAAG,MAAM,SAAS,CAAC;AAK3D,cAAc;AACd,MAAM,OAAO,UAAoC,SAAQ,UAAa;IAOlE,kBAAkB;IACX,MAAM,CAAC,IAAI,CAA+B,GAAG,IAAiJ;QACjM,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;YACnB,OAAO,wBAAwB,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,eAAe,EAAO,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;SACzH;QACD,OAAO,wBAAwB,CAAC,GAAG,EAAE,CAAC,IAAI,eAAe,EAAO,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/E,CAAC;CACJ;AAED,cAAc;AACd,MAAM,OAAO,aAAc,SAAQ,UAAmB;CAAG;AAEzD,cAAc;AACd,MAAM,OAAO,qBAAsB,SAAQ,UAA2B;CAAG","file":"date.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { DateUnit } from '../enum';\nimport { Chunked } from './chunked';\nimport { BaseVector } from './base';\nimport { VectorType as V } from '../interfaces';\nimport { VectorBuilderOptions } from './index';\nimport { vectorFromValuesWithType } from './index';\nimport { VectorBuilderOptionsAsync } from './index';\nimport { Date_, DateDay, DateMillisecond } from '../type';\n\n/** @ignore */\ntype FromArgs = [Iterable, T['unit']];\n\n/** @ignore */\nexport class DateVector extends BaseVector {\n public static from(...args: FromArgs): V;\n public static from(...args: FromArgs): V;\n public static from(input: Iterable): V;\n public static from(input: AsyncIterable): Promise>;\n public static from(input: VectorBuilderOptions): Chunked;\n public static from(input: VectorBuilderOptionsAsync): Promise>;\n /** @nocollapse */\n public static from(...args: FromArgs | [Iterable | AsyncIterable | VectorBuilderOptions | VectorBuilderOptionsAsync]) {\n if (args.length === 2) {\n return vectorFromValuesWithType(() => args[1] === DateUnit.DAY ? new DateDay() : new DateMillisecond() as T, args[0]);\n }\n return vectorFromValuesWithType(() => new DateMillisecond() as T, args[0]);\n }\n}\n\n/** @ignore */\nexport class DateDayVector extends DateVector {}\n\n/** @ignore */\nexport class DateMillisecondVector extends DateVector {}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/decimal.d.ts b/frontend/node_modules/apache-arrow/vector/decimal.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..263dca76c0baa196e06a97227cf45ebaad392c27 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/decimal.d.ts @@ -0,0 +1,5 @@ +import { Decimal } from '../type'; +import { BaseVector } from './base'; +/** @ignore */ +export declare class DecimalVector extends BaseVector { +} diff --git a/frontend/node_modules/apache-arrow/vector/decimal.js b/frontend/node_modules/apache-arrow/vector/decimal.js new file mode 100644 index 0000000000000000000000000000000000000000..49c6cb859612eb12e535729b1f907a0924918d0d --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/decimal.js @@ -0,0 +1,25 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const base_1 = require("./base"); +/** @ignore */ +class DecimalVector extends base_1.BaseVector { +} +exports.DecimalVector = DecimalVector; + +//# sourceMappingURL=decimal.js.map diff --git a/frontend/node_modules/apache-arrow/vector/decimal.js.map b/frontend/node_modules/apache-arrow/vector/decimal.js.map new file mode 100644 index 0000000000000000000000000000000000000000..b2a1417e9d41f431c4c860e855d822d57c88d379 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/decimal.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/decimal.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAGrB,iCAAoC;AAEpC,cAAc;AACd,MAAa,aAAc,SAAQ,iBAAmB;CAAG;AAAzD,sCAAyD","file":"decimal.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Decimal } from '../type';\nimport { BaseVector } from './base';\n\n/** @ignore */\nexport class DecimalVector extends BaseVector {}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/decimal.mjs b/frontend/node_modules/apache-arrow/vector/decimal.mjs new file mode 100644 index 0000000000000000000000000000000000000000..8b9d3b61adb0a1693809ae98d27c83b0b7f0c6f4 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/decimal.mjs @@ -0,0 +1,22 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { BaseVector } from './base'; +/** @ignore */ +export class DecimalVector extends BaseVector { +} + +//# sourceMappingURL=decimal.mjs.map diff --git a/frontend/node_modules/apache-arrow/vector/decimal.mjs.map b/frontend/node_modules/apache-arrow/vector/decimal.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..2d7556b0af3a818d3ab9f53331035c36d1635d2f --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/decimal.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/decimal.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAGrB,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,cAAc;AACd,MAAM,OAAO,aAAc,SAAQ,UAAmB;CAAG","file":"decimal.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Decimal } from '../type';\nimport { BaseVector } from './base';\n\n/** @ignore */\nexport class DecimalVector extends BaseVector {}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/dictionary.d.ts b/frontend/node_modules/apache-arrow/vector/dictionary.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..358b3c0828348dea13f46de393e5932b6022157e --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/dictionary.d.ts @@ -0,0 +1,24 @@ +import { Data } from '../data'; +import { Vector } from '../vector'; +import { BaseVector } from './base'; +import { VectorType as V } from '../interfaces'; +import { VectorBuilderOptions } from './index'; +import { VectorBuilderOptionsAsync } from './index'; +import { DataType, Dictionary, TKeys } from '../type'; +/** @ignore */ +declare type FromArgs = [Vector, TKey, ArrayLike | TKey['TArray']]; +/** @ignore */ +export declare class DictionaryVector extends BaseVector> { + static from(...args: FromArgs): V>; + static from(input: VectorBuilderOptions>): Vector>; + static from(input: VectorBuilderOptionsAsync>): Promise>>; + constructor(data: Data>); + readonly indices: V; + readonly dictionary: Vector; + reverseLookup(value: T): number; + getKey(idx: number): TKey['TValue'] | null; + getValue(key: number): T['TValue'] | null; + setKey(idx: number, key: TKey['TValue'] | null): void; + setValue(key: number, value: T['TValue'] | null): void; +} +export {}; diff --git a/frontend/node_modules/apache-arrow/vector/dictionary.js b/frontend/node_modules/apache-arrow/vector/dictionary.js new file mode 100644 index 0000000000000000000000000000000000000000..82bba45c7185f90c51fa9417dc24f037b499d795 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/dictionary.js @@ -0,0 +1,49 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const data_1 = require("../data"); +const vector_1 = require("../vector"); +const base_1 = require("./base"); +const index_1 = require("./index"); +const type_1 = require("../type"); +/** @ignore */ +class DictionaryVector extends base_1.BaseVector { + constructor(data) { + super(data); + this.indices = vector_1.Vector.new(data.clone(this.type.indices)); + } + /** @nocollapse */ + static from(...args) { + if (args.length === 3) { + const [values, indices, keys] = args; + const type = new type_1.Dictionary(values.type, indices, null, null); + return vector_1.Vector.new(data_1.Data.Dictionary(type, 0, keys.length, 0, null, keys, values)); + } + return index_1.vectorFromValuesWithType(() => args[0].type, args[0]); + } + get dictionary() { return this.data.dictionary; } + reverseLookup(value) { return this.dictionary.indexOf(value); } + getKey(idx) { return this.indices.get(idx); } + getValue(key) { return this.dictionary.get(key); } + setKey(idx, key) { return this.indices.set(idx, key); } + setValue(key, value) { return this.dictionary.set(key, value); } +} +exports.DictionaryVector = DictionaryVector; +DictionaryVector.prototype.indices = null; + +//# sourceMappingURL=dictionary.js.map diff --git a/frontend/node_modules/apache-arrow/vector/dictionary.js.map b/frontend/node_modules/apache-arrow/vector/dictionary.js.map new file mode 100644 index 0000000000000000000000000000000000000000..adeb12862628b382be7ec3002b36916c5b7a2271 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/dictionary.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/dictionary.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DA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,IAAI,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAClE,MAAM,CAAC,GAAW,IAA2B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC5E,QAAQ,CAAC,GAAW,IAAwB,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC9E,MAAM,CAAC,GAAW,EAAE,GAA0B,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;IACtF,QAAQ,CAAC,GAAW,EAAE,KAAyB,IAAI,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;CACtG;AA3BD,4CA2BC;AAEA,gBAAgB,CAAC,SAAiB,CAAC,OAAO,GAAG,IAAI,CAAC","file":"dictionary.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Vector } from '../vector';\nimport { BaseVector } from './base';\nimport { VectorType as V } from '../interfaces';\nimport { VectorBuilderOptions } from './index';\nimport { vectorFromValuesWithType } from './index';\nimport { VectorBuilderOptionsAsync } from './index';\nimport { DataType, Dictionary, TKeys } from '../type';\n\n/** @ignore */\ntype FromArgs = [Vector, TKey, ArrayLike | TKey['TArray']];\n\n/** @ignore */\nexport class DictionaryVector extends BaseVector> {\n public static from(...args: FromArgs): V>;\n public static from(input: VectorBuilderOptions>): Vector>;\n public static from(input: VectorBuilderOptionsAsync>): Promise>>;\n /** @nocollapse */\n public static from(...args: any[]) {\n if (args.length === 3) {\n const [values, indices, keys] = args as FromArgs;\n const type = new Dictionary(values.type, indices, null, null);\n return Vector.new(Data.Dictionary(type, 0, keys.length, 0, null, keys, values));\n }\n return vectorFromValuesWithType(() => args[0].type, args[0]);\n }\n\n constructor(data: Data>) {\n super(data);\n this.indices = Vector.new(data.clone(this.type.indices));\n }\n\n public readonly indices: V;\n\n public get dictionary() { return > this.data.dictionary; }\n public reverseLookup(value: T) { return this.dictionary.indexOf(value); }\n public getKey(idx: number): TKey['TValue'] | null { return this.indices.get(idx); }\n public getValue(key: number): T['TValue'] | null { return this.dictionary.get(key); }\n public setKey(idx: number, key: TKey['TValue'] | null) { return this.indices.set(idx, key); }\n public setValue(key: number, value: T['TValue'] | null) { return this.dictionary.set(key, value); }\n}\n\n(DictionaryVector.prototype as any).indices = null;\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/dictionary.mjs b/frontend/node_modules/apache-arrow/vector/dictionary.mjs new file mode 100644 index 0000000000000000000000000000000000000000..8d40bd94f5be6fccbfe5edbab1009baa645a2564 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/dictionary.mjs @@ -0,0 +1,46 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { Data } from '../data'; +import { Vector } from '../vector'; +import { BaseVector } from './base'; +import { vectorFromValuesWithType } from './index'; +import { Dictionary } from '../type'; +/** @ignore */ +export class DictionaryVector extends BaseVector { + constructor(data) { + super(data); + this.indices = Vector.new(data.clone(this.type.indices)); + } + /** @nocollapse */ + static from(...args) { + if (args.length === 3) { + const [values, indices, keys] = args; + const type = new Dictionary(values.type, indices, null, null); + return Vector.new(Data.Dictionary(type, 0, keys.length, 0, null, keys, values)); + } + return vectorFromValuesWithType(() => args[0].type, args[0]); + } + get dictionary() { return this.data.dictionary; } + reverseLookup(value) { return this.dictionary.indexOf(value); } + getKey(idx) { return this.indices.get(idx); } + getValue(key) { return this.dictionary.get(key); } + setKey(idx, key) { return this.indices.set(idx, key); } + setValue(key, value) { return this.dictionary.set(key, value); } +} +DictionaryVector.prototype.indices = null; + +//# sourceMappingURL=dictionary.mjs.map diff --git a/frontend/node_modules/apache-arrow/vector/dictionary.mjs.map b/frontend/node_modules/apache-arrow/vector/dictionary.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..652abc7b7b6d95f72cedab6e7bcac6af724d5357 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/dictionary.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/dictionary.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAGpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEnD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,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC9E,MAAM,CAAC,GAAW,EAAE,GAA0B,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;IACtF,QAAQ,CAAC,GAAW,EAAE,KAAyB,IAAI,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;CACtG;AAEA,gBAAgB,CAAC,SAAiB,CAAC,OAAO,GAAG,IAAI,CAAC","file":"dictionary.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Vector } from '../vector';\nimport { BaseVector } from './base';\nimport { VectorType as V } from '../interfaces';\nimport { VectorBuilderOptions } from './index';\nimport { vectorFromValuesWithType } from './index';\nimport { VectorBuilderOptionsAsync } from './index';\nimport { DataType, Dictionary, TKeys } from '../type';\n\n/** @ignore */\ntype FromArgs = [Vector, TKey, ArrayLike | TKey['TArray']];\n\n/** @ignore */\nexport class DictionaryVector extends BaseVector> {\n public static from(...args: FromArgs): V>;\n public static from(input: VectorBuilderOptions>): Vector>;\n public static from(input: VectorBuilderOptionsAsync>): Promise>>;\n /** @nocollapse */\n public static from(...args: any[]) {\n if (args.length === 3) {\n const [values, indices, keys] = args as FromArgs;\n const type = new Dictionary(values.type, indices, null, null);\n return Vector.new(Data.Dictionary(type, 0, keys.length, 0, null, keys, values));\n }\n return vectorFromValuesWithType(() => args[0].type, args[0]);\n }\n\n constructor(data: Data>) {\n super(data);\n this.indices = Vector.new(data.clone(this.type.indices));\n }\n\n public readonly indices: V;\n\n public get dictionary() { return > this.data.dictionary; }\n public reverseLookup(value: T) { return this.dictionary.indexOf(value); }\n public getKey(idx: number): TKey['TValue'] | null { return this.indices.get(idx); }\n public getValue(key: number): T['TValue'] | null { return this.dictionary.get(key); }\n public setKey(idx: number, key: TKey['TValue'] | null) { return this.indices.set(idx, key); }\n public setValue(key: number, value: T['TValue'] | null) { return this.dictionary.set(key, value); }\n}\n\n(DictionaryVector.prototype as any).indices = null;\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/fixedsizebinary.d.ts b/frontend/node_modules/apache-arrow/vector/fixedsizebinary.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..70409757afc2024e45a5dc18ab3a2312ffcaf681 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/fixedsizebinary.d.ts @@ -0,0 +1,5 @@ +import { BaseVector } from './base'; +import { FixedSizeBinary } from '../type'; +/** @ignore */ +export declare class FixedSizeBinaryVector extends BaseVector { +} diff --git a/frontend/node_modules/apache-arrow/vector/fixedsizebinary.js b/frontend/node_modules/apache-arrow/vector/fixedsizebinary.js new file mode 100644 index 0000000000000000000000000000000000000000..8b9db675cb51f4ded35d9f6b1a56ead7ced77505 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/fixedsizebinary.js @@ -0,0 +1,25 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const base_1 = require("./base"); +/** @ignore */ +class FixedSizeBinaryVector extends base_1.BaseVector { +} +exports.FixedSizeBinaryVector = FixedSizeBinaryVector; + +//# sourceMappingURL=fixedsizebinary.js.map diff --git a/frontend/node_modules/apache-arrow/vector/fixedsizebinary.js.map b/frontend/node_modules/apache-arrow/vector/fixedsizebinary.js.map new file mode 100644 index 0000000000000000000000000000000000000000..3426954e356777406c6480c9887482698649fdbe --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/fixedsizebinary.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/fixedsizebinary.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,iCAAoC;AAGpC,cAAc;AACd,MAAa,qBAAsB,SAAQ,iBAA2B;CAAG;AAAzE,sDAAyE","file":"fixedsizebinary.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { BaseVector } from './base';\nimport { FixedSizeBinary } from '../type';\n\n/** @ignore */\nexport class FixedSizeBinaryVector extends BaseVector {}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/fixedsizebinary.mjs b/frontend/node_modules/apache-arrow/vector/fixedsizebinary.mjs new file mode 100644 index 0000000000000000000000000000000000000000..ac9d80dba81432d0c74e0a5dc9b14e1b2fb27df1 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/fixedsizebinary.mjs @@ -0,0 +1,22 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { BaseVector } from './base'; +/** @ignore */ +export class FixedSizeBinaryVector extends BaseVector { +} + +//# sourceMappingURL=fixedsizebinary.mjs.map diff --git a/frontend/node_modules/apache-arrow/vector/fixedsizebinary.mjs.map b/frontend/node_modules/apache-arrow/vector/fixedsizebinary.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..7dc6100c5799bda2e2922aab9915941378b36176 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/fixedsizebinary.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/fixedsizebinary.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAGpC,cAAc;AACd,MAAM,OAAO,qBAAsB,SAAQ,UAA2B;CAAG","file":"fixedsizebinary.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { BaseVector } from './base';\nimport { FixedSizeBinary } from '../type';\n\n/** @ignore */\nexport class FixedSizeBinaryVector extends BaseVector {}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/fixedsizelist.d.ts b/frontend/node_modules/apache-arrow/vector/fixedsizelist.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e1471ec378d3be937f4ca0c97587c8877ed05aa2 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/fixedsizelist.d.ts @@ -0,0 +1,5 @@ +import { BaseVector } from './base'; +import { DataType, FixedSizeList } from '../type'; +/** @ignore */ +export declare class FixedSizeListVector extends BaseVector> { +} diff --git a/frontend/node_modules/apache-arrow/vector/fixedsizelist.js b/frontend/node_modules/apache-arrow/vector/fixedsizelist.js new file mode 100644 index 0000000000000000000000000000000000000000..8ad96c676d231e85a52bd9279ca81cb2a586046c --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/fixedsizelist.js @@ -0,0 +1,25 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const base_1 = require("./base"); +/** @ignore */ +class FixedSizeListVector extends base_1.BaseVector { +} +exports.FixedSizeListVector = FixedSizeListVector; + +//# sourceMappingURL=fixedsizelist.js.map diff --git a/frontend/node_modules/apache-arrow/vector/fixedsizelist.js.map b/frontend/node_modules/apache-arrow/vector/fixedsizelist.js.map new file mode 100644 index 0000000000000000000000000000000000000000..8429bb8b1edf89182d82ad170db42b59686bb154 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/fixedsizelist.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/fixedsizelist.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,iCAAoC;AAGpC,cAAc;AACd,MAAa,mBAA8C,SAAQ,iBAA4B;CAAG;AAAlG,kDAAkG","file":"fixedsizelist.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { BaseVector } from './base';\nimport { DataType, FixedSizeList } from '../type';\n\n/** @ignore */\nexport class FixedSizeListVector extends BaseVector> {}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/fixedsizelist.mjs b/frontend/node_modules/apache-arrow/vector/fixedsizelist.mjs new file mode 100644 index 0000000000000000000000000000000000000000..8f2baa6bd9aec239f66ac21d7be2e71fd8945912 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/fixedsizelist.mjs @@ -0,0 +1,22 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { BaseVector } from './base'; +/** @ignore */ +export class FixedSizeListVector extends BaseVector { +} + +//# sourceMappingURL=fixedsizelist.mjs.map diff --git a/frontend/node_modules/apache-arrow/vector/fixedsizelist.mjs.map b/frontend/node_modules/apache-arrow/vector/fixedsizelist.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..625f44c6933cec46e019703b38d9613a9670f9d3 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/fixedsizelist.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/fixedsizelist.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAGpC,cAAc;AACd,MAAM,OAAO,mBAA8C,SAAQ,UAA4B;CAAG","file":"fixedsizelist.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { BaseVector } from './base';\nimport { DataType, FixedSizeList } from '../type';\n\n/** @ignore */\nexport class FixedSizeListVector extends BaseVector> {}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/float.d.ts b/frontend/node_modules/apache-arrow/vector/float.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..17f02ebc1740ab210b7f78cdcfce84808d8525ce --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/float.d.ts @@ -0,0 +1,33 @@ +import { Chunked } from './chunked'; +import { BaseVector } from './base'; +import { VectorBuilderOptions } from './index'; +import { VectorBuilderOptionsAsync } from './index'; +import { Float, Float16, Float32, Float64, FloatArray } from '../type'; +import { VectorType as V } from '../interfaces'; +/** @ignore */ +declare type FromInput = FloatArray | Iterable | AsyncIterable | VectorBuilderOptions | VectorBuilderOptionsAsync; +/** @ignore */ +export declare class FloatVector extends BaseVector { + static from(this: typeof FloatVector, input: Uint16Array): Float16Vector; + static from(this: typeof FloatVector, input: Float32Array): Float32Vector; + static from(this: typeof FloatVector, input: Float64Array): Float64Vector; + static from(this: typeof Float16Vector, input: FromInput): Float16Vector; + static from(this: typeof Float32Vector, input: FromInput): Float32Vector; + static from(this: typeof Float64Vector, input: FromInput): Float64Vector; + static from(this: typeof FloatVector, input: Iterable): V; + static from(this: typeof FloatVector, input: AsyncIterable): Promise>; + static from(this: typeof FloatVector, input: VectorBuilderOptions): Chunked; + static from(this: typeof FloatVector, input: VectorBuilderOptionsAsync): Promise>; +} +/** @ignore */ +export declare class Float16Vector extends FloatVector { + toFloat32Array(): Float32Array; + toFloat64Array(): Float64Array; +} +/** @ignore */ +export declare class Float32Vector extends FloatVector { +} +/** @ignore */ +export declare class Float64Vector extends FloatVector { +} +export {}; diff --git a/frontend/node_modules/apache-arrow/vector/float.js b/frontend/node_modules/apache-arrow/vector/float.js new file mode 100644 index 0000000000000000000000000000000000000000..bb2cbdaca70d32d2ad9f39ff3fc918679aa014b1 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/float.js @@ -0,0 +1,103 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const data_1 = require("../data"); +const vector_1 = require("../vector"); +const base_1 = require("./base"); +const index_1 = require("./index"); +const type_1 = require("../type"); +/** @ignore */ +class FloatVector extends base_1.BaseVector { + /** @nocollapse */ + static from(input) { + let ArrowType = vectorTypeToDataType(this); + if ((input instanceof ArrayBuffer) || ArrayBuffer.isView(input)) { + let InputType = arrayTypeToDataType(input.constructor) || ArrowType; + // Special case, infer the Arrow DataType from the input if calling the base + // FloatVector.from with a TypedArray, e.g. `FloatVector.from(new Float32Array())` + if (ArrowType === null) { + ArrowType = InputType; + } + // If the DataType inferred from the Vector constructor matches the + // DataType inferred from the input arguments, return zero-copy view + if (ArrowType && ArrowType === InputType) { + let type = new ArrowType(); + let length = input.byteLength / type.ArrayType.BYTES_PER_ELEMENT; + // If the ArrowType is Float16 but the input type isn't a Uint16Array, + // let the Float16Builder handle casting the input values to Uint16s. + if (!convertTo16Bit(ArrowType, input.constructor)) { + return vector_1.Vector.new(data_1.Data.Float(type, 0, length, 0, null, input)); + } + } + } + if (ArrowType) { + // If the DataType inferred from the Vector constructor is different than + // the DataType inferred from the input TypedArray, or if input isn't a + // TypedArray, use the Builders to construct the result Vector + return index_1.vectorFromValuesWithType(() => new ArrowType(), input); + } + if ((input instanceof DataView) || (input instanceof ArrayBuffer)) { + throw new TypeError(`Cannot infer float type from instance of ${input.constructor.name}`); + } + throw new TypeError('Unrecognized FloatVector input'); + } +} +exports.FloatVector = FloatVector; +/** @ignore */ +class Float16Vector extends FloatVector { + // Since JS doesn't have half floats, `toArray()` returns a zero-copy slice + // of the underlying Uint16Array data. This behavior ensures we don't incur + // extra compute or copies if you're calling `toArray()` in order to create + // a buffer for something like WebGL. Buf if you're using JS and want typed + // arrays of 4-to-8-byte precision, these methods will enumerate the values + // and clamp to the desired byte lengths. + toFloat32Array() { return new Float32Array(this); } + toFloat64Array() { return new Float64Array(this); } +} +exports.Float16Vector = Float16Vector; +/** @ignore */ +class Float32Vector extends FloatVector { +} +exports.Float32Vector = Float32Vector; +/** @ignore */ +class Float64Vector extends FloatVector { +} +exports.Float64Vector = Float64Vector; +const convertTo16Bit = (typeCtor, dataCtor) => { + return (typeCtor === type_1.Float16) && (dataCtor !== Uint16Array); +}; +/** @ignore */ +const arrayTypeToDataType = (ctor) => { + switch (ctor) { + case Uint16Array: return type_1.Float16; + case Float32Array: return type_1.Float32; + case Float64Array: return type_1.Float64; + default: return null; + } +}; +/** @ignore */ +const vectorTypeToDataType = (ctor) => { + switch (ctor) { + case Float16Vector: return type_1.Float16; + case Float32Vector: return type_1.Float32; + case Float64Vector: return type_1.Float64; + default: return null; + } +}; + +//# sourceMappingURL=float.js.map diff --git a/frontend/node_modules/apache-arrow/vector/float.js.map b/frontend/node_modules/apache-arrow/vector/float.js.map new file mode 100644 index 0000000000000000000000000000000000000000..82786f0ec86bcafe928ea8d4c231b9deb8bcfd14 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/float.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/float.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,kCAA+B;AAC/B,sCAAmC;AAEnC,iCAAoC;AAEpC,mCAAmD;AAEnD,kCAAuE;AAqBvE,cAAc;AACd,MAAa,WAAqC,SAAQ,iBAAa;IAkBnE,kBAAkB;IACX,MAAM,CAAC,IAAI,CAA8D,KAA0B;QAEtG,IAAI,SAAS,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC;QAE3C,IAAI,CAAC,KAAK,YAAY,WAAW,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;YAC7D,IAAI,SAAS,GAAG,mBAAmB,CAAC,KAAK,CAAC,WAA6B,CAAC,IAAI,SAAS,CAAC;YACtF,4EAA4E;YAC5E,kFAAkF;YAClF,IAAI,SAAS,KAAK,IAAI,EAAE;gBACpB,SAAS,GAAG,SAAS,CAAC;aACzB;YACD,mEAAmE;YACnE,oEAAoE;YACpE,IAAI,SAAS,IAAI,SAAS,KAAK,SAAS,EAAE;gBACtC,IAAI,IAAI,GAAG,IAAI,SAAS,EAAE,CAAC;gBAC3B,IAAI,MAAM,GAAG,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC,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Q,KAAK,cAAO,CAAC,IAAI,CAAC,QAAQ,KAAK,WAAW,CAAC,CAAC;AAChE,CAAC,CAAC;AAEF,cAAc;AACd,MAAM,mBAAmB,GAAG,CAAC,IAAoB,EAAE,EAAE;IACjD,QAAQ,IAAI,EAAE;QACV,KAAK,WAAW,CAAC,CAAI,OAAO,cAAO,CAAC;QACpC,KAAK,YAAY,CAAC,CAAG,OAAO,cAAO,CAAC;QACpC,KAAK,YAAY,CAAC,CAAG,OAAO,cAAO,CAAC;QACpC,OAAO,CAAC,CAAC,OAAO,IAAI,CAAC;KACxB;AACL,CAAC,CAAC;AAEF,cAAc;AACd,MAAM,oBAAoB,GAAG,CAAC,IAA6B,EAAE,EAAE;IAC3D,QAAQ,IAAI,EAAE;QACV,KAAK,aAAa,CAAC,CAAC,OAAO,cAAO,CAAC;QACnC,KAAK,aAAa,CAAC,CAAC,OAAO,cAAO,CAAC;QACnC,KAAK,aAAa,CAAC,CAAC,OAAO,cAAO,CAAC;QACnC,OAAO,CAAC,CAAC,OAAO,IAAI,CAAC;KACxB;AACL,CAAC,CAAC","file":"float.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Vector } from '../vector';\nimport { Chunked } from './chunked';\nimport { BaseVector } from './base';\nimport { VectorBuilderOptions } from './index';\nimport { vectorFromValuesWithType } from './index';\nimport { VectorBuilderOptionsAsync } from './index';\nimport { Float, Float16, Float32, Float64, FloatArray } from '../type';\nimport { VectorType as V, TypedArrayConstructor } from '../interfaces';\n\n/** @ignore */\ntype FloatVectorConstructors =\n typeof FloatVector |\n typeof Float16Vector |\n typeof Float32Vector |\n typeof Float64Vector ;\n\n/** @ignore */\ntype FromInput =\n FloatArray |\n Iterable |\n AsyncIterable |\n VectorBuilderOptions |\n VectorBuilderOptionsAsync ;\n\n/** @ignore */\ntype FloatArrayCtor = TypedArrayConstructor;\n\n/** @ignore */\nexport class FloatVector extends BaseVector {\n\n // Guaranteed zero-copy variants\n public static from(this: typeof FloatVector, input: Uint16Array): Float16Vector;\n public static from(this: typeof FloatVector, input: Float32Array): Float32Vector;\n public static from(this: typeof FloatVector, input: Float64Array): Float64Vector;\n\n // Zero-copy if input is a TypedArray of the same type as the\n // Vector that from is called on, otherwise uses the Builders\n public static from(this: typeof Float16Vector, input: FromInput): Float16Vector;\n public static from(this: typeof Float32Vector, input: FromInput): Float32Vector;\n public static from(this: typeof Float64Vector, input: FromInput): Float64Vector;\n\n // Not zero-copy\n public static from(this: typeof FloatVector, input: Iterable): V;\n public static from(this: typeof FloatVector, input: AsyncIterable): Promise>;\n public static from(this: typeof FloatVector, input: VectorBuilderOptions): Chunked;\n public static from(this: typeof FloatVector, input: VectorBuilderOptionsAsync): Promise>;\n /** @nocollapse */\n public static from(this: FloatVectorConstructors, input: FromInput) {\n\n let ArrowType = vectorTypeToDataType(this);\n\n if ((input instanceof ArrayBuffer) || ArrayBuffer.isView(input)) {\n let InputType = arrayTypeToDataType(input.constructor as FloatArrayCtor) || ArrowType;\n // Special case, infer the Arrow DataType from the input if calling the base\n // FloatVector.from with a TypedArray, e.g. `FloatVector.from(new Float32Array())`\n if (ArrowType === null) {\n ArrowType = InputType;\n }\n // If the DataType inferred from the Vector constructor matches the\n // DataType inferred from the input arguments, return zero-copy view\n if (ArrowType && ArrowType === InputType) {\n let type = new ArrowType();\n let length = input.byteLength / type.ArrayType.BYTES_PER_ELEMENT;\n // If the ArrowType is Float16 but the input type isn't a Uint16Array,\n // let the Float16Builder handle casting the input values to Uint16s.\n if (!convertTo16Bit(ArrowType, input.constructor)) {\n return Vector.new(Data.Float(type, 0, length, 0, null, input as FloatArray));\n }\n }\n }\n\n if (ArrowType) {\n // If the DataType inferred from the Vector constructor is different than\n // the DataType inferred from the input TypedArray, or if input isn't a\n // TypedArray, use the Builders to construct the result Vector\n return vectorFromValuesWithType(() => new ArrowType!() as T, input);\n }\n\n if ((input instanceof DataView) || (input instanceof ArrayBuffer)) {\n throw new TypeError(`Cannot infer float type from instance of ${input.constructor.name}`);\n }\n\n throw new TypeError('Unrecognized FloatVector input');\n }\n}\n\n/** @ignore */\nexport class Float16Vector extends FloatVector {\n // Since JS doesn't have half floats, `toArray()` returns a zero-copy slice\n // of the underlying Uint16Array data. This behavior ensures we don't incur\n // extra compute or copies if you're calling `toArray()` in order to create\n // a buffer for something like WebGL. Buf if you're using JS and want typed\n // arrays of 4-to-8-byte precision, these methods will enumerate the values\n // and clamp to the desired byte lengths.\n public toFloat32Array() { return new Float32Array(this as Iterable); }\n public toFloat64Array() { return new Float64Array(this as Iterable); }\n}\n\n/** @ignore */\nexport class Float32Vector extends FloatVector {}\n/** @ignore */\nexport class Float64Vector extends FloatVector {}\n\nconst convertTo16Bit = (typeCtor: any, dataCtor: any) => {\n return (typeCtor === Float16) && (dataCtor !== Uint16Array);\n};\n\n/** @ignore */\nconst arrayTypeToDataType = (ctor: FloatArrayCtor) => {\n switch (ctor) {\n case Uint16Array: return Float16;\n case Float32Array: return Float32;\n case Float64Array: return Float64;\n default: return null;\n }\n};\n\n/** @ignore */\nconst vectorTypeToDataType = (ctor: FloatVectorConstructors) => {\n switch (ctor) {\n case Float16Vector: return Float16;\n case Float32Vector: return Float32;\n case Float64Vector: return Float64;\n default: return null;\n }\n};\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/float.mjs b/frontend/node_modules/apache-arrow/vector/float.mjs new file mode 100644 index 0000000000000000000000000000000000000000..5b3b1e84ea8d399a0c8629441e0900e763b67939 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/float.mjs @@ -0,0 +1,97 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { Data } from '../data'; +import { Vector } from '../vector'; +import { BaseVector } from './base'; +import { vectorFromValuesWithType } from './index'; +import { Float16, Float32, Float64 } from '../type'; +/** @ignore */ +export class FloatVector extends BaseVector { + /** @nocollapse */ + static from(input) { + let ArrowType = vectorTypeToDataType(this); + if ((input instanceof ArrayBuffer) || ArrayBuffer.isView(input)) { + let InputType = arrayTypeToDataType(input.constructor) || ArrowType; + // Special case, infer the Arrow DataType from the input if calling the base + // FloatVector.from with a TypedArray, e.g. `FloatVector.from(new Float32Array())` + if (ArrowType === null) { + ArrowType = InputType; + } + // If the DataType inferred from the Vector constructor matches the + // DataType inferred from the input arguments, return zero-copy view + if (ArrowType && ArrowType === InputType) { + let type = new ArrowType(); + let length = input.byteLength / type.ArrayType.BYTES_PER_ELEMENT; + // If the ArrowType is Float16 but the input type isn't a Uint16Array, + // let the Float16Builder handle casting the input values to Uint16s. + if (!convertTo16Bit(ArrowType, input.constructor)) { + return Vector.new(Data.Float(type, 0, length, 0, null, input)); + } + } + } + if (ArrowType) { + // If the DataType inferred from the Vector constructor is different than + // the DataType inferred from the input TypedArray, or if input isn't a + // TypedArray, use the Builders to construct the result Vector + return vectorFromValuesWithType(() => new ArrowType(), input); + } + if ((input instanceof DataView) || (input instanceof ArrayBuffer)) { + throw new TypeError(`Cannot infer float type from instance of ${input.constructor.name}`); + } + throw new TypeError('Unrecognized FloatVector input'); + } +} +/** @ignore */ +export class Float16Vector extends FloatVector { + // Since JS doesn't have half floats, `toArray()` returns a zero-copy slice + // of the underlying Uint16Array data. This behavior ensures we don't incur + // extra compute or copies if you're calling `toArray()` in order to create + // a buffer for something like WebGL. Buf if you're using JS and want typed + // arrays of 4-to-8-byte precision, these methods will enumerate the values + // and clamp to the desired byte lengths. + toFloat32Array() { return new Float32Array(this); } + toFloat64Array() { return new Float64Array(this); } +} +/** @ignore */ +export class Float32Vector extends FloatVector { +} +/** @ignore */ +export class Float64Vector extends FloatVector { +} +const convertTo16Bit = (typeCtor, dataCtor) => { + return (typeCtor === Float16) && (dataCtor !== Uint16Array); +}; +/** @ignore */ +const arrayTypeToDataType = (ctor) => { + switch (ctor) { + case Uint16Array: return Float16; + case Float32Array: return Float32; + case Float64Array: return Float64; + default: return null; + } +}; +/** @ignore */ +const vectorTypeToDataType = (ctor) => { + switch (ctor) { + case Float16Vector: return Float16; + case Float32Vector: return Float32; + case Float64Vector: return Float64; + default: return null; + } +}; + +//# sourceMappingURL=float.mjs.map diff --git a/frontend/node_modules/apache-arrow/vector/float.mjs.map b/frontend/node_modules/apache-arrow/vector/float.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..59220ea77fdef151aed9f18ecdb2d16c7b0c3596 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/float.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/float.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,MAAM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IAC3D,QAAQ,IAAI,EAAE;QACV,KAAK,aAAa,CAAC,CAAC,OAAO,OAAO,CAAC;QACnC,KAAK,aAAa,CAAC,CAAC,OAAO,OAAO,CAAC;QACnC,KAAK,aAAa,CAAC,CAAC,OAAO,OAAO,CAAC;QACnC,OAAO,CAAC,CAAC,OAAO,IAAI,CAAC;KACxB;AACL,CAAC,CAAC","file":"float.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Vector } from '../vector';\nimport { Chunked } from './chunked';\nimport { BaseVector } from './base';\nimport { VectorBuilderOptions } from './index';\nimport { vectorFromValuesWithType } from './index';\nimport { VectorBuilderOptionsAsync } from './index';\nimport { Float, Float16, Float32, Float64, FloatArray } from '../type';\nimport { VectorType as V, TypedArrayConstructor } from '../interfaces';\n\n/** @ignore */\ntype FloatVectorConstructors =\n typeof FloatVector |\n typeof Float16Vector |\n typeof Float32Vector |\n typeof Float64Vector ;\n\n/** @ignore */\ntype FromInput =\n FloatArray |\n Iterable |\n AsyncIterable |\n VectorBuilderOptions |\n VectorBuilderOptionsAsync ;\n\n/** @ignore */\ntype FloatArrayCtor = TypedArrayConstructor;\n\n/** @ignore */\nexport class FloatVector extends BaseVector {\n\n // Guaranteed zero-copy variants\n public static from(this: typeof FloatVector, input: Uint16Array): Float16Vector;\n public static from(this: typeof FloatVector, input: Float32Array): Float32Vector;\n public static from(this: typeof FloatVector, input: Float64Array): Float64Vector;\n\n // Zero-copy if input is a TypedArray of the same type as the\n // Vector that from is called on, otherwise uses the Builders\n public static from(this: typeof Float16Vector, input: FromInput): Float16Vector;\n public static from(this: typeof Float32Vector, input: FromInput): Float32Vector;\n public static from(this: typeof Float64Vector, input: FromInput): Float64Vector;\n\n // Not zero-copy\n public static from(this: typeof FloatVector, input: Iterable): V;\n public static from(this: typeof FloatVector, input: AsyncIterable): Promise>;\n public static from(this: typeof FloatVector, input: VectorBuilderOptions): Chunked;\n public static from(this: typeof FloatVector, input: VectorBuilderOptionsAsync): Promise>;\n /** @nocollapse */\n public static from(this: FloatVectorConstructors, input: FromInput) {\n\n let ArrowType = vectorTypeToDataType(this);\n\n if ((input instanceof ArrayBuffer) || ArrayBuffer.isView(input)) {\n let InputType = arrayTypeToDataType(input.constructor as FloatArrayCtor) || ArrowType;\n // Special case, infer the Arrow DataType from the input if calling the base\n // FloatVector.from with a TypedArray, e.g. `FloatVector.from(new Float32Array())`\n if (ArrowType === null) {\n ArrowType = InputType;\n }\n // If the DataType inferred from the Vector constructor matches the\n // DataType inferred from the input arguments, return zero-copy view\n if (ArrowType && ArrowType === InputType) {\n let type = new ArrowType();\n let length = input.byteLength / type.ArrayType.BYTES_PER_ELEMENT;\n // If the ArrowType is Float16 but the input type isn't a Uint16Array,\n // let the Float16Builder handle casting the input values to Uint16s.\n if (!convertTo16Bit(ArrowType, input.constructor)) {\n return Vector.new(Data.Float(type, 0, length, 0, null, input as FloatArray));\n }\n }\n }\n\n if (ArrowType) {\n // If the DataType inferred from the Vector constructor is different than\n // the DataType inferred from the input TypedArray, or if input isn't a\n // TypedArray, use the Builders to construct the result Vector\n return vectorFromValuesWithType(() => new ArrowType!() as T, input);\n }\n\n if ((input instanceof DataView) || (input instanceof ArrayBuffer)) {\n throw new TypeError(`Cannot infer float type from instance of ${input.constructor.name}`);\n }\n\n throw new TypeError('Unrecognized FloatVector input');\n }\n}\n\n/** @ignore */\nexport class Float16Vector extends FloatVector {\n // Since JS doesn't have half floats, `toArray()` returns a zero-copy slice\n // of the underlying Uint16Array data. This behavior ensures we don't incur\n // extra compute or copies if you're calling `toArray()` in order to create\n // a buffer for something like WebGL. Buf if you're using JS and want typed\n // arrays of 4-to-8-byte precision, these methods will enumerate the values\n // and clamp to the desired byte lengths.\n public toFloat32Array() { return new Float32Array(this as Iterable); }\n public toFloat64Array() { return new Float64Array(this as Iterable); }\n}\n\n/** @ignore */\nexport class Float32Vector extends FloatVector {}\n/** @ignore */\nexport class Float64Vector extends FloatVector {}\n\nconst convertTo16Bit = (typeCtor: any, dataCtor: any) => {\n return (typeCtor === Float16) && (dataCtor !== Uint16Array);\n};\n\n/** @ignore */\nconst arrayTypeToDataType = (ctor: FloatArrayCtor) => {\n switch (ctor) {\n case Uint16Array: return Float16;\n case Float32Array: return Float32;\n case Float64Array: return Float64;\n default: return null;\n }\n};\n\n/** @ignore */\nconst vectorTypeToDataType = (ctor: FloatVectorConstructors) => {\n switch (ctor) {\n case Float16Vector: return Float16;\n case Float32Vector: return Float32;\n case Float64Vector: return Float64;\n default: return null;\n }\n};\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/index.d.ts b/frontend/node_modules/apache-arrow/vector/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b9d131998344b981c9cf97b4fa0cabf9740bf18d --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/index.d.ts @@ -0,0 +1,61 @@ +export { Vector } from '../vector'; +export { BaseVector } from './base'; +export { BinaryVector } from './binary'; +export { BoolVector } from './bool'; +export { Chunked } from './chunked'; +export { DateVector, DateDayVector, DateMillisecondVector } from './date'; +export { DecimalVector } from './decimal'; +export { DictionaryVector } from './dictionary'; +export { FixedSizeBinaryVector } from './fixedsizebinary'; +export { FixedSizeListVector } from './fixedsizelist'; +export { FloatVector, Float16Vector, Float32Vector, Float64Vector } from './float'; +export { IntervalVector, IntervalDayTimeVector, IntervalYearMonthVector } from './interval'; +export { IntVector, Int8Vector, Int16Vector, Int32Vector, Int64Vector, Uint8Vector, Uint16Vector, Uint32Vector, Uint64Vector } from './int'; +export { ListVector } from './list'; +export { MapVector } from './map'; +export { NullVector } from './null'; +export { StructVector } from './struct'; +export { TimestampVector, TimestampSecondVector, TimestampMillisecondVector, TimestampMicrosecondVector, TimestampNanosecondVector } from './timestamp'; +export { TimeVector, TimeSecondVector, TimeMillisecondVector, TimeMicrosecondVector, TimeNanosecondVector } from './time'; +export { UnionVector, DenseUnionVector, SparseUnionVector } from './union'; +export { Utf8Vector } from './utf8'; +export { MapRow, StructRow } from './row'; +import { Data } from '../data'; +import { Vector } from '../vector'; +import { DataType } from '../type'; +import { IterableBuilderOptions } from '../builder'; +import { VectorType as V, VectorCtorArgs } from '../interfaces'; +declare module '../vector' { + namespace Vector { + export { newVector as new }; + export { vectorFrom as from }; + } +} +declare module './base' { + namespace BaseVector { + export { vectorFrom as from }; + } + interface BaseVector { + get(index: number): T['TValue'] | null; + set(index: number, value: T['TValue'] | null): void; + indexOf(value: T['TValue'] | null, fromIndex?: number): number; + toArray(): T['TArray']; + getByteWidth(): number; + [Symbol.iterator](): IterableIterator; + } +} +/** @ignore */ +declare function newVector(data: Data, ...args: VectorCtorArgs>): V; +/** @ignore */ +export interface VectorBuilderOptions extends IterableBuilderOptions { + values: Iterable; +} +/** @ignore */ +export interface VectorBuilderOptionsAsync extends IterableBuilderOptions { + values: AsyncIterable; +} +/** @ignore */ +export declare function vectorFromValuesWithType(newDataType: () => T, input: Iterable | AsyncIterable | VectorBuilderOptions | VectorBuilderOptionsAsync): V | Vector | Promise> | Promise>; +/** @ignore */ +declare function vectorFrom(input: VectorBuilderOptions): Vector; +declare function vectorFrom(input: VectorBuilderOptionsAsync): Promise>; diff --git a/frontend/node_modules/apache-arrow/vector/index.js b/frontend/node_modules/apache-arrow/vector/index.js new file mode 100644 index 0000000000000000000000000000000000000000..c25034be642c5b4bb6d135f917eb1a944ec59989 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/index.js @@ -0,0 +1,205 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +var vector_1 = require("../vector"); +exports.Vector = vector_1.Vector; +var base_1 = require("./base"); +exports.BaseVector = base_1.BaseVector; +var binary_1 = require("./binary"); +exports.BinaryVector = binary_1.BinaryVector; +var bool_1 = require("./bool"); +exports.BoolVector = bool_1.BoolVector; +var chunked_1 = require("./chunked"); +exports.Chunked = chunked_1.Chunked; +var date_1 = require("./date"); +exports.DateVector = date_1.DateVector; +exports.DateDayVector = date_1.DateDayVector; +exports.DateMillisecondVector = date_1.DateMillisecondVector; +var decimal_1 = require("./decimal"); +exports.DecimalVector = decimal_1.DecimalVector; +var dictionary_1 = require("./dictionary"); +exports.DictionaryVector = dictionary_1.DictionaryVector; +var fixedsizebinary_1 = require("./fixedsizebinary"); +exports.FixedSizeBinaryVector = fixedsizebinary_1.FixedSizeBinaryVector; +var fixedsizelist_1 = require("./fixedsizelist"); +exports.FixedSizeListVector = fixedsizelist_1.FixedSizeListVector; +var float_1 = require("./float"); +exports.FloatVector = float_1.FloatVector; +exports.Float16Vector = float_1.Float16Vector; +exports.Float32Vector = float_1.Float32Vector; +exports.Float64Vector = float_1.Float64Vector; +var interval_1 = require("./interval"); +exports.IntervalVector = interval_1.IntervalVector; +exports.IntervalDayTimeVector = interval_1.IntervalDayTimeVector; +exports.IntervalYearMonthVector = interval_1.IntervalYearMonthVector; +var int_1 = require("./int"); +exports.IntVector = int_1.IntVector; +exports.Int8Vector = int_1.Int8Vector; +exports.Int16Vector = int_1.Int16Vector; +exports.Int32Vector = int_1.Int32Vector; +exports.Int64Vector = int_1.Int64Vector; +exports.Uint8Vector = int_1.Uint8Vector; +exports.Uint16Vector = int_1.Uint16Vector; +exports.Uint32Vector = int_1.Uint32Vector; +exports.Uint64Vector = int_1.Uint64Vector; +var list_1 = require("./list"); +exports.ListVector = list_1.ListVector; +var map_1 = require("./map"); +exports.MapVector = map_1.MapVector; +var null_1 = require("./null"); +exports.NullVector = null_1.NullVector; +var struct_1 = require("./struct"); +exports.StructVector = struct_1.StructVector; +var timestamp_1 = require("./timestamp"); +exports.TimestampVector = timestamp_1.TimestampVector; +exports.TimestampSecondVector = timestamp_1.TimestampSecondVector; +exports.TimestampMillisecondVector = timestamp_1.TimestampMillisecondVector; +exports.TimestampMicrosecondVector = timestamp_1.TimestampMicrosecondVector; +exports.TimestampNanosecondVector = timestamp_1.TimestampNanosecondVector; +var time_1 = require("./time"); +exports.TimeVector = time_1.TimeVector; +exports.TimeSecondVector = time_1.TimeSecondVector; +exports.TimeMillisecondVector = time_1.TimeMillisecondVector; +exports.TimeMicrosecondVector = time_1.TimeMicrosecondVector; +exports.TimeNanosecondVector = time_1.TimeNanosecondVector; +var union_1 = require("./union"); +exports.UnionVector = union_1.UnionVector; +exports.DenseUnionVector = union_1.DenseUnionVector; +exports.SparseUnionVector = union_1.SparseUnionVector; +var utf8_1 = require("./utf8"); +exports.Utf8Vector = utf8_1.Utf8Vector; +var row_1 = require("./row"); +exports.MapRow = row_1.MapRow; +exports.StructRow = row_1.StructRow; +const fn = require("../util/fn"); +const enum_1 = require("../enum"); +const vector_2 = require("../vector"); +const chunked_2 = require("./chunked"); +const base_2 = require("./base"); +const bit_1 = require("../util/bit"); +const compat_1 = require("../util/compat"); +const builder_1 = require("../builder"); +const get_1 = require("../visitor/get"); +const set_1 = require("../visitor/set"); +const indexof_1 = require("../visitor/indexof"); +const toarray_1 = require("../visitor/toarray"); +const iterator_1 = require("../visitor/iterator"); +const bytewidth_1 = require("../visitor/bytewidth"); +const vectorctor_1 = require("../visitor/vectorctor"); +/** @nocollapse */ +vector_2.Vector.new = newVector; +/** @nocollapse */ +vector_2.Vector.from = vectorFrom; +/** @ignore */ +function newVector(data, ...args) { + return new (vectorctor_1.instance.getVisitFn(data)())(data, ...args); +} +/** @ignore */ +function vectorFromValuesWithType(newDataType, input) { + if (compat_1.isIterable(input)) { + return vector_2.Vector.from({ 'nullValues': [null, undefined], type: newDataType(), 'values': input }); + } + else if (compat_1.isAsyncIterable(input)) { + return vector_2.Vector.from({ 'nullValues': [null, undefined], type: newDataType(), 'values': input }); + } + const { 'values': values = [], 'type': type = newDataType(), 'nullValues': nullValues = [null, undefined], } = { ...input }; + return compat_1.isIterable(values) + ? vector_2.Vector.from({ nullValues, ...input, type }) + : vector_2.Vector.from({ nullValues, ...input, type }); +} +exports.vectorFromValuesWithType = vectorFromValuesWithType; +function vectorFrom(input) { + const { 'values': values = [], ...options } = { 'nullValues': [null, undefined], ...input }; + if (compat_1.isIterable(values)) { + const chunks = [...builder_1.Builder.throughIterable(options)(values)]; + return chunks.length === 1 ? chunks[0] : chunked_2.Chunked.concat(chunks); + } + return (async (chunks) => { + const transform = builder_1.Builder.throughAsyncIterable(options); + for await (const chunk of transform(values)) { + chunks.push(chunk); + } + return chunks.length === 1 ? chunks[0] : chunked_2.Chunked.concat(chunks); + })([]); +} +// +// We provide the following method implementations for code navigability purposes only. +// They're overridden at runtime below with the specific Visitor implementation for each type, +// short-circuiting the usual Visitor traversal and reducing intermediate lookups and calls. +// This comment is here to remind you to not set breakpoints in these function bodies, or to inform +// you why the breakpoints you have already set are not being triggered. Have a great day! +// +base_2.BaseVector.prototype.get = function baseVectorGet(index) { + return get_1.instance.visit(this, index); +}; +base_2.BaseVector.prototype.set = function baseVectorSet(index, value) { + return set_1.instance.visit(this, index, value); +}; +base_2.BaseVector.prototype.indexOf = function baseVectorIndexOf(value, fromIndex) { + return indexof_1.instance.visit(this, value, fromIndex); +}; +base_2.BaseVector.prototype.toArray = function baseVectorToArray() { + return toarray_1.instance.visit(this); +}; +base_2.BaseVector.prototype.getByteWidth = function baseVectorGetByteWidth() { + return bytewidth_1.instance.visit(this.type); +}; +base_2.BaseVector.prototype[Symbol.iterator] = function baseVectorSymbolIterator() { + return iterator_1.instance.visit(this); +}; +base_2.BaseVector.prototype._bindDataAccessors = bindBaseVectorDataAccessors; +// Perf: bind and assign the operator Visitor methods to each of the Vector subclasses for each Type +Object.keys(enum_1.Type) + .map((T) => enum_1.Type[T]) + .filter((T) => typeof T === 'number') + .filter((typeId) => typeId !== enum_1.Type.NONE) + .forEach((typeId) => { + const VectorCtor = vectorctor_1.instance.visit(typeId); + VectorCtor.prototype['get'] = fn.partial1(get_1.instance.getVisitFn(typeId)); + VectorCtor.prototype['set'] = fn.partial2(set_1.instance.getVisitFn(typeId)); + VectorCtor.prototype['indexOf'] = fn.partial2(indexof_1.instance.getVisitFn(typeId)); + VectorCtor.prototype['toArray'] = fn.partial0(toarray_1.instance.getVisitFn(typeId)); + VectorCtor.prototype['getByteWidth'] = partialType0(bytewidth_1.instance.getVisitFn(typeId)); + VectorCtor.prototype[Symbol.iterator] = fn.partial0(iterator_1.instance.getVisitFn(typeId)); +}); +/** @ignore */ +function partialType0(visit) { + return function () { return visit(this.type); }; +} +/** @ignore */ +function wrapNullableGet(fn) { + return function (i) { return this.isValid(i) ? fn.call(this, i) : null; }; +} +/** @ignore */ +function wrapNullableSet(fn) { + return function (i, a) { + if (bit_1.setBool(this.nullBitmap, this.offset + i, !(a === null || a === undefined))) { + fn.call(this, i, a); + } + }; +} +/** @ignore */ +function bindBaseVectorDataAccessors() { + const nullBitmap = this.nullBitmap; + if (nullBitmap && nullBitmap.byteLength > 0) { + this.get = wrapNullableGet(this.get); + this.set = wrapNullableSet(this.set); + } +} + +//# sourceMappingURL=index.js.map diff --git a/frontend/node_modules/apache-arrow/vector/index.js.map b/frontend/node_modules/apache-arrow/vector/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..bb705356824bdee40f7972abdfc76b4f3e052318 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/index.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/index.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,oCAAmC;AAA1B,0BAAA,MAAM,CAAA;AACf,+BAAoC;AAA3B,4BAAA,UAAU,CAAA;AACnB,mCAAwC;AAA/B,gCAAA,YAAY,CAAA;AACrB,+BAAoC;AAA3B,4BAAA,UAAU,CAAA;AACnB,qCAAoC;AAA3B,4BAAA,OAAO,CAAA;AAChB,+BAA0E;AAAjE,4BAAA,UAAU,CAAA;AAAE,+BAAA,aAAa,CAAA;AAAE,uCAAA,qBAAqB,CAAA;AACzD,qCAA0C;AAAjC,kCAAA,aAAa,CAAA;AACtB,2CAAgD;AAAvC,wCAAA,gBAAgB,CAAA;AACzB,qDAA0D;AAAjD,kDAAA,qBAAqB,CAAA;AAC9B,iDAAsD;AAA7C,8CAAA,mBAAmB,CAAA;AAC5B,iCAAmF;AAA1E,8BAAA,WAAW,CAAA;AAAE,gCAAA,aAAa,CAAA;AAAE,gCAAA,aAAa,CAAA;AAAE,gCAAA,aAAa,CAAA;AACjE,uCAA4F;AAAnF,oCAAA,cAAc,CAAA;AAAE,2CAAA,qBAAqB,CAAA;AAAE,6CAAA,uBAAuB,CAAA;AACvE,6BAA4I;AAAnI,0BAAA,SAAS,CAAA;AAAE,2BAAA,UAAU,CAAA;AAAE,4BAAA,WAAW,CAAA;AAAE,4BAAA,WAAW,CAAA;AAAE,4BAAA,WAAW,CAAA;AAAE,4BAAA,WAAW,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;AAED,cAAc;AACd,SAAS,2BAA2B;IAChC,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;IACnC,IAAI,UAAU,IAAI,UAAU,CAAC,UAAU,GAAG,CAAC,EAAE;QACzC,IAAI,CAAC,GAAG,GAAG,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACrC,IAAI,CAAC,GAAG,GAAG,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACxC;AACL,CAAC","file":"index.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nexport { Vector } from '../vector';\nexport { BaseVector } from './base';\nexport { BinaryVector } from './binary';\nexport { BoolVector } from './bool';\nexport { Chunked } from './chunked';\nexport { DateVector, DateDayVector, DateMillisecondVector } from './date';\nexport { DecimalVector } from './decimal';\nexport { DictionaryVector } from './dictionary';\nexport { FixedSizeBinaryVector } from './fixedsizebinary';\nexport { FixedSizeListVector } from './fixedsizelist';\nexport { FloatVector, Float16Vector, Float32Vector, Float64Vector } from './float';\nexport { IntervalVector, IntervalDayTimeVector, IntervalYearMonthVector } from './interval';\nexport { IntVector, Int8Vector, Int16Vector, Int32Vector, Int64Vector, Uint8Vector, Uint16Vector, Uint32Vector, Uint64Vector } from './int';\nexport { ListVector } from './list';\nexport { MapVector } from './map';\nexport { NullVector } from './null';\nexport { StructVector } from './struct';\nexport { TimestampVector, TimestampSecondVector, TimestampMillisecondVector, TimestampMicrosecondVector, TimestampNanosecondVector } from './timestamp';\nexport { TimeVector, TimeSecondVector, TimeMillisecondVector, TimeMicrosecondVector, TimeNanosecondVector } from './time';\nexport { UnionVector, DenseUnionVector, SparseUnionVector } from './union';\nexport { Utf8Vector } from './utf8';\nexport { MapRow, StructRow } from './row';\n\nimport * as fn from '../util/fn';\nimport { Data } from '../data';\nimport { Type } from '../enum';\nimport { Vector } from '../vector';\nimport { DataType } from '../type';\nimport { Chunked } from './chunked';\nimport { BaseVector } from './base';\nimport { setBool } from '../util/bit';\nimport { isIterable, isAsyncIterable } from '../util/compat';\nimport { Builder, IterableBuilderOptions } from '../builder';\nimport { VectorType as V, VectorCtorArgs } from '../interfaces';\nimport { instance as getVisitor } from '../visitor/get';\nimport { instance as setVisitor } from '../visitor/set';\nimport { instance as indexOfVisitor } from '../visitor/indexof';\nimport { instance as toArrayVisitor } from '../visitor/toarray';\nimport { instance as iteratorVisitor } from '../visitor/iterator';\nimport { instance as byteWidthVisitor } from '../visitor/bytewidth';\nimport { instance as getVectorConstructor } from '../visitor/vectorctor';\n\ndeclare module '../vector' {\n namespace Vector {\n export { newVector as new };\n export { vectorFrom as from };\n }\n}\n\ndeclare module './base' {\n namespace BaseVector {\n export { vectorFrom as from };\n }\n interface BaseVector {\n get(index: number): T['TValue'] | null;\n set(index: number, value: T['TValue'] | null): void;\n indexOf(value: T['TValue'] | null, fromIndex?: number): number;\n toArray(): T['TArray'];\n getByteWidth(): number;\n [Symbol.iterator](): IterableIterator;\n }\n}\n\n/** @nocollapse */\nVector.new = newVector;\n\n/** @nocollapse */\nVector.from = vectorFrom;\n\n/** @ignore */\nfunction newVector(data: Data, ...args: VectorCtorArgs>): V {\n return new (getVectorConstructor.getVisitFn(data)())(data, ...args) as V;\n}\n\n/** @ignore */\nexport interface VectorBuilderOptions extends IterableBuilderOptions { values: Iterable; }\n/** @ignore */\nexport interface VectorBuilderOptionsAsync extends IterableBuilderOptions { values: AsyncIterable; }\n\n/** @ignore */\nexport function vectorFromValuesWithType(newDataType: () => T, input: Iterable | AsyncIterable | VectorBuilderOptions | VectorBuilderOptionsAsync) {\n if (isIterable(input)) {\n return Vector.from({ 'nullValues': [null, undefined], type: newDataType(), 'values': input }) as V;\n } else if (isAsyncIterable(input)) {\n return Vector.from({ 'nullValues': [null, undefined], type: newDataType(), 'values': input }) as Promise>;\n }\n const {\n 'values': values = [],\n 'type': type = newDataType(),\n 'nullValues': nullValues = [null, undefined],\n } = { ...input };\n return isIterable(values)\n ? Vector.from({ nullValues, ...input, type } as VectorBuilderOptions)\n : Vector.from({ nullValues, ...input, type } as VectorBuilderOptionsAsync);\n}\n\n/** @ignore */\nfunction vectorFrom(input: VectorBuilderOptions): Vector;\nfunction vectorFrom(input: VectorBuilderOptionsAsync): Promise>;\nfunction vectorFrom(input: VectorBuilderOptions | VectorBuilderOptionsAsync) {\n const { 'values': values = [], ...options } = { 'nullValues': [null, undefined], ...input } as VectorBuilderOptions | VectorBuilderOptionsAsync;\n if (isIterable(values)) {\n const chunks = [...Builder.throughIterable(options)(values)];\n return chunks.length === 1 ? chunks[0] : Chunked.concat(chunks);\n }\n return (async (chunks: V[]) => {\n const transform = Builder.throughAsyncIterable(options);\n for await (const chunk of transform(values)) {\n chunks.push(chunk);\n }\n return chunks.length === 1 ? chunks[0] : Chunked.concat(chunks);\n })([]);\n}\n\n//\n// We provide the following method implementations for code navigability purposes only.\n// They're overridden at runtime below with the specific Visitor implementation for each type,\n// short-circuiting the usual Visitor traversal and reducing intermediate lookups and calls.\n// This comment is here to remind you to not set breakpoints in these function bodies, or to inform\n// you why the breakpoints you have already set are not being triggered. Have a great day!\n//\n\nBaseVector.prototype.get = function baseVectorGet(this: BaseVector, index: number): T['TValue'] | null {\n return getVisitor.visit(this, index);\n};\n\nBaseVector.prototype.set = function baseVectorSet(this: BaseVector, index: number, value: T['TValue'] | null): void {\n return setVisitor.visit(this, index, value);\n};\n\nBaseVector.prototype.indexOf = function baseVectorIndexOf(this: BaseVector, value: T['TValue'] | null, fromIndex?: number): number {\n return indexOfVisitor.visit(this, value, fromIndex);\n};\n\nBaseVector.prototype.toArray = function baseVectorToArray(this: BaseVector): T['TArray'] {\n return toArrayVisitor.visit(this);\n};\n\nBaseVector.prototype.getByteWidth = function baseVectorGetByteWidth(this: BaseVector): number {\n return byteWidthVisitor.visit(this.type);\n};\n\nBaseVector.prototype[Symbol.iterator] = function baseVectorSymbolIterator(this: BaseVector): IterableIterator {\n return iteratorVisitor.visit(this);\n};\n\n(BaseVector.prototype as any)._bindDataAccessors = bindBaseVectorDataAccessors;\n\n// Perf: bind and assign the operator Visitor methods to each of the Vector subclasses for each Type\n(Object.keys(Type) as any[])\n .map((T: any) => Type[T] as any)\n .filter((T: any): T is Type => typeof T === 'number')\n .filter((typeId) => typeId !== Type.NONE)\n .forEach((typeId) => {\n const VectorCtor = getVectorConstructor.visit(typeId);\n VectorCtor.prototype['get'] = fn.partial1(getVisitor.getVisitFn(typeId));\n VectorCtor.prototype['set'] = fn.partial2(setVisitor.getVisitFn(typeId));\n VectorCtor.prototype['indexOf'] = fn.partial2(indexOfVisitor.getVisitFn(typeId));\n VectorCtor.prototype['toArray'] = fn.partial0(toArrayVisitor.getVisitFn(typeId));\n VectorCtor.prototype['getByteWidth'] = partialType0(byteWidthVisitor.getVisitFn(typeId));\n VectorCtor.prototype[Symbol.iterator] = fn.partial0(iteratorVisitor.getVisitFn(typeId));\n });\n\n/** @ignore */\nfunction partialType0(visit: (node: T['type']) => any) {\n return function(this: T) { return visit(this.type); };\n}\n\n/** @ignore */\nfunction wrapNullableGet, F extends (i: number) => any>(fn: F): (...args: Parameters) => ReturnType {\n return function(this: V, i: number) { return this.isValid(i) ? fn.call(this, i) : null; };\n}\n\n/** @ignore */\nfunction wrapNullableSet, F extends (i: number, a: any) => void>(fn: F): (...args: Parameters) => void {\n return function(this: V, i: number, a: any) {\n if (setBool(this.nullBitmap, this.offset + i, !(a === null || a === undefined))) {\n fn.call(this, i, a);\n }\n };\n}\n\n/** @ignore */\nfunction bindBaseVectorDataAccessors(this: BaseVector) {\n const nullBitmap = this.nullBitmap;\n if (nullBitmap && nullBitmap.byteLength > 0) {\n this.get = wrapNullableGet(this.get);\n this.set = wrapNullableSet(this.set);\n }\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/index.mjs b/frontend/node_modules/apache-arrow/vector/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..17b8c8a8293ed38fce934da30b7903db3d461d59 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/index.mjs @@ -0,0 +1,154 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +export { Vector } from '../vector'; +export { BaseVector } from './base'; +export { BinaryVector } from './binary'; +export { BoolVector } from './bool'; +export { Chunked } from './chunked'; +export { DateVector, DateDayVector, DateMillisecondVector } from './date'; +export { DecimalVector } from './decimal'; +export { DictionaryVector } from './dictionary'; +export { FixedSizeBinaryVector } from './fixedsizebinary'; +export { FixedSizeListVector } from './fixedsizelist'; +export { FloatVector, Float16Vector, Float32Vector, Float64Vector } from './float'; +export { IntervalVector, IntervalDayTimeVector, IntervalYearMonthVector } from './interval'; +export { IntVector, Int8Vector, Int16Vector, Int32Vector, Int64Vector, Uint8Vector, Uint16Vector, Uint32Vector, Uint64Vector } from './int'; +export { ListVector } from './list'; +export { MapVector } from './map'; +export { NullVector } from './null'; +export { StructVector } from './struct'; +export { TimestampVector, TimestampSecondVector, TimestampMillisecondVector, TimestampMicrosecondVector, TimestampNanosecondVector } from './timestamp'; +export { TimeVector, TimeSecondVector, TimeMillisecondVector, TimeMicrosecondVector, TimeNanosecondVector } from './time'; +export { UnionVector, DenseUnionVector, SparseUnionVector } from './union'; +export { Utf8Vector } from './utf8'; +export { MapRow, StructRow } from './row'; +import * as fn from '../util/fn'; +import { Type } from '../enum'; +import { Vector } from '../vector'; +import { Chunked } from './chunked'; +import { BaseVector } from './base'; +import { setBool } from '../util/bit'; +import { isIterable, isAsyncIterable } from '../util/compat'; +import { Builder } from '../builder'; +import { instance as getVisitor } from '../visitor/get'; +import { instance as setVisitor } from '../visitor/set'; +import { instance as indexOfVisitor } from '../visitor/indexof'; +import { instance as toArrayVisitor } from '../visitor/toarray'; +import { instance as iteratorVisitor } from '../visitor/iterator'; +import { instance as byteWidthVisitor } from '../visitor/bytewidth'; +import { instance as getVectorConstructor } from '../visitor/vectorctor'; +/** @nocollapse */ +Vector.new = newVector; +/** @nocollapse */ +Vector.from = vectorFrom; +/** @ignore */ +function newVector(data, ...args) { + return new (getVectorConstructor.getVisitFn(data)())(data, ...args); +} +/** @ignore */ +export function vectorFromValuesWithType(newDataType, input) { + if (isIterable(input)) { + return Vector.from({ 'nullValues': [null, undefined], type: newDataType(), 'values': input }); + } + else if (isAsyncIterable(input)) { + return Vector.from({ 'nullValues': [null, undefined], type: newDataType(), 'values': input }); + } + const { 'values': values = [], 'type': type = newDataType(), 'nullValues': nullValues = [null, undefined], } = { ...input }; + return isIterable(values) + ? Vector.from({ nullValues, ...input, type }) + : Vector.from({ nullValues, ...input, type }); +} +function vectorFrom(input) { + const { 'values': values = [], ...options } = { 'nullValues': [null, undefined], ...input }; + if (isIterable(values)) { + const chunks = [...Builder.throughIterable(options)(values)]; + return chunks.length === 1 ? chunks[0] : Chunked.concat(chunks); + } + return (async (chunks) => { + const transform = Builder.throughAsyncIterable(options); + for await (const chunk of transform(values)) { + chunks.push(chunk); + } + return chunks.length === 1 ? chunks[0] : Chunked.concat(chunks); + })([]); +} +// +// We provide the following method implementations for code navigability purposes only. +// They're overridden at runtime below with the specific Visitor implementation for each type, +// short-circuiting the usual Visitor traversal and reducing intermediate lookups and calls. +// This comment is here to remind you to not set breakpoints in these function bodies, or to inform +// you why the breakpoints you have already set are not being triggered. Have a great day! +// +BaseVector.prototype.get = function baseVectorGet(index) { + return getVisitor.visit(this, index); +}; +BaseVector.prototype.set = function baseVectorSet(index, value) { + return setVisitor.visit(this, index, value); +}; +BaseVector.prototype.indexOf = function baseVectorIndexOf(value, fromIndex) { + return indexOfVisitor.visit(this, value, fromIndex); +}; +BaseVector.prototype.toArray = function baseVectorToArray() { + return toArrayVisitor.visit(this); +}; +BaseVector.prototype.getByteWidth = function baseVectorGetByteWidth() { + return byteWidthVisitor.visit(this.type); +}; +BaseVector.prototype[Symbol.iterator] = function baseVectorSymbolIterator() { + return iteratorVisitor.visit(this); +}; +BaseVector.prototype._bindDataAccessors = bindBaseVectorDataAccessors; +// Perf: bind and assign the operator Visitor methods to each of the Vector subclasses for each Type +Object.keys(Type) + .map((T) => Type[T]) + .filter((T) => typeof T === 'number') + .filter((typeId) => typeId !== Type.NONE) + .forEach((typeId) => { + const VectorCtor = getVectorConstructor.visit(typeId); + VectorCtor.prototype['get'] = fn.partial1(getVisitor.getVisitFn(typeId)); + VectorCtor.prototype['set'] = fn.partial2(setVisitor.getVisitFn(typeId)); + VectorCtor.prototype['indexOf'] = fn.partial2(indexOfVisitor.getVisitFn(typeId)); + VectorCtor.prototype['toArray'] = fn.partial0(toArrayVisitor.getVisitFn(typeId)); + VectorCtor.prototype['getByteWidth'] = partialType0(byteWidthVisitor.getVisitFn(typeId)); + VectorCtor.prototype[Symbol.iterator] = fn.partial0(iteratorVisitor.getVisitFn(typeId)); +}); +/** @ignore */ +function partialType0(visit) { + return function () { return visit(this.type); }; +} +/** @ignore */ +function wrapNullableGet(fn) { + return function (i) { return this.isValid(i) ? fn.call(this, i) : null; }; +} +/** @ignore */ +function wrapNullableSet(fn) { + return function (i, a) { + if (setBool(this.nullBitmap, this.offset + i, !(a === null || a === undefined))) { + fn.call(this, i, a); + } + }; +} +/** @ignore */ +function bindBaseVectorDataAccessors() { + const nullBitmap = this.nullBitmap; + if (nullBitmap && nullBitmap.byteLength > 0) { + this.get = wrapNullableGet(this.get); + this.set = wrapNullableSet(this.set); + } +} + +//# sourceMappingURL=index.mjs.map diff --git a/frontend/node_modules/apache-arrow/vector/index.mjs.map b/frontend/node_modules/apache-arrow/vector/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..cf52eec03119a715cfbf44fa9ab2457b0a92dca4 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,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AY,CAAmB,KAA+B;IACnE,OAAO,cAAoB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1D,CAAC;AAED,cAAc;AACd,SAAS,eAAe,CAAwE,EAAK;IACjG,OAAO,UAAkB,CAAS,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC9F,CAAC;AAED,cAAc;AACd,SAAS,eAAe,CAAqF,EAAK;IAC9G,OAAO,UAAkB,CAAS,EAAE,CAAM;QACtC,IAAI,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,SAAS,CAAC,CAAC,EAAE;YAC7E,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;SACvB;IACL,CAAC,CAAC;AACN,CAAC;AAED,cAAc;AACd,SAAS,2BAA2B;IAChC,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;IACnC,IAAI,UAAU,IAAI,UAAU,CAAC,UAAU,GAAG,CAAC,EAAE;QACzC,IAAI,CAAC,GAAG,GAAG,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACrC,IAAI,CAAC,GAAG,GAAG,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACxC;AACL,CAAC","file":"index.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nexport { Vector } from '../vector';\nexport { BaseVector } from './base';\nexport { BinaryVector } from './binary';\nexport { BoolVector } from './bool';\nexport { Chunked } from './chunked';\nexport { DateVector, DateDayVector, DateMillisecondVector } from './date';\nexport { DecimalVector } from './decimal';\nexport { DictionaryVector } from './dictionary';\nexport { FixedSizeBinaryVector } from './fixedsizebinary';\nexport { FixedSizeListVector } from './fixedsizelist';\nexport { FloatVector, Float16Vector, Float32Vector, Float64Vector } from './float';\nexport { IntervalVector, IntervalDayTimeVector, IntervalYearMonthVector } from './interval';\nexport { IntVector, Int8Vector, Int16Vector, Int32Vector, Int64Vector, Uint8Vector, Uint16Vector, Uint32Vector, Uint64Vector } from './int';\nexport { ListVector } from './list';\nexport { MapVector } from './map';\nexport { NullVector } from './null';\nexport { StructVector } from './struct';\nexport { TimestampVector, TimestampSecondVector, TimestampMillisecondVector, TimestampMicrosecondVector, TimestampNanosecondVector } from './timestamp';\nexport { TimeVector, TimeSecondVector, TimeMillisecondVector, TimeMicrosecondVector, TimeNanosecondVector } from './time';\nexport { UnionVector, DenseUnionVector, SparseUnionVector } from './union';\nexport { Utf8Vector } from './utf8';\nexport { MapRow, StructRow } from './row';\n\nimport * as fn from '../util/fn';\nimport { Data } from '../data';\nimport { Type } from '../enum';\nimport { Vector } from '../vector';\nimport { DataType } from '../type';\nimport { Chunked } from './chunked';\nimport { BaseVector } from './base';\nimport { setBool } from '../util/bit';\nimport { isIterable, isAsyncIterable } from '../util/compat';\nimport { Builder, IterableBuilderOptions } from '../builder';\nimport { VectorType as V, VectorCtorArgs } from '../interfaces';\nimport { instance as getVisitor } from '../visitor/get';\nimport { instance as setVisitor } from '../visitor/set';\nimport { instance as indexOfVisitor } from '../visitor/indexof';\nimport { instance as toArrayVisitor } from '../visitor/toarray';\nimport { instance as iteratorVisitor } from '../visitor/iterator';\nimport { instance as byteWidthVisitor } from '../visitor/bytewidth';\nimport { instance as getVectorConstructor } from '../visitor/vectorctor';\n\ndeclare module '../vector' {\n namespace Vector {\n export { newVector as new };\n export { vectorFrom as from };\n }\n}\n\ndeclare module './base' {\n namespace BaseVector {\n export { vectorFrom as from };\n }\n interface BaseVector {\n get(index: number): T['TValue'] | null;\n set(index: number, value: T['TValue'] | null): void;\n indexOf(value: T['TValue'] | null, fromIndex?: number): number;\n toArray(): T['TArray'];\n getByteWidth(): number;\n [Symbol.iterator](): IterableIterator;\n }\n}\n\n/** @nocollapse */\nVector.new = newVector;\n\n/** @nocollapse */\nVector.from = vectorFrom;\n\n/** @ignore */\nfunction newVector(data: Data, ...args: VectorCtorArgs>): V {\n return new (getVectorConstructor.getVisitFn(data)())(data, ...args) as V;\n}\n\n/** @ignore */\nexport interface VectorBuilderOptions extends IterableBuilderOptions { values: Iterable; }\n/** @ignore */\nexport interface VectorBuilderOptionsAsync extends IterableBuilderOptions { values: AsyncIterable; }\n\n/** @ignore */\nexport function vectorFromValuesWithType(newDataType: () => T, input: Iterable | AsyncIterable | VectorBuilderOptions | VectorBuilderOptionsAsync) {\n if (isIterable(input)) {\n return Vector.from({ 'nullValues': [null, undefined], type: newDataType(), 'values': input }) as V;\n } else if (isAsyncIterable(input)) {\n return Vector.from({ 'nullValues': [null, undefined], type: newDataType(), 'values': input }) as Promise>;\n }\n const {\n 'values': values = [],\n 'type': type = newDataType(),\n 'nullValues': nullValues = [null, undefined],\n } = { ...input };\n return isIterable(values)\n ? Vector.from({ nullValues, ...input, type } as VectorBuilderOptions)\n : Vector.from({ nullValues, ...input, type } as VectorBuilderOptionsAsync);\n}\n\n/** @ignore */\nfunction vectorFrom(input: VectorBuilderOptions): Vector;\nfunction vectorFrom(input: VectorBuilderOptionsAsync): Promise>;\nfunction vectorFrom(input: VectorBuilderOptions | VectorBuilderOptionsAsync) {\n const { 'values': values = [], ...options } = { 'nullValues': [null, undefined], ...input } as VectorBuilderOptions | VectorBuilderOptionsAsync;\n if (isIterable(values)) {\n const chunks = [...Builder.throughIterable(options)(values)];\n return chunks.length === 1 ? chunks[0] : Chunked.concat(chunks);\n }\n return (async (chunks: V[]) => {\n const transform = Builder.throughAsyncIterable(options);\n for await (const chunk of transform(values)) {\n chunks.push(chunk);\n }\n return chunks.length === 1 ? chunks[0] : Chunked.concat(chunks);\n })([]);\n}\n\n//\n// We provide the following method implementations for code navigability purposes only.\n// They're overridden at runtime below with the specific Visitor implementation for each type,\n// short-circuiting the usual Visitor traversal and reducing intermediate lookups and calls.\n// This comment is here to remind you to not set breakpoints in these function bodies, or to inform\n// you why the breakpoints you have already set are not being triggered. Have a great day!\n//\n\nBaseVector.prototype.get = function baseVectorGet(this: BaseVector, index: number): T['TValue'] | null {\n return getVisitor.visit(this, index);\n};\n\nBaseVector.prototype.set = function baseVectorSet(this: BaseVector, index: number, value: T['TValue'] | null): void {\n return setVisitor.visit(this, index, value);\n};\n\nBaseVector.prototype.indexOf = function baseVectorIndexOf(this: BaseVector, value: T['TValue'] | null, fromIndex?: number): number {\n return indexOfVisitor.visit(this, value, fromIndex);\n};\n\nBaseVector.prototype.toArray = function baseVectorToArray(this: BaseVector): T['TArray'] {\n return toArrayVisitor.visit(this);\n};\n\nBaseVector.prototype.getByteWidth = function baseVectorGetByteWidth(this: BaseVector): number {\n return byteWidthVisitor.visit(this.type);\n};\n\nBaseVector.prototype[Symbol.iterator] = function baseVectorSymbolIterator(this: BaseVector): IterableIterator {\n return iteratorVisitor.visit(this);\n};\n\n(BaseVector.prototype as any)._bindDataAccessors = bindBaseVectorDataAccessors;\n\n// Perf: bind and assign the operator Visitor methods to each of the Vector subclasses for each Type\n(Object.keys(Type) as any[])\n .map((T: any) => Type[T] as any)\n .filter((T: any): T is Type => typeof T === 'number')\n .filter((typeId) => typeId !== Type.NONE)\n .forEach((typeId) => {\n const VectorCtor = getVectorConstructor.visit(typeId);\n VectorCtor.prototype['get'] = fn.partial1(getVisitor.getVisitFn(typeId));\n VectorCtor.prototype['set'] = fn.partial2(setVisitor.getVisitFn(typeId));\n VectorCtor.prototype['indexOf'] = fn.partial2(indexOfVisitor.getVisitFn(typeId));\n VectorCtor.prototype['toArray'] = fn.partial0(toArrayVisitor.getVisitFn(typeId));\n VectorCtor.prototype['getByteWidth'] = partialType0(byteWidthVisitor.getVisitFn(typeId));\n VectorCtor.prototype[Symbol.iterator] = fn.partial0(iteratorVisitor.getVisitFn(typeId));\n });\n\n/** @ignore */\nfunction partialType0(visit: (node: T['type']) => any) {\n return function(this: T) { return visit(this.type); };\n}\n\n/** @ignore */\nfunction wrapNullableGet, F extends (i: number) => any>(fn: F): (...args: Parameters) => ReturnType {\n return function(this: V, i: number) { return this.isValid(i) ? fn.call(this, i) : null; };\n}\n\n/** @ignore */\nfunction wrapNullableSet, F extends (i: number, a: any) => void>(fn: F): (...args: Parameters) => void {\n return function(this: V, i: number, a: any) {\n if (setBool(this.nullBitmap, this.offset + i, !(a === null || a === undefined))) {\n fn.call(this, i, a);\n }\n };\n}\n\n/** @ignore */\nfunction bindBaseVectorDataAccessors(this: BaseVector) {\n const nullBitmap = this.nullBitmap;\n if (nullBitmap && nullBitmap.byteLength > 0) {\n this.get = wrapNullableGet(this.get);\n this.set = wrapNullableSet(this.set);\n }\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/int.d.ts b/frontend/node_modules/apache-arrow/vector/int.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7e67aa8cb0c859e156ce240e816b23b2eb084e5b --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/int.d.ts @@ -0,0 +1,64 @@ +import { Chunked } from './chunked'; +import { BaseVector } from './base'; +import { VectorBuilderOptions } from './index'; +import { VectorBuilderOptionsAsync } from './index'; +import { Int, Uint8, Uint16, Uint32, Uint64, Int8, Int16, Int32, Int64, IntArray } from '../type'; +import { VectorType as V, BigIntArray } from '../interfaces'; +/** @ignore */ +declare type FromInput = IntArray | BigIntArray | Iterable | AsyncIterable | VectorBuilderOptions | VectorBuilderOptionsAsync; +/** @ignore */ +export declare class IntVector extends BaseVector { + static from(this: typeof IntVector, input: Int8Array): Int8Vector; + static from(this: typeof IntVector, input: Int16Array): Int16Vector; + static from(this: typeof IntVector, input: Int32Array): Int32Vector; + static from(this: typeof IntVector, input: BigInt64Array): Int64Vector; + static from(this: typeof IntVector, input: Int32Array, is64bit: true): Int64Vector; + static from(this: typeof IntVector, input: Uint8Array): Uint8Vector; + static from(this: typeof IntVector, input: Uint16Array): Uint16Vector; + static from(this: typeof IntVector, input: Uint32Array): Uint32Vector; + static from(this: typeof IntVector, input: BigUint64Array): Uint64Vector; + static from(this: typeof IntVector, input: Uint32Array, is64bit: true): Uint64Vector; + static from(this: typeof Int8Vector, input: FromInput): Int8Vector; + static from(this: typeof Int16Vector, input: FromInput): Int16Vector; + static from(this: typeof Int32Vector, input: FromInput): Int32Vector; + static from(this: typeof Int64Vector, input: FromInput): Int64Vector; + static from(this: typeof Uint8Vector, input: FromInput): Uint8Vector; + static from(this: typeof Uint16Vector, input: FromInput): Uint16Vector; + static from(this: typeof Uint32Vector, input: FromInput): Uint32Vector; + static from(this: typeof Uint64Vector, input: FromInput): Uint64Vector; + static from(this: typeof IntVector, input: Iterable): V; + static from(this: typeof IntVector, input: AsyncIterable): Promise>; + static from(this: typeof IntVector, input: VectorBuilderOptions): Chunked; + static from(this: typeof IntVector, input: VectorBuilderOptionsAsync): Promise>; +} +/** @ignore */ +export declare class Int8Vector extends IntVector { +} +/** @ignore */ +export declare class Int16Vector extends IntVector { +} +/** @ignore */ +export declare class Int32Vector extends IntVector { +} +/** @ignore */ +export declare class Int64Vector extends IntVector { + toBigInt64Array(): BigInt64Array; + private _values64; + readonly values64: BigInt64Array; +} +/** @ignore */ +export declare class Uint8Vector extends IntVector { +} +/** @ignore */ +export declare class Uint16Vector extends IntVector { +} +/** @ignore */ +export declare class Uint32Vector extends IntVector { +} +/** @ignore */ +export declare class Uint64Vector extends IntVector { + toBigUint64Array(): BigUint64Array; + private _values64; + readonly values64: BigUint64Array; +} +export {}; diff --git a/frontend/node_modules/apache-arrow/vector/int.js b/frontend/node_modules/apache-arrow/vector/int.js new file mode 100644 index 0000000000000000000000000000000000000000..8e9e9dc7ccfd5265fc124facedce08f40146d658 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/int.js @@ -0,0 +1,141 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const data_1 = require("../data"); +const vector_1 = require("../vector"); +const base_1 = require("./base"); +const index_1 = require("./index"); +const compat_1 = require("../util/compat"); +const buffer_1 = require("../util/buffer"); +const type_1 = require("../type"); +/** @ignore */ +class IntVector extends base_1.BaseVector { + /** @nocollapse */ + static from(...args) { + let [input, is64bit = false] = args; + let ArrowType = vectorTypeToDataType(this, is64bit); + if ((input instanceof ArrayBuffer) || ArrayBuffer.isView(input)) { + let InputType = arrayTypeToDataType(input.constructor, is64bit) || ArrowType; + // Special case, infer the Arrow DataType from the input if calling the base + // IntVector.from with a TypedArray, e.g. `IntVector.from(new Int32Array())` + if (ArrowType === null) { + ArrowType = InputType; + } + // If the DataType inferred from the Vector constructor matches the + // DataType inferred from the input arguments, return zero-copy view + if (ArrowType && ArrowType === InputType) { + let type = new ArrowType(); + let length = input.byteLength / type.ArrayType.BYTES_PER_ELEMENT; + // If the ArrowType is 64bit but the input type is 32bit pairs, update the logical length + if (convert32To64Bit(ArrowType, input.constructor)) { + length *= 0.5; + } + return vector_1.Vector.new(data_1.Data.Int(type, 0, length, 0, null, input)); + } + } + if (ArrowType) { + // If the DataType inferred from the Vector constructor is different than + // the DataType inferred from the input TypedArray, or if input isn't a + // TypedArray, use the Builders to construct the result Vector + return index_1.vectorFromValuesWithType(() => new ArrowType(), input); + } + if ((input instanceof DataView) || (input instanceof ArrayBuffer)) { + throw new TypeError(`Cannot infer integer type from instance of ${input.constructor.name}`); + } + throw new TypeError('Unrecognized IntVector input'); + } +} +exports.IntVector = IntVector; +/** @ignore */ +class Int8Vector extends IntVector { +} +exports.Int8Vector = Int8Vector; +/** @ignore */ +class Int16Vector extends IntVector { +} +exports.Int16Vector = Int16Vector; +/** @ignore */ +class Int32Vector extends IntVector { +} +exports.Int32Vector = Int32Vector; +/** @ignore */ +class Int64Vector extends IntVector { + toBigInt64Array() { + return buffer_1.toBigInt64Array(this.values); + } + get values64() { + return this._values64 || (this._values64 = this.toBigInt64Array()); + } +} +exports.Int64Vector = Int64Vector; +/** @ignore */ +class Uint8Vector extends IntVector { +} +exports.Uint8Vector = Uint8Vector; +/** @ignore */ +class Uint16Vector extends IntVector { +} +exports.Uint16Vector = Uint16Vector; +/** @ignore */ +class Uint32Vector extends IntVector { +} +exports.Uint32Vector = Uint32Vector; +/** @ignore */ +class Uint64Vector extends IntVector { + toBigUint64Array() { + return buffer_1.toBigUint64Array(this.values); + } + get values64() { + return this._values64 || (this._values64 = this.toBigUint64Array()); + } +} +exports.Uint64Vector = Uint64Vector; +const convert32To64Bit = (typeCtor, dataCtor) => { + return (typeCtor === type_1.Int64 || typeCtor === type_1.Uint64) && + (dataCtor === Int32Array || dataCtor === Uint32Array); +}; +/** @ignore */ +const arrayTypeToDataType = (ctor, is64bit) => { + switch (ctor) { + case Int8Array: return type_1.Int8; + case Int16Array: return type_1.Int16; + case Int32Array: return is64bit ? type_1.Int64 : type_1.Int32; + case compat_1.BigInt64Array: return type_1.Int64; + case Uint8Array: return type_1.Uint8; + case Uint16Array: return type_1.Uint16; + case Uint32Array: return is64bit ? type_1.Uint64 : type_1.Uint32; + case compat_1.BigUint64Array: return type_1.Uint64; + default: return null; + } +}; +/** @ignore */ +const vectorTypeToDataType = (ctor, is64bit) => { + switch (ctor) { + case Int8Vector: return type_1.Int8; + case Int16Vector: return type_1.Int16; + case Int32Vector: return is64bit ? type_1.Int64 : type_1.Int32; + case Int64Vector: return type_1.Int64; + case Uint8Vector: return type_1.Uint8; + case Uint16Vector: return type_1.Uint16; + case Uint32Vector: return is64bit ? type_1.Uint64 : type_1.Uint32; + case Uint64Vector: return type_1.Uint64; + default: return null; + } +}; + +//# sourceMappingURL=int.js.map diff --git a/frontend/node_modules/apache-arrow/vector/int.js.map b/frontend/node_modules/apache-arrow/vector/int.js.map new file mode 100644 index 0000000000000000000000000000000000000000..20a8a8eaae260cc93fd043169983d627f337303d --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/int.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/int.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,kCAA+B;AAC/B,sCAAmC;AAEnC,iCAAoC;AAEpC,mCAAmD;AAEnD,2CAA+D;AAC/D,2CAAmE;AACnE,kCAAkG;AA6BlG,cAAc;AACd,MAAa,SAA+B,SAAQ,iBAAa;IA8B7D,kBAAkB;IACX,MAAM,CAAC,IAAI,CAA0D,GAAG,IAAwB;QAEnG,IAAI,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,CAAC,GAAG,IAAI,CAAC;QACpC,IAAI,SAAS,GAAG,oBAAoB,CAAC,IAAI,EAAE,OAAO,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ache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Vector } from '../vector';\nimport { Chunked } from './chunked';\nimport { BaseVector } from './base';\nimport { VectorBuilderOptions } from './index';\nimport { vectorFromValuesWithType } from './index';\nimport { VectorBuilderOptionsAsync } from './index';\nimport { BigInt64Array, BigUint64Array } from '../util/compat';\nimport { toBigInt64Array, toBigUint64Array } from '../util/buffer';\nimport { Int, Uint8, Uint16, Uint32, Uint64, Int8, Int16, Int32, Int64, IntArray } from '../type';\nimport { VectorType as V, TypedArrayConstructor, BigIntArrayConstructor, BigIntArray } from '../interfaces';\n\n/** @ignore */\ntype IntVectorConstructors =\n typeof IntVector |\n typeof Int8Vector |\n typeof Int16Vector |\n typeof Int32Vector |\n typeof Uint8Vector |\n typeof Uint16Vector |\n typeof Uint32Vector |\n typeof Int64Vector |\n typeof Uint64Vector ;\n\n/** @ignore */\ntype FromInput =\n IntArray | BigIntArray |\n Iterable |\n AsyncIterable |\n VectorBuilderOptions |\n VectorBuilderOptionsAsync ;\n\n/** @ignore */\ntype FromArgs = [FromInput, boolean?];\n\n/** @ignore */\ntype IntArrayCtor = TypedArrayConstructor | BigIntArrayConstructor;\n\n/** @ignore */\nexport class IntVector extends BaseVector {\n\n // Guaranteed zero-copy variants\n public static from(this: typeof IntVector, input: Int8Array): Int8Vector;\n public static from(this: typeof IntVector, input: Int16Array): Int16Vector;\n public static from(this: typeof IntVector, input: Int32Array): Int32Vector;\n public static from(this: typeof IntVector, input: BigInt64Array): Int64Vector;\n public static from(this: typeof IntVector, input: Int32Array, is64bit: true): Int64Vector;\n public static from(this: typeof IntVector, input: Uint8Array): Uint8Vector;\n public static from(this: typeof IntVector, input: Uint16Array): Uint16Vector;\n public static from(this: typeof IntVector, input: Uint32Array): Uint32Vector;\n public static from(this: typeof IntVector, input: BigUint64Array): Uint64Vector;\n public static from(this: typeof IntVector, input: Uint32Array, is64bit: true): Uint64Vector;\n\n // Zero-copy if input is a TypedArray of the same type as the\n // Vector that from is called on, otherwise uses the Builders\n public static from(this: typeof Int8Vector, input: FromInput): Int8Vector;\n public static from(this: typeof Int16Vector, input: FromInput): Int16Vector;\n public static from(this: typeof Int32Vector, input: FromInput): Int32Vector;\n public static from(this: typeof Int64Vector, input: FromInput): Int64Vector;\n public static from(this: typeof Uint8Vector, input: FromInput): Uint8Vector;\n public static from(this: typeof Uint16Vector, input: FromInput): Uint16Vector;\n public static from(this: typeof Uint32Vector, input: FromInput): Uint32Vector;\n public static from(this: typeof Uint64Vector, input: FromInput): Uint64Vector;\n\n // Not zero-copy\n public static from(this: typeof IntVector, input: Iterable): V;\n public static from(this: typeof IntVector, input: AsyncIterable): Promise>;\n public static from(this: typeof IntVector, input: VectorBuilderOptions): Chunked;\n public static from(this: typeof IntVector, input: VectorBuilderOptionsAsync): Promise>;\n /** @nocollapse */\n public static from(this: IntVectorConstructors, ...args: FromArgs) {\n\n let [input, is64bit = false] = args;\n let ArrowType = vectorTypeToDataType(this, is64bit);\n\n if ((input instanceof ArrayBuffer) || ArrayBuffer.isView(input)) {\n let InputType = arrayTypeToDataType(input.constructor as IntArrayCtor, is64bit) || ArrowType;\n // Special case, infer the Arrow DataType from the input if calling the base\n // IntVector.from with a TypedArray, e.g. `IntVector.from(new Int32Array())`\n if (ArrowType === null) {\n ArrowType = InputType;\n }\n // If the DataType inferred from the Vector constructor matches the\n // DataType inferred from the input arguments, return zero-copy view\n if (ArrowType && ArrowType === InputType) {\n let type = new ArrowType();\n let length = input.byteLength / type.ArrayType.BYTES_PER_ELEMENT;\n // If the ArrowType is 64bit but the input type is 32bit pairs, update the logical length\n if (convert32To64Bit(ArrowType, input.constructor)) {\n length *= 0.5;\n }\n return Vector.new(Data.Int(type, 0, length, 0, null, input as IntArray));\n }\n }\n\n if (ArrowType) {\n // If the DataType inferred from the Vector constructor is different than\n // the DataType inferred from the input TypedArray, or if input isn't a\n // TypedArray, use the Builders to construct the result Vector\n return vectorFromValuesWithType(() => new ArrowType!() as T, input);\n }\n\n if ((input instanceof DataView) || (input instanceof ArrayBuffer)) {\n throw new TypeError(`Cannot infer integer type from instance of ${input.constructor.name}`);\n }\n\n throw new TypeError('Unrecognized IntVector input');\n }\n}\n\n/** @ignore */\nexport class Int8Vector extends IntVector {}\n/** @ignore */\nexport class Int16Vector extends IntVector {}\n/** @ignore */\nexport class Int32Vector extends IntVector {}\n/** @ignore */\nexport class Int64Vector extends IntVector {\n public toBigInt64Array() {\n return toBigInt64Array(this.values);\n }\n // @ts-ignore\n private _values64: BigInt64Array;\n public get values64(): BigInt64Array {\n return this._values64 || (this._values64 = this.toBigInt64Array());\n }\n}\n\n/** @ignore */\nexport class Uint8Vector extends IntVector {}\n/** @ignore */\nexport class Uint16Vector extends IntVector {}\n/** @ignore */\nexport class Uint32Vector extends IntVector {}\n/** @ignore */\nexport class Uint64Vector extends IntVector {\n public toBigUint64Array() {\n return toBigUint64Array(this.values);\n }\n // @ts-ignore\n private _values64: BigUint64Array;\n public get values64(): BigUint64Array {\n return this._values64 || (this._values64 = this.toBigUint64Array());\n }\n}\n\nconst convert32To64Bit = (typeCtor: any, dataCtor: any) => {\n return (typeCtor === Int64 || typeCtor === Uint64) &&\n (dataCtor === Int32Array || dataCtor === Uint32Array);\n};\n\n/** @ignore */\nconst arrayTypeToDataType = (ctor: IntArrayCtor, is64bit: boolean) => {\n switch (ctor) {\n case Int8Array: return Int8;\n case Int16Array: return Int16;\n case Int32Array: return is64bit ? Int64 : Int32;\n case BigInt64Array: return Int64;\n case Uint8Array: return Uint8;\n case Uint16Array: return Uint16;\n case Uint32Array: return is64bit ? Uint64 : Uint32;\n case BigUint64Array: return Uint64;\n default: return null;\n }\n};\n\n/** @ignore */\nconst vectorTypeToDataType = (ctor: IntVectorConstructors, is64bit: boolean) => {\n switch (ctor) {\n case Int8Vector: return Int8;\n case Int16Vector: return Int16;\n case Int32Vector: return is64bit ? Int64 : Int32;\n case Int64Vector: return Int64;\n case Uint8Vector: return Uint8;\n case Uint16Vector: return Uint16;\n case Uint32Vector: return is64bit ? Uint64 : Uint32;\n case Uint64Vector: return Uint64;\n default: return null;\n }\n};\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/int.mjs b/frontend/node_modules/apache-arrow/vector/int.mjs new file mode 100644 index 0000000000000000000000000000000000000000..6d2607e9a541f8648f855b72c1b7576accbb9e44 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/int.mjs @@ -0,0 +1,130 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { Data } from '../data'; +import { Vector } from '../vector'; +import { BaseVector } from './base'; +import { vectorFromValuesWithType } from './index'; +import { BigInt64Array, BigUint64Array } from '../util/compat'; +import { toBigInt64Array, toBigUint64Array } from '../util/buffer'; +import { Uint8, Uint16, Uint32, Uint64, Int8, Int16, Int32, Int64 } from '../type'; +/** @ignore */ +export class IntVector extends BaseVector { + /** @nocollapse */ + static from(...args) { + let [input, is64bit = false] = args; + let ArrowType = vectorTypeToDataType(this, is64bit); + if ((input instanceof ArrayBuffer) || ArrayBuffer.isView(input)) { + let InputType = arrayTypeToDataType(input.constructor, is64bit) || ArrowType; + // Special case, infer the Arrow DataType from the input if calling the base + // IntVector.from with a TypedArray, e.g. `IntVector.from(new Int32Array())` + if (ArrowType === null) { + ArrowType = InputType; + } + // If the DataType inferred from the Vector constructor matches the + // DataType inferred from the input arguments, return zero-copy view + if (ArrowType && ArrowType === InputType) { + let type = new ArrowType(); + let length = input.byteLength / type.ArrayType.BYTES_PER_ELEMENT; + // If the ArrowType is 64bit but the input type is 32bit pairs, update the logical length + if (convert32To64Bit(ArrowType, input.constructor)) { + length *= 0.5; + } + return Vector.new(Data.Int(type, 0, length, 0, null, input)); + } + } + if (ArrowType) { + // If the DataType inferred from the Vector constructor is different than + // the DataType inferred from the input TypedArray, or if input isn't a + // TypedArray, use the Builders to construct the result Vector + return vectorFromValuesWithType(() => new ArrowType(), input); + } + if ((input instanceof DataView) || (input instanceof ArrayBuffer)) { + throw new TypeError(`Cannot infer integer type from instance of ${input.constructor.name}`); + } + throw new TypeError('Unrecognized IntVector input'); + } +} +/** @ignore */ +export class Int8Vector extends IntVector { +} +/** @ignore */ +export class Int16Vector extends IntVector { +} +/** @ignore */ +export class Int32Vector extends IntVector { +} +/** @ignore */ +export class Int64Vector extends IntVector { + toBigInt64Array() { + return toBigInt64Array(this.values); + } + get values64() { + return this._values64 || (this._values64 = this.toBigInt64Array()); + } +} +/** @ignore */ +export class Uint8Vector extends IntVector { +} +/** @ignore */ +export class Uint16Vector extends IntVector { +} +/** @ignore */ +export class Uint32Vector extends IntVector { +} +/** @ignore */ +export class Uint64Vector extends IntVector { + toBigUint64Array() { + return toBigUint64Array(this.values); + } + get values64() { + return this._values64 || (this._values64 = this.toBigUint64Array()); + } +} +const convert32To64Bit = (typeCtor, dataCtor) => { + return (typeCtor === Int64 || typeCtor === Uint64) && + (dataCtor === Int32Array || dataCtor === Uint32Array); +}; +/** @ignore */ +const arrayTypeToDataType = (ctor, is64bit) => { + switch (ctor) { + case Int8Array: return Int8; + case Int16Array: return Int16; + case Int32Array: return is64bit ? Int64 : Int32; + case BigInt64Array: return Int64; + case Uint8Array: return Uint8; + case Uint16Array: return Uint16; + case Uint32Array: return is64bit ? Uint64 : Uint32; + case BigUint64Array: return Uint64; + default: return null; + } +}; +/** @ignore */ +const vectorTypeToDataType = (ctor, is64bit) => { + switch (ctor) { + case Int8Vector: return Int8; + case Int16Vector: return Int16; + case Int32Vector: return is64bit ? Int64 : Int32; + case Int64Vector: return Int64; + case Uint8Vector: return Uint8; + case Uint16Vector: return Uint16; + case Uint32Vector: return is64bit ? Uint64 : Uint32; + case Uint64Vector: return Uint64; + default: return null; + } +}; + +//# sourceMappingURL=int.mjs.map diff --git a/frontend/node_modules/apache-arrow/vector/int.mjs.map b/frontend/node_modules/apache-arrow/vector/int.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..f72a5668cd91775bb19374a6568d2786c79c6a8d --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/int.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/int.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEnD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,gBAAg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AO,KAAK,CAAC;QAChC,KAAK,YAAY,CAAC,CAAC,OAAO,MAAM,CAAC;QACjC,KAAK,YAAY,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;QACpD,KAAK,YAAY,CAAC,CAAC,OAAO,MAAM,CAAC;QACjC,OAAO,CAAC,CAAC,OAAO,IAAI,CAAC;KACxB;AACL,CAAC,CAAC","file":"int.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Vector } from '../vector';\nimport { Chunked } from './chunked';\nimport { BaseVector } from './base';\nimport { VectorBuilderOptions } from './index';\nimport { vectorFromValuesWithType } from './index';\nimport { VectorBuilderOptionsAsync } from './index';\nimport { BigInt64Array, BigUint64Array } from '../util/compat';\nimport { toBigInt64Array, toBigUint64Array } from '../util/buffer';\nimport { Int, Uint8, Uint16, Uint32, Uint64, Int8, Int16, Int32, Int64, IntArray } from '../type';\nimport { VectorType as V, TypedArrayConstructor, BigIntArrayConstructor, BigIntArray } from '../interfaces';\n\n/** @ignore */\ntype IntVectorConstructors =\n typeof IntVector |\n typeof Int8Vector |\n typeof Int16Vector |\n typeof Int32Vector |\n typeof Uint8Vector |\n typeof Uint16Vector |\n typeof Uint32Vector |\n typeof Int64Vector |\n typeof Uint64Vector ;\n\n/** @ignore */\ntype FromInput =\n IntArray | BigIntArray |\n Iterable |\n AsyncIterable |\n VectorBuilderOptions |\n VectorBuilderOptionsAsync ;\n\n/** @ignore */\ntype FromArgs = [FromInput, boolean?];\n\n/** @ignore */\ntype IntArrayCtor = TypedArrayConstructor | BigIntArrayConstructor;\n\n/** @ignore */\nexport class IntVector extends BaseVector {\n\n // Guaranteed zero-copy variants\n public static from(this: typeof IntVector, input: Int8Array): Int8Vector;\n public static from(this: typeof IntVector, input: Int16Array): Int16Vector;\n public static from(this: typeof IntVector, input: Int32Array): Int32Vector;\n public static from(this: typeof IntVector, input: BigInt64Array): Int64Vector;\n public static from(this: typeof IntVector, input: Int32Array, is64bit: true): Int64Vector;\n public static from(this: typeof IntVector, input: Uint8Array): Uint8Vector;\n public static from(this: typeof IntVector, input: Uint16Array): Uint16Vector;\n public static from(this: typeof IntVector, input: Uint32Array): Uint32Vector;\n public static from(this: typeof IntVector, input: BigUint64Array): Uint64Vector;\n public static from(this: typeof IntVector, input: Uint32Array, is64bit: true): Uint64Vector;\n\n // Zero-copy if input is a TypedArray of the same type as the\n // Vector that from is called on, otherwise uses the Builders\n public static from(this: typeof Int8Vector, input: FromInput): Int8Vector;\n public static from(this: typeof Int16Vector, input: FromInput): Int16Vector;\n public static from(this: typeof Int32Vector, input: FromInput): Int32Vector;\n public static from(this: typeof Int64Vector, input: FromInput): Int64Vector;\n public static from(this: typeof Uint8Vector, input: FromInput): Uint8Vector;\n public static from(this: typeof Uint16Vector, input: FromInput): Uint16Vector;\n public static from(this: typeof Uint32Vector, input: FromInput): Uint32Vector;\n public static from(this: typeof Uint64Vector, input: FromInput): Uint64Vector;\n\n // Not zero-copy\n public static from(this: typeof IntVector, input: Iterable): V;\n public static from(this: typeof IntVector, input: AsyncIterable): Promise>;\n public static from(this: typeof IntVector, input: VectorBuilderOptions): Chunked;\n public static from(this: typeof IntVector, input: VectorBuilderOptionsAsync): Promise>;\n /** @nocollapse */\n public static from(this: IntVectorConstructors, ...args: FromArgs) {\n\n let [input, is64bit = false] = args;\n let ArrowType = vectorTypeToDataType(this, is64bit);\n\n if ((input instanceof ArrayBuffer) || ArrayBuffer.isView(input)) {\n let InputType = arrayTypeToDataType(input.constructor as IntArrayCtor, is64bit) || ArrowType;\n // Special case, infer the Arrow DataType from the input if calling the base\n // IntVector.from with a TypedArray, e.g. `IntVector.from(new Int32Array())`\n if (ArrowType === null) {\n ArrowType = InputType;\n }\n // If the DataType inferred from the Vector constructor matches the\n // DataType inferred from the input arguments, return zero-copy view\n if (ArrowType && ArrowType === InputType) {\n let type = new ArrowType();\n let length = input.byteLength / type.ArrayType.BYTES_PER_ELEMENT;\n // If the ArrowType is 64bit but the input type is 32bit pairs, update the logical length\n if (convert32To64Bit(ArrowType, input.constructor)) {\n length *= 0.5;\n }\n return Vector.new(Data.Int(type, 0, length, 0, null, input as IntArray));\n }\n }\n\n if (ArrowType) {\n // If the DataType inferred from the Vector constructor is different than\n // the DataType inferred from the input TypedArray, or if input isn't a\n // TypedArray, use the Builders to construct the result Vector\n return vectorFromValuesWithType(() => new ArrowType!() as T, input);\n }\n\n if ((input instanceof DataView) || (input instanceof ArrayBuffer)) {\n throw new TypeError(`Cannot infer integer type from instance of ${input.constructor.name}`);\n }\n\n throw new TypeError('Unrecognized IntVector input');\n }\n}\n\n/** @ignore */\nexport class Int8Vector extends IntVector {}\n/** @ignore */\nexport class Int16Vector extends IntVector {}\n/** @ignore */\nexport class Int32Vector extends IntVector {}\n/** @ignore */\nexport class Int64Vector extends IntVector {\n public toBigInt64Array() {\n return toBigInt64Array(this.values);\n }\n // @ts-ignore\n private _values64: BigInt64Array;\n public get values64(): BigInt64Array {\n return this._values64 || (this._values64 = this.toBigInt64Array());\n }\n}\n\n/** @ignore */\nexport class Uint8Vector extends IntVector {}\n/** @ignore */\nexport class Uint16Vector extends IntVector {}\n/** @ignore */\nexport class Uint32Vector extends IntVector {}\n/** @ignore */\nexport class Uint64Vector extends IntVector {\n public toBigUint64Array() {\n return toBigUint64Array(this.values);\n }\n // @ts-ignore\n private _values64: BigUint64Array;\n public get values64(): BigUint64Array {\n return this._values64 || (this._values64 = this.toBigUint64Array());\n }\n}\n\nconst convert32To64Bit = (typeCtor: any, dataCtor: any) => {\n return (typeCtor === Int64 || typeCtor === Uint64) &&\n (dataCtor === Int32Array || dataCtor === Uint32Array);\n};\n\n/** @ignore */\nconst arrayTypeToDataType = (ctor: IntArrayCtor, is64bit: boolean) => {\n switch (ctor) {\n case Int8Array: return Int8;\n case Int16Array: return Int16;\n case Int32Array: return is64bit ? Int64 : Int32;\n case BigInt64Array: return Int64;\n case Uint8Array: return Uint8;\n case Uint16Array: return Uint16;\n case Uint32Array: return is64bit ? Uint64 : Uint32;\n case BigUint64Array: return Uint64;\n default: return null;\n }\n};\n\n/** @ignore */\nconst vectorTypeToDataType = (ctor: IntVectorConstructors, is64bit: boolean) => {\n switch (ctor) {\n case Int8Vector: return Int8;\n case Int16Vector: return Int16;\n case Int32Vector: return is64bit ? Int64 : Int32;\n case Int64Vector: return Int64;\n case Uint8Vector: return Uint8;\n case Uint16Vector: return Uint16;\n case Uint32Vector: return is64bit ? Uint64 : Uint32;\n case Uint64Vector: return Uint64;\n default: return null;\n }\n};\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/interval.d.ts b/frontend/node_modules/apache-arrow/vector/interval.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..fe3ed4a64e609724089de406fed0b702d0751575 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/interval.d.ts @@ -0,0 +1,11 @@ +import { BaseVector } from './base'; +import { Interval, IntervalDayTime, IntervalYearMonth } from '../type'; +/** @ignore */ +export declare class IntervalVector extends BaseVector { +} +/** @ignore */ +export declare class IntervalDayTimeVector extends IntervalVector { +} +/** @ignore */ +export declare class IntervalYearMonthVector extends IntervalVector { +} diff --git a/frontend/node_modules/apache-arrow/vector/interval.js b/frontend/node_modules/apache-arrow/vector/interval.js new file mode 100644 index 0000000000000000000000000000000000000000..fa188d8bb516078af4f604fc7d2e5d915f59db60 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/interval.js @@ -0,0 +1,33 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const base_1 = require("./base"); +/** @ignore */ +class IntervalVector extends base_1.BaseVector { +} +exports.IntervalVector = IntervalVector; +/** @ignore */ +class IntervalDayTimeVector extends IntervalVector { +} +exports.IntervalDayTimeVector = IntervalDayTimeVector; +/** @ignore */ +class IntervalYearMonthVector extends IntervalVector { +} +exports.IntervalYearMonthVector = IntervalYearMonthVector; + +//# sourceMappingURL=interval.js.map diff --git a/frontend/node_modules/apache-arrow/vector/interval.js.map b/frontend/node_modules/apache-arrow/vector/interval.js.map new file mode 100644 index 0000000000000000000000000000000000000000..5c0acd2e4606b16dbefd09380e154f749c94962b --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/interval.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/interval.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,iCAAoC;AAGpC,cAAc;AACd,MAAa,cAA8C,SAAQ,iBAAa;CAAG;AAAnF,wCAAmF;AACnF,cAAc;AACd,MAAa,qBAAsB,SAAQ,cAA+B;CAAG;AAA7E,sDAA6E;AAC7E,cAAc;AACd,MAAa,uBAAwB,SAAQ,cAAiC;CAAG;AAAjF,0DAAiF","file":"interval.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { BaseVector } from './base';\nimport { Interval, IntervalDayTime, IntervalYearMonth } from '../type';\n\n/** @ignore */\nexport class IntervalVector extends BaseVector {}\n/** @ignore */\nexport class IntervalDayTimeVector extends IntervalVector {}\n/** @ignore */\nexport class IntervalYearMonthVector extends IntervalVector {}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/interval.mjs b/frontend/node_modules/apache-arrow/vector/interval.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c98f0550e53c6cea770226bc220ddc6e6e44b2ed --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/interval.mjs @@ -0,0 +1,28 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { BaseVector } from './base'; +/** @ignore */ +export class IntervalVector extends BaseVector { +} +/** @ignore */ +export class IntervalDayTimeVector extends IntervalVector { +} +/** @ignore */ +export class IntervalYearMonthVector extends IntervalVector { +} + +//# sourceMappingURL=interval.mjs.map diff --git a/frontend/node_modules/apache-arrow/vector/interval.mjs.map b/frontend/node_modules/apache-arrow/vector/interval.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..663a26869b6d46f1802934c9e552761a92e66eba --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/interval.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/interval.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAGpC,cAAc;AACd,MAAM,OAAO,cAA8C,SAAQ,UAAa;CAAG;AACnF,cAAc;AACd,MAAM,OAAO,qBAAsB,SAAQ,cAA+B;CAAG;AAC7E,cAAc;AACd,MAAM,OAAO,uBAAwB,SAAQ,cAAiC;CAAG","file":"interval.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { BaseVector } from './base';\nimport { Interval, IntervalDayTime, IntervalYearMonth } from '../type';\n\n/** @ignore */\nexport class IntervalVector extends BaseVector {}\n/** @ignore */\nexport class IntervalDayTimeVector extends IntervalVector {}\n/** @ignore */\nexport class IntervalYearMonthVector extends IntervalVector {}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/list.d.ts b/frontend/node_modules/apache-arrow/vector/list.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..46e8f2e9d3867b4982a951bef03d7e64960750ec --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/list.d.ts @@ -0,0 +1,5 @@ +import { BaseVector } from './base'; +import { DataType, List } from '../type'; +/** @ignore */ +export declare class ListVector extends BaseVector> { +} diff --git a/frontend/node_modules/apache-arrow/vector/list.js b/frontend/node_modules/apache-arrow/vector/list.js new file mode 100644 index 0000000000000000000000000000000000000000..a5fbc0c7a86ed1c4bc561facfea72048c80dc48d --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/list.js @@ -0,0 +1,25 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const base_1 = require("./base"); +/** @ignore */ +class ListVector extends base_1.BaseVector { +} +exports.ListVector = ListVector; + +//# sourceMappingURL=list.js.map diff --git a/frontend/node_modules/apache-arrow/vector/list.js.map b/frontend/node_modules/apache-arrow/vector/list.js.map new file mode 100644 index 0000000000000000000000000000000000000000..12599361dd0169945f71f1cae8a39b881e6f7c8b --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/list.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/list.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,iCAAoC;AAGpC,cAAc;AACd,MAAa,UAAqC,SAAQ,iBAAmB;CAAG;AAAhF,gCAAgF","file":"list.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { BaseVector } from './base';\nimport { DataType, List } from '../type';\n\n/** @ignore */\nexport class ListVector extends BaseVector> {}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/list.mjs b/frontend/node_modules/apache-arrow/vector/list.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d5c56261c990166b08d704b3c97d67003cc8b733 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/list.mjs @@ -0,0 +1,22 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { BaseVector } from './base'; +/** @ignore */ +export class ListVector extends BaseVector { +} + +//# sourceMappingURL=list.mjs.map diff --git a/frontend/node_modules/apache-arrow/vector/list.mjs.map b/frontend/node_modules/apache-arrow/vector/list.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..d36d29fae609679587c3355428e18ced3fa98314 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/list.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/list.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAGpC,cAAc;AACd,MAAM,OAAO,UAAqC,SAAQ,UAAmB;CAAG","file":"list.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { BaseVector } from './base';\nimport { DataType, List } from '../type';\n\n/** @ignore */\nexport class ListVector extends BaseVector> {}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/map.d.ts b/frontend/node_modules/apache-arrow/vector/map.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..cd17cb36c22874278c0a5fc0c5b99eec98434296 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/map.d.ts @@ -0,0 +1,10 @@ +import { BaseVector } from './base'; +import { DataType, Map_, Struct } from '../type'; +/** @ignore */ +export declare class MapVector extends BaseVector> { + asList(): import("./list").ListVector>; + bind(index: number): Map_['TValue']; +} diff --git a/frontend/node_modules/apache-arrow/vector/map.js b/frontend/node_modules/apache-arrow/vector/map.js new file mode 100644 index 0000000000000000000000000000000000000000..80183e12b251413921f3fc78065158307382134d --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/map.js @@ -0,0 +1,37 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const row_1 = require("./row"); +const vector_1 = require("../vector"); +const base_1 = require("./base"); +const type_1 = require("../type"); +/** @ignore */ +class MapVector extends base_1.BaseVector { + asList() { + const child = this.type.children[0]; + return vector_1.Vector.new(this.data.clone(new type_1.List(child))); + } + bind(index) { + const child = this.getChildAt(0); + const { [index]: begin, [index + 1]: end } = this.valueOffsets; + return new row_1.MapRow(child.slice(begin, end)); + } +} +exports.MapVector = MapVector; + +//# sourceMappingURL=map.js.map diff --git a/frontend/node_modules/apache-arrow/vector/map.js.map b/frontend/node_modules/apache-arrow/vector/map.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f307988cba904f9bb310d3aaf06351b33680086e --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/map.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/map.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,+BAA+B;AAE/B,sCAAmC;AACnC,iCAAoC;AACpC,kCAAuD;AAEvD,cAAc;AACd,MAAa,SAA8D,SAAQ,iBAAsB;IAC9F,MAAM;QACT,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAwC,CAAC;QAC3E,OAAO,eAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,WAAI,CAA+B,KAAK,CAAC,CAAC,CAAC,CAAC;IACtF,CAAC;IACM,IAAI,CAAC,KAAa;QACrB,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAA+B,CAAC,CAAC,CAAC;QAC/D,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC;QAC/D,OAAO,IAAI,YAAM,CAAC,KAAM,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;IAChD,CAAC;CACJ;AAVD,8BAUC","file":"map.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { MapRow } from './row';\nimport { Field } from '../schema';\nimport { Vector } from '../vector';\nimport { BaseVector } from './base';\nimport { DataType, Map_, Struct, List } from '../type';\n\n/** @ignore */\nexport class MapVector extends BaseVector> {\n public asList() {\n const child = this.type.children[0] as Field>;\n return Vector.new(this.data.clone(new List>(child)));\n }\n public bind(index: number): Map_['TValue'] {\n const child = this.getChildAt>(0);\n const { [index]: begin, [index + 1]: end } = this.valueOffsets;\n return new MapRow(child!.slice(begin, end));\n }\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/map.mjs b/frontend/node_modules/apache-arrow/vector/map.mjs new file mode 100644 index 0000000000000000000000000000000000000000..da700dc68be28dd77c56fb27777080ecd67dc261 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/map.mjs @@ -0,0 +1,34 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { MapRow } from './row'; +import { Vector } from '../vector'; +import { BaseVector } from './base'; +import { List } from '../type'; +/** @ignore */ +export class MapVector extends BaseVector { + asList() { + const child = this.type.children[0]; + return Vector.new(this.data.clone(new List(child))); + } + bind(index) { + const child = this.getChildAt(0); + const { [index]: begin, [index + 1]: end } = this.valueOffsets; + return new MapRow(child.slice(begin, end)); + } +} + +//# sourceMappingURL=map.mjs.map diff --git a/frontend/node_modules/apache-arrow/vector/map.mjs.map b/frontend/node_modules/apache-arrow/vector/map.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..23ec5488d99b035ffaa628ba05b2f797aad09fa9 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/map.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/map.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAA0B,IAAI,EAAE,MAAM,SAAS,CAAC;AAEvD,cAAc;AACd,MAAM,OAAO,SAA8D,SAAQ,UAAsB;IAC9F,MAAM;QACT,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAwC,CAAC;QAC3E,OAAO,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,CAA+B,KAAK,CAAC,CAAC,CAAC,CAAC;IACtF,CAAC;IACM,IAAI,CAAC,KAAa;QACrB,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAA+B,CAAC,CAAC,CAAC;QAC/D,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC;QAC/D,OAAO,IAAI,MAAM,CAAC,KAAM,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;IAChD,CAAC;CACJ","file":"map.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { MapRow } from './row';\nimport { Field } from '../schema';\nimport { Vector } from '../vector';\nimport { BaseVector } from './base';\nimport { DataType, Map_, Struct, List } from '../type';\n\n/** @ignore */\nexport class MapVector extends BaseVector> {\n public asList() {\n const child = this.type.children[0] as Field>;\n return Vector.new(this.data.clone(new List>(child)));\n }\n public bind(index: number): Map_['TValue'] {\n const child = this.getChildAt>(0);\n const { [index]: begin, [index + 1]: end } = this.valueOffsets;\n return new MapRow(child!.slice(begin, end));\n }\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/null.d.ts b/frontend/node_modules/apache-arrow/vector/null.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9826ff52b21ec363f5a7d1fa34c39b73e2f87961 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/null.d.ts @@ -0,0 +1,5 @@ +import { Null } from '../type'; +import { BaseVector } from './base'; +/** @ignore */ +export declare class NullVector extends BaseVector { +} diff --git a/frontend/node_modules/apache-arrow/vector/null.js b/frontend/node_modules/apache-arrow/vector/null.js new file mode 100644 index 0000000000000000000000000000000000000000..560ed41694e3b927632b50fe15610c18ddf5ead3 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/null.js @@ -0,0 +1,25 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const base_1 = require("./base"); +/** @ignore */ +class NullVector extends base_1.BaseVector { +} +exports.NullVector = NullVector; + +//# sourceMappingURL=null.js.map diff --git a/frontend/node_modules/apache-arrow/vector/null.js.map b/frontend/node_modules/apache-arrow/vector/null.js.map new file mode 100644 index 0000000000000000000000000000000000000000..28140fc59418b78354370eb8063d3e633a8b58d2 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/null.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/null.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAGrB,iCAAoC;AAEpC,cAAc;AACd,MAAa,UAAW,SAAQ,iBAAgB;CAAG;AAAnD,gCAAmD","file":"null.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Null } from '../type';\nimport { BaseVector } from './base';\n\n/** @ignore */\nexport class NullVector extends BaseVector {}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/null.mjs b/frontend/node_modules/apache-arrow/vector/null.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f52829cc0b3cccafd4391c4c46afaa28a4cdf33d --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/null.mjs @@ -0,0 +1,22 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { BaseVector } from './base'; +/** @ignore */ +export class NullVector extends BaseVector { +} + +//# sourceMappingURL=null.mjs.map diff --git a/frontend/node_modules/apache-arrow/vector/null.mjs.map b/frontend/node_modules/apache-arrow/vector/null.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..0fa865fce3aff1901cdcd1471f5a8e7ba0f8750d --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/null.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/null.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAGrB,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,cAAc;AACd,MAAM,OAAO,UAAW,SAAQ,UAAgB;CAAG","file":"null.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Null } from '../type';\nimport { BaseVector } from './base';\n\n/** @ignore */\nexport class NullVector extends BaseVector {}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/row.d.ts b/frontend/node_modules/apache-arrow/vector/row.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..089f03105d7f5afdcc7a6678a474036e4ae6ffd8 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/row.d.ts @@ -0,0 +1,61 @@ +import { Vector } from '../vector'; +import { StructVector } from './struct'; +import { DataType, Struct } from '../type'; +/** @ignore */ declare const kParent: unique symbol; +/** @ignore */ declare const kRowIndex: unique symbol; +/** @ignore */ declare const kKeyToIdx: unique symbol; +/** @ignore */ declare const kIdxToVal: unique symbol; +/** @ignore */ declare const kCustomInspect: unique symbol; +declare abstract class Row implements Map { + readonly size: number; + readonly [Symbol.toStringTag]: string; + protected [kRowIndex]: number; + protected [kParent]: Vector; + protected [kKeyToIdx]: Map; + protected [kIdxToVal]: V[]; + constructor(parent: Vector, numKeys: number); + abstract keys(): IterableIterator; + abstract values(): IterableIterator; + abstract getKey(idx: number): K; + abstract getIndex(key: K): number; + abstract getValue(idx: number): V; + abstract setValue(idx: number, val: V): void; + entries(): IterableIterator<[K, V]>; + has(key: K): boolean; + get(key: K): V | undefined; + set(key: K, val: V): this; + clear(): void; + delete(_: K): boolean; + [Symbol.iterator](): IterableIterator<[K, V]>; + forEach(callbackfn: (value: V, key: K, map: Map) => void, thisArg?: any): void; + toArray(): V[]; + toJSON(): any; + inspect(): string; + [kCustomInspect](): string; + toString(): string; + protected static [Symbol.toStringTag]: string; +} +export declare class MapRow extends Row { + constructor(slice: Vector>); + keys(): IterableIterator; + values(): IterableIterator; + getKey(idx: number): K['TValue']; + getIndex(key: K['TValue']): number; + getValue(index: number): V['TValue'] | null; + setValue(index: number, value: V['TValue'] | null): void; +} +export declare class StructRow extends Row { + constructor(parent: StructVector); + keys(): IterableIterator; + values(): IterableIterator; + getKey(idx: number): keyof T; + getIndex(key: keyof T): number; + getValue(index: number): T[keyof T]['TValue'] | null; + setValue(index: number, value: T[keyof T]['TValue'] | null): void; +} +export {}; diff --git a/frontend/node_modules/apache-arrow/vector/row.js b/frontend/node_modules/apache-arrow/vector/row.js new file mode 100644 index 0000000000000000000000000000000000000000..7e80c9c056364ae9d50489be1e34964b51c166ea --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/row.js @@ -0,0 +1,345 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const pretty_1 = require("../util/pretty"); +/** @ignore */ const kParent = Symbol.for('parent'); +/** @ignore */ const kRowIndex = Symbol.for('rowIndex'); +/** @ignore */ const kKeyToIdx = Symbol.for('keyToIdx'); +/** @ignore */ const kIdxToVal = Symbol.for('idxToVal'); +/** @ignore */ const kCustomInspect = Symbol.for('nodejs.util.inspect.custom'); +class Row { + constructor(parent, numKeys) { + this[kParent] = parent; + this.size = numKeys; + } + entries() { return this[Symbol.iterator](); } + has(key) { return this.get(key) !== undefined; } + get(key) { + let val = undefined; + if (key !== null && key !== undefined) { + const ktoi = this[kKeyToIdx] || (this[kKeyToIdx] = new Map()); + let idx = ktoi.get(key); + if (idx !== undefined) { + const itov = this[kIdxToVal] || (this[kIdxToVal] = new Array(this.size)); + ((val = itov[idx]) !== undefined) || (itov[idx] = val = this.getValue(idx)); + } + else if ((idx = this.getIndex(key)) > -1) { + ktoi.set(key, idx); + const itov = this[kIdxToVal] || (this[kIdxToVal] = new Array(this.size)); + ((val = itov[idx]) !== undefined) || (itov[idx] = val = this.getValue(idx)); + } + } + return val; + } + set(key, val) { + if (key !== null && key !== undefined) { + const ktoi = this[kKeyToIdx] || (this[kKeyToIdx] = new Map()); + let idx = ktoi.get(key); + if (idx === undefined) { + ktoi.set(key, idx = this.getIndex(key)); + } + if (idx > -1) { + const itov = this[kIdxToVal] || (this[kIdxToVal] = new Array(this.size)); + itov[idx] = this.setValue(idx, val); + } + } + return this; + } + clear() { throw new Error(`Clearing ${this[Symbol.toStringTag]} not supported.`); } + delete(_) { throw new Error(`Deleting ${this[Symbol.toStringTag]} values not supported.`); } + *[Symbol.iterator]() { + const ki = this.keys(); + const vi = this.values(); + const ktoi = this[kKeyToIdx] || (this[kKeyToIdx] = new Map()); + const itov = this[kIdxToVal] || (this[kIdxToVal] = new Array(this.size)); + for (let k, v, i = 0, kr, vr; !((kr = ki.next()).done || (vr = vi.next()).done); ++i) { + k = kr.value; + v = vr.value; + itov[i] = v; + ktoi.has(k) || ktoi.set(k, i); + yield [k, v]; + } + } + forEach(callbackfn, thisArg) { + const ki = this.keys(); + const vi = this.values(); + const callback = thisArg === undefined ? callbackfn : + (v, k, m) => callbackfn.call(thisArg, v, k, m); + const ktoi = this[kKeyToIdx] || (this[kKeyToIdx] = new Map()); + const itov = this[kIdxToVal] || (this[kIdxToVal] = new Array(this.size)); + for (let k, v, i = 0, kr, vr; !((kr = ki.next()).done || (vr = vi.next()).done); ++i) { + k = kr.value; + v = vr.value; + itov[i] = v; + ktoi.has(k) || ktoi.set(k, i); + callback(v, k, this); + } + } + toArray() { return [...this.values()]; } + toJSON() { + const obj = {}; + this.forEach((val, key) => obj[key] = val); + return obj; + } + inspect() { return this.toString(); } + [kCustomInspect]() { return this.toString(); } + toString() { + const str = []; + this.forEach((val, key) => { + key = pretty_1.valueToString(key); + val = pretty_1.valueToString(val); + str.push(`${key}: ${val}`); + }); + return `{ ${str.join(', ')} }`; + } +} +Row[Symbol.toStringTag] = ((proto) => { + Object.defineProperties(proto, { + 'size': { writable: true, enumerable: false, configurable: false, value: 0 }, + [kParent]: { writable: true, enumerable: false, configurable: false, value: null }, + [kRowIndex]: { writable: true, enumerable: false, configurable: false, value: -1 }, + }); + return proto[Symbol.toStringTag] = 'Row'; +})(Row.prototype); +class MapRow extends Row { + constructor(slice) { + super(slice, slice.length); + return createRowProxy(this); + } + keys() { + return this[kParent].getChildAt(0)[Symbol.iterator](); + } + values() { + return this[kParent].getChildAt(1)[Symbol.iterator](); + } + getKey(idx) { + return this[kParent].getChildAt(0).get(idx); + } + getIndex(key) { + return this[kParent].getChildAt(0).indexOf(key); + } + getValue(index) { + return this[kParent].getChildAt(1).get(index); + } + setValue(index, value) { + this[kParent].getChildAt(1).set(index, value); + } +} +exports.MapRow = MapRow; +class StructRow extends Row { + constructor(parent) { + super(parent, parent.type.children.length); + return defineRowProxyProperties(this); + } + *keys() { + for (const field of this[kParent].type.children) { + yield field.name; + } + } + *values() { + for (const field of this[kParent].type.children) { + yield this[field.name]; + } + } + getKey(idx) { + return this[kParent].type.children[idx].name; + } + getIndex(key) { + return this[kParent].type.children.findIndex((f) => f.name === key); + } + getValue(index) { + return this[kParent].getChildAt(index).get(this[kRowIndex]); + } + setValue(index, value) { + return this[kParent].getChildAt(index).set(this[kRowIndex], value); + } +} +exports.StructRow = StructRow; +Object.setPrototypeOf(Row.prototype, Map.prototype); +/** @ignore */ +const defineRowProxyProperties = (() => { + const desc = { enumerable: true, configurable: false, get: null, set: null }; + return (row) => { + let idx = -1, ktoi = row[kKeyToIdx] || (row[kKeyToIdx] = new Map()); + const getter = (key) => function () { return this.get(key); }; + const setter = (key) => function (val) { return this.set(key, val); }; + for (const key of row.keys()) { + ktoi.set(key, ++idx); + desc.get = getter(key); + desc.set = setter(key); + row.hasOwnProperty(key) || (desc.enumerable = true, Object.defineProperty(row, key, desc)); + row.hasOwnProperty(idx) || (desc.enumerable = false, Object.defineProperty(row, idx, desc)); + } + desc.get = desc.set = null; + return row; + }; +})(); +/** @ignore */ +const createRowProxy = (() => { + if (typeof Proxy === 'undefined') { + return defineRowProxyProperties; + } + const has = Row.prototype.has; + const get = Row.prototype.get; + const set = Row.prototype.set; + const getKey = Row.prototype.getKey; + const RowProxyHandler = { + isExtensible() { return false; }, + deleteProperty() { return false; }, + preventExtensions() { return true; }, + ownKeys(row) { return [...row.keys()].map((x) => `${x}`); }, + has(row, key) { + switch (key) { + case 'getKey': + case 'getIndex': + case 'getValue': + case 'setValue': + case 'toArray': + case 'toJSON': + case 'inspect': + case 'constructor': + case 'isPrototypeOf': + case 'propertyIsEnumerable': + case 'toString': + case 'toLocaleString': + case 'valueOf': + case 'size': + case 'has': + case 'get': + case 'set': + case 'clear': + case 'delete': + case 'keys': + case 'values': + case 'entries': + case 'forEach': + case '__proto__': + case '__defineGetter__': + case '__defineSetter__': + case 'hasOwnProperty': + case '__lookupGetter__': + case '__lookupSetter__': + case Symbol.iterator: + case Symbol.toStringTag: + case kParent: + case kRowIndex: + case kIdxToVal: + case kKeyToIdx: + case kCustomInspect: + return true; + } + if (typeof key === 'number' && !row.has(key)) { + key = row.getKey(key); + } + return row.has(key); + }, + get(row, key, receiver) { + switch (key) { + case 'getKey': + case 'getIndex': + case 'getValue': + case 'setValue': + case 'toArray': + case 'toJSON': + case 'inspect': + case 'constructor': + case 'isPrototypeOf': + case 'propertyIsEnumerable': + case 'toString': + case 'toLocaleString': + case 'valueOf': + case 'size': + case 'has': + case 'get': + case 'set': + case 'clear': + case 'delete': + case 'keys': + case 'values': + case 'entries': + case 'forEach': + case '__proto__': + case '__defineGetter__': + case '__defineSetter__': + case 'hasOwnProperty': + case '__lookupGetter__': + case '__lookupSetter__': + case Symbol.iterator: + case Symbol.toStringTag: + case kParent: + case kRowIndex: + case kIdxToVal: + case kKeyToIdx: + case kCustomInspect: + return Reflect.get(row, key, receiver); + } + if (typeof key === 'number' && !has.call(receiver, key)) { + key = getKey.call(receiver, key); + } + return get.call(receiver, key); + }, + set(row, key, val, receiver) { + switch (key) { + case kParent: + case kRowIndex: + case kIdxToVal: + case kKeyToIdx: + return Reflect.set(row, key, val, receiver); + case 'getKey': + case 'getIndex': + case 'getValue': + case 'setValue': + case 'toArray': + case 'toJSON': + case 'inspect': + case 'constructor': + case 'isPrototypeOf': + case 'propertyIsEnumerable': + case 'toString': + case 'toLocaleString': + case 'valueOf': + case 'size': + case 'has': + case 'get': + case 'set': + case 'clear': + case 'delete': + case 'keys': + case 'values': + case 'entries': + case 'forEach': + case '__proto__': + case '__defineGetter__': + case '__defineSetter__': + case 'hasOwnProperty': + case '__lookupGetter__': + case '__lookupSetter__': + case Symbol.iterator: + case Symbol.toStringTag: + return false; + } + if (typeof key === 'number' && !has.call(receiver, key)) { + key = getKey.call(receiver, key); + } + return has.call(receiver, key) ? !!set.call(receiver, key, val) : false; + }, + }; + return (row) => new Proxy(row, RowProxyHandler); +})(); + +//# sourceMappingURL=row.js.map diff --git a/frontend/node_modules/apache-arrow/vector/row.js.map b/frontend/node_modules/apache-arrow/vector/row.js.map new file mode 100644 index 0000000000000000000000000000000000000000..9a288772a235f6587b03c16372a11079204ba8f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AAQ,CAAC;gBAAC,KAAK,MAAM,CAAC;gBAAC,KAAK,QAAQ,CAAC;gBAAC,KAAK,SAAS,CAAC;gBAAC,KAAK,SAAS,CAAC;gBACzI,KAAK,WAAW,CAAC;gBAAC,KAAK,kBAAkB,CAAC;gBAAC,KAAK,kBAAkB,CAAC;gBAAC,KAAK,gBAAgB,CAAC;gBAAC,KAAK,kBAAkB,CAAC;gBAAC,KAAK,kBAAkB,CAAC;gBAC5I,KAAK,MAAM,CAAC,QAAQ,CAAC;gBAAC,KAAK,MAAM,CAAC,WAAW;oBACzC,OAAO,KAAK,CAAC;aACpB;YACD,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE;gBACrD,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;aACpC;YACD,OAAO,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QAC5E,CAAC;KACJ,CAAC;IACF,OAAO,CAAgB,GAAM,EAAE,EAAE,CAAC,IAAI,KAAK,CAAC,GAAG,EAAE,eAAe,CAAM,CAAC;AAC3E,CAAC,CAAC,EAAE,CAAC","file":"row.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Vector } from '../vector';\nimport { StructVector } from './struct';\nimport { valueToString } from '../util/pretty';\nimport { DataType, Struct, RowLike } from '../type';\n\n/** @ignore */ const kParent = Symbol.for('parent');\n/** @ignore */ const kRowIndex = Symbol.for('rowIndex');\n/** @ignore */ const kKeyToIdx = Symbol.for('keyToIdx');\n/** @ignore */ const kIdxToVal = Symbol.for('idxToVal');\n/** @ignore */ const kCustomInspect = Symbol.for('nodejs.util.inspect.custom');\n\nabstract class Row implements Map {\n\n public readonly size: number;\n public readonly [Symbol.toStringTag]: string;\n\n protected [kRowIndex]: number;\n protected [kParent]: Vector;\n protected [kKeyToIdx]: Map;\n protected [kIdxToVal]: V[];\n\n constructor(parent: Vector, numKeys: number) {\n this[kParent] = parent;\n this.size = numKeys;\n }\n\n public abstract keys(): IterableIterator;\n public abstract values(): IterableIterator;\n public abstract getKey(idx: number): K;\n public abstract getIndex(key: K): number;\n public abstract getValue(idx: number): V;\n public abstract setValue(idx: number, val: V): void;\n\n public entries() { return this[Symbol.iterator](); }\n\n public has(key: K) { return this.get(key) !== undefined; }\n\n public get(key: K) {\n let val = undefined;\n if (key !== null && key !== undefined) {\n const ktoi = this[kKeyToIdx] || (this[kKeyToIdx] = new Map());\n let idx = ktoi.get(key);\n if (idx !== undefined) {\n const itov = this[kIdxToVal] || (this[kIdxToVal] = new Array(this.size));\n ((val = itov[idx]) !== undefined) || (itov[idx] = val = this.getValue(idx));\n } else if ((idx = this.getIndex(key)) > -1) {\n ktoi.set(key, idx);\n const itov = this[kIdxToVal] || (this[kIdxToVal] = new Array(this.size));\n ((val = itov[idx]) !== undefined) || (itov[idx] = val = this.getValue(idx));\n }\n }\n return val;\n }\n\n public set(key: K, val: V) {\n if (key !== null && key !== undefined) {\n const ktoi = this[kKeyToIdx] || (this[kKeyToIdx] = new Map());\n let idx = ktoi.get(key);\n if (idx === undefined) {\n ktoi.set(key, idx = this.getIndex(key));\n }\n if (idx > -1) {\n const itov = this[kIdxToVal] || (this[kIdxToVal] = new Array(this.size));\n itov[idx] = this.setValue(idx, val);\n }\n }\n return this;\n }\n\n public clear(): void { throw new Error(`Clearing ${this[Symbol.toStringTag]} not supported.`); }\n\n public delete(_: K): boolean { throw new Error(`Deleting ${this[Symbol.toStringTag]} values not supported.`); }\n\n public *[Symbol.iterator](): IterableIterator<[K, V]> {\n\n const ki = this.keys();\n const vi = this.values();\n const ktoi = this[kKeyToIdx] || (this[kKeyToIdx] = new Map());\n const itov = this[kIdxToVal] || (this[kIdxToVal] = new Array(this.size));\n\n for (let k: K, v: V, i = 0, kr: IteratorResult, vr: IteratorResult;\n !((kr = ki.next()).done || (vr = vi.next()).done);\n ++i\n ) {\n k = kr.value;\n v = vr.value;\n itov[i] = v;\n ktoi.has(k) || ktoi.set(k, i);\n yield [k, v];\n }\n }\n\n public forEach(callbackfn: (value: V, key: K, map: Map) => void, thisArg?: any): void {\n\n const ki = this.keys();\n const vi = this.values();\n const callback = thisArg === undefined ? callbackfn :\n (v: V, k: K, m: Map) => callbackfn.call(thisArg, v, k, m);\n const ktoi = this[kKeyToIdx] || (this[kKeyToIdx] = new Map());\n const itov = this[kIdxToVal] || (this[kIdxToVal] = new Array(this.size));\n\n for (let k: K, v: V, i = 0, kr: IteratorResult, vr: IteratorResult;\n !((kr = ki.next()).done || (vr = vi.next()).done);\n ++i\n ) {\n k = kr.value;\n v = vr.value;\n itov[i] = v;\n ktoi.has(k) || ktoi.set(k, i);\n callback(v, k, this);\n }\n }\n\n public toArray() { return [...this.values()]; }\n public toJSON() {\n const obj = {} as any;\n this.forEach((val, key) => obj[key] = val);\n return obj;\n }\n\n public inspect() { return this.toString(); }\n public [kCustomInspect]() { return this.toString(); }\n public toString() {\n const str: string[] = [];\n this.forEach((val, key) => {\n key = valueToString(key);\n val = valueToString(val);\n str.push(`${key}: ${val}`);\n });\n return `{ ${str.join(', ')} }`;\n }\n\n protected static [Symbol.toStringTag] = ((proto: Row) => {\n Object.defineProperties(proto, {\n 'size': { writable: true, enumerable: false, configurable: false, value: 0 },\n [kParent]: { writable: true, enumerable: false, configurable: false, value: null },\n [kRowIndex]: { writable: true, enumerable: false, configurable: false, value: -1 },\n });\n return (proto as any)[Symbol.toStringTag] = 'Row';\n })(Row.prototype);\n}\n\nexport class MapRow extends Row {\n constructor(slice: Vector>) {\n super(slice, slice.length);\n return createRowProxy(this);\n }\n public keys() {\n return this[kParent].getChildAt(0)![Symbol.iterator]();\n }\n public values() {\n return this[kParent].getChildAt(1)![Symbol.iterator]();\n }\n public getKey(idx: number): K['TValue'] {\n return this[kParent].getChildAt(0)!.get(idx);\n }\n public getIndex(key: K['TValue']): number {\n return this[kParent].getChildAt(0)!.indexOf(key);\n }\n public getValue(index: number): V['TValue'] | null {\n return this[kParent].getChildAt(1)!.get(index);\n }\n public setValue(index: number, value: V['TValue'] | null): void {\n this[kParent].getChildAt(1)!.set(index, value);\n }\n}\n\nexport class StructRow extends Row {\n constructor(parent: StructVector) {\n super(parent, parent.type.children.length);\n return defineRowProxyProperties(this);\n }\n public *keys() {\n for (const field of this[kParent].type.children) {\n yield field.name as keyof T;\n }\n }\n public *values() {\n for (const field of this[kParent].type.children) {\n yield (this as RowLike)[field.name];\n }\n }\n public getKey(idx: number): keyof T {\n return this[kParent].type.children[idx].name as keyof T;\n }\n public getIndex(key: keyof T): number {\n return this[kParent].type.children.findIndex((f) => f.name === key);\n }\n public getValue(index: number): T[keyof T]['TValue'] | null {\n return this[kParent].getChildAt(index)!.get(this[kRowIndex]);\n }\n public setValue(index: number, value: T[keyof T]['TValue'] | null): void {\n return this[kParent].getChildAt(index)!.set(this[kRowIndex], value);\n }\n}\n\nObject.setPrototypeOf(Row.prototype, Map.prototype);\n\n/** @ignore */\nconst defineRowProxyProperties = (() => {\n const desc = { enumerable: true, configurable: false, get: null as any, set: null as any };\n return (row: T) => {\n let idx = -1, ktoi = row[kKeyToIdx] || (row[kKeyToIdx] = new Map());\n const getter = (key: any) => function(this: T) { return this.get(key); };\n const setter = (key: any) => function(this: T, val: any) { return this.set(key, val); };\n for (const key of row.keys()) {\n ktoi.set(key, ++idx);\n desc.get = getter(key);\n desc.set = setter(key);\n row.hasOwnProperty(key) || (desc.enumerable = true, Object.defineProperty(row, key, desc));\n row.hasOwnProperty(idx) || (desc.enumerable = false, Object.defineProperty(row, idx, desc));\n }\n desc.get = desc.set = null;\n return row;\n };\n})();\n\n/** @ignore */\nconst createRowProxy = (() => {\n if (typeof Proxy === 'undefined') {\n return defineRowProxyProperties;\n }\n const has = Row.prototype.has;\n const get = Row.prototype.get;\n const set = Row.prototype.set;\n const getKey = Row.prototype.getKey;\n const RowProxyHandler: ProxyHandler = {\n isExtensible() { return false; },\n deleteProperty() { return false; },\n preventExtensions() { return true; },\n ownKeys(row: Row) { return [...row.keys()].map((x) => `${x}`); },\n has(row: Row, key: PropertyKey) {\n switch (key) {\n case 'getKey': case 'getIndex': case 'getValue': case 'setValue': case 'toArray': case 'toJSON': case 'inspect':\n case 'constructor': case 'isPrototypeOf': case 'propertyIsEnumerable': case 'toString': case 'toLocaleString': case 'valueOf':\n case 'size': case 'has': case 'get': case 'set': case 'clear': case 'delete': case 'keys': case 'values': case 'entries': case 'forEach':\n case '__proto__': case '__defineGetter__': case '__defineSetter__': case 'hasOwnProperty': case '__lookupGetter__': case '__lookupSetter__':\n case Symbol.iterator: case Symbol.toStringTag: case kParent: case kRowIndex: case kIdxToVal: case kKeyToIdx: case kCustomInspect:\n return true;\n }\n if (typeof key === 'number' && !row.has(key)) {\n key = row.getKey(key);\n }\n return row.has(key);\n },\n get(row: Row, key: PropertyKey, receiver: any) {\n switch (key) {\n case 'getKey': case 'getIndex': case 'getValue': case 'setValue': case 'toArray': case 'toJSON': case 'inspect':\n case 'constructor': case 'isPrototypeOf': case 'propertyIsEnumerable': case 'toString': case 'toLocaleString': case 'valueOf':\n case 'size': case 'has': case 'get': case 'set': case 'clear': case 'delete': case 'keys': case 'values': case 'entries': case 'forEach':\n case '__proto__': case '__defineGetter__': case '__defineSetter__': case 'hasOwnProperty': case '__lookupGetter__': case '__lookupSetter__':\n case Symbol.iterator: case Symbol.toStringTag: case kParent: case kRowIndex: case kIdxToVal: case kKeyToIdx: case kCustomInspect:\n return Reflect.get(row, key, receiver);\n }\n if (typeof key === 'number' && !has.call(receiver, key)) {\n key = getKey.call(receiver, key);\n }\n return get.call(receiver, key);\n },\n set(row: Row, key: PropertyKey, val: any, receiver: any) {\n switch (key) {\n case kParent: case kRowIndex: case kIdxToVal: case kKeyToIdx:\n return Reflect.set(row, key, val, receiver);\n case 'getKey': case 'getIndex': case 'getValue': case 'setValue': case 'toArray': case 'toJSON': case 'inspect':\n case 'constructor': case 'isPrototypeOf': case 'propertyIsEnumerable': case 'toString': case 'toLocaleString': case 'valueOf':\n case 'size': case 'has': case 'get': case 'set': case 'clear': case 'delete': case 'keys': case 'values': case 'entries': case 'forEach':\n case '__proto__': case '__defineGetter__': case '__defineSetter__': case 'hasOwnProperty': case '__lookupGetter__': case '__lookupSetter__':\n case Symbol.iterator: case Symbol.toStringTag:\n return false;\n }\n if (typeof key === 'number' && !has.call(receiver, key)) {\n key = getKey.call(receiver, key);\n }\n return has.call(receiver, key) ? !!set.call(receiver, key, val) : false;\n },\n };\n return (row: T) => new Proxy(row, RowProxyHandler) as T;\n})();\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/row.mjs b/frontend/node_modules/apache-arrow/vector/row.mjs new file mode 100644 index 0000000000000000000000000000000000000000..6264d20ff5bcc808bd09ebe287dcd26b89fe113d --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/row.mjs @@ -0,0 +1,341 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { valueToString } from '../util/pretty'; +/** @ignore */ const kParent = Symbol.for('parent'); +/** @ignore */ const kRowIndex = Symbol.for('rowIndex'); +/** @ignore */ const kKeyToIdx = Symbol.for('keyToIdx'); +/** @ignore */ const kIdxToVal = Symbol.for('idxToVal'); +/** @ignore */ const kCustomInspect = Symbol.for('nodejs.util.inspect.custom'); +class Row { + constructor(parent, numKeys) { + this[kParent] = parent; + this.size = numKeys; + } + entries() { return this[Symbol.iterator](); } + has(key) { return this.get(key) !== undefined; } + get(key) { + let val = undefined; + if (key !== null && key !== undefined) { + const ktoi = this[kKeyToIdx] || (this[kKeyToIdx] = new Map()); + let idx = ktoi.get(key); + if (idx !== undefined) { + const itov = this[kIdxToVal] || (this[kIdxToVal] = new Array(this.size)); + ((val = itov[idx]) !== undefined) || (itov[idx] = val = this.getValue(idx)); + } + else if ((idx = this.getIndex(key)) > -1) { + ktoi.set(key, idx); + const itov = this[kIdxToVal] || (this[kIdxToVal] = new Array(this.size)); + ((val = itov[idx]) !== undefined) || (itov[idx] = val = this.getValue(idx)); + } + } + return val; + } + set(key, val) { + if (key !== null && key !== undefined) { + const ktoi = this[kKeyToIdx] || (this[kKeyToIdx] = new Map()); + let idx = ktoi.get(key); + if (idx === undefined) { + ktoi.set(key, idx = this.getIndex(key)); + } + if (idx > -1) { + const itov = this[kIdxToVal] || (this[kIdxToVal] = new Array(this.size)); + itov[idx] = this.setValue(idx, val); + } + } + return this; + } + clear() { throw new Error(`Clearing ${this[Symbol.toStringTag]} not supported.`); } + delete(_) { throw new Error(`Deleting ${this[Symbol.toStringTag]} values not supported.`); } + *[Symbol.iterator]() { + const ki = this.keys(); + const vi = this.values(); + const ktoi = this[kKeyToIdx] || (this[kKeyToIdx] = new Map()); + const itov = this[kIdxToVal] || (this[kIdxToVal] = new Array(this.size)); + for (let k, v, i = 0, kr, vr; !((kr = ki.next()).done || (vr = vi.next()).done); ++i) { + k = kr.value; + v = vr.value; + itov[i] = v; + ktoi.has(k) || ktoi.set(k, i); + yield [k, v]; + } + } + forEach(callbackfn, thisArg) { + const ki = this.keys(); + const vi = this.values(); + const callback = thisArg === undefined ? callbackfn : + (v, k, m) => callbackfn.call(thisArg, v, k, m); + const ktoi = this[kKeyToIdx] || (this[kKeyToIdx] = new Map()); + const itov = this[kIdxToVal] || (this[kIdxToVal] = new Array(this.size)); + for (let k, v, i = 0, kr, vr; !((kr = ki.next()).done || (vr = vi.next()).done); ++i) { + k = kr.value; + v = vr.value; + itov[i] = v; + ktoi.has(k) || ktoi.set(k, i); + callback(v, k, this); + } + } + toArray() { return [...this.values()]; } + toJSON() { + const obj = {}; + this.forEach((val, key) => obj[key] = val); + return obj; + } + inspect() { return this.toString(); } + [kCustomInspect]() { return this.toString(); } + toString() { + const str = []; + this.forEach((val, key) => { + key = valueToString(key); + val = valueToString(val); + str.push(`${key}: ${val}`); + }); + return `{ ${str.join(', ')} }`; + } +} +Row[Symbol.toStringTag] = ((proto) => { + Object.defineProperties(proto, { + 'size': { writable: true, enumerable: false, configurable: false, value: 0 }, + [kParent]: { writable: true, enumerable: false, configurable: false, value: null }, + [kRowIndex]: { writable: true, enumerable: false, configurable: false, value: -1 }, + }); + return proto[Symbol.toStringTag] = 'Row'; +})(Row.prototype); +export class MapRow extends Row { + constructor(slice) { + super(slice, slice.length); + return createRowProxy(this); + } + keys() { + return this[kParent].getChildAt(0)[Symbol.iterator](); + } + values() { + return this[kParent].getChildAt(1)[Symbol.iterator](); + } + getKey(idx) { + return this[kParent].getChildAt(0).get(idx); + } + getIndex(key) { + return this[kParent].getChildAt(0).indexOf(key); + } + getValue(index) { + return this[kParent].getChildAt(1).get(index); + } + setValue(index, value) { + this[kParent].getChildAt(1).set(index, value); + } +} +export class StructRow extends Row { + constructor(parent) { + super(parent, parent.type.children.length); + return defineRowProxyProperties(this); + } + *keys() { + for (const field of this[kParent].type.children) { + yield field.name; + } + } + *values() { + for (const field of this[kParent].type.children) { + yield this[field.name]; + } + } + getKey(idx) { + return this[kParent].type.children[idx].name; + } + getIndex(key) { + return this[kParent].type.children.findIndex((f) => f.name === key); + } + getValue(index) { + return this[kParent].getChildAt(index).get(this[kRowIndex]); + } + setValue(index, value) { + return this[kParent].getChildAt(index).set(this[kRowIndex], value); + } +} +Object.setPrototypeOf(Row.prototype, Map.prototype); +/** @ignore */ +const defineRowProxyProperties = (() => { + const desc = { enumerable: true, configurable: false, get: null, set: null }; + return (row) => { + let idx = -1, ktoi = row[kKeyToIdx] || (row[kKeyToIdx] = new Map()); + const getter = (key) => function () { return this.get(key); }; + const setter = (key) => function (val) { return this.set(key, val); }; + for (const key of row.keys()) { + ktoi.set(key, ++idx); + desc.get = getter(key); + desc.set = setter(key); + row.hasOwnProperty(key) || (desc.enumerable = true, Object.defineProperty(row, key, desc)); + row.hasOwnProperty(idx) || (desc.enumerable = false, Object.defineProperty(row, idx, desc)); + } + desc.get = desc.set = null; + return row; + }; +})(); +/** @ignore */ +const createRowProxy = (() => { + if (typeof Proxy === 'undefined') { + return defineRowProxyProperties; + } + const has = Row.prototype.has; + const get = Row.prototype.get; + const set = Row.prototype.set; + const getKey = Row.prototype.getKey; + const RowProxyHandler = { + isExtensible() { return false; }, + deleteProperty() { return false; }, + preventExtensions() { return true; }, + ownKeys(row) { return [...row.keys()].map((x) => `${x}`); }, + has(row, key) { + switch (key) { + case 'getKey': + case 'getIndex': + case 'getValue': + case 'setValue': + case 'toArray': + case 'toJSON': + case 'inspect': + case 'constructor': + case 'isPrototypeOf': + case 'propertyIsEnumerable': + case 'toString': + case 'toLocaleString': + case 'valueOf': + case 'size': + case 'has': + case 'get': + case 'set': + case 'clear': + case 'delete': + case 'keys': + case 'values': + case 'entries': + case 'forEach': + case '__proto__': + case '__defineGetter__': + case '__defineSetter__': + case 'hasOwnProperty': + case '__lookupGetter__': + case '__lookupSetter__': + case Symbol.iterator: + case Symbol.toStringTag: + case kParent: + case kRowIndex: + case kIdxToVal: + case kKeyToIdx: + case kCustomInspect: + return true; + } + if (typeof key === 'number' && !row.has(key)) { + key = row.getKey(key); + } + return row.has(key); + }, + get(row, key, receiver) { + switch (key) { + case 'getKey': + case 'getIndex': + case 'getValue': + case 'setValue': + case 'toArray': + case 'toJSON': + case 'inspect': + case 'constructor': + case 'isPrototypeOf': + case 'propertyIsEnumerable': + case 'toString': + case 'toLocaleString': + case 'valueOf': + case 'size': + case 'has': + case 'get': + case 'set': + case 'clear': + case 'delete': + case 'keys': + case 'values': + case 'entries': + case 'forEach': + case '__proto__': + case '__defineGetter__': + case '__defineSetter__': + case 'hasOwnProperty': + case '__lookupGetter__': + case '__lookupSetter__': + case Symbol.iterator: + case Symbol.toStringTag: + case kParent: + case kRowIndex: + case kIdxToVal: + case kKeyToIdx: + case kCustomInspect: + return Reflect.get(row, key, receiver); + } + if (typeof key === 'number' && !has.call(receiver, key)) { + key = getKey.call(receiver, key); + } + return get.call(receiver, key); + }, + set(row, key, val, receiver) { + switch (key) { + case kParent: + case kRowIndex: + case kIdxToVal: + case kKeyToIdx: + return Reflect.set(row, key, val, receiver); + case 'getKey': + case 'getIndex': + case 'getValue': + case 'setValue': + case 'toArray': + case 'toJSON': + case 'inspect': + case 'constructor': + case 'isPrototypeOf': + case 'propertyIsEnumerable': + case 'toString': + case 'toLocaleString': + case 'valueOf': + case 'size': + case 'has': + case 'get': + case 'set': + case 'clear': + case 'delete': + case 'keys': + case 'values': + case 'entries': + case 'forEach': + case '__proto__': + case '__defineGetter__': + case '__defineSetter__': + case 'hasOwnProperty': + case '__lookupGetter__': + case '__lookupSetter__': + case Symbol.iterator: + case Symbol.toStringTag: + return false; + } + if (typeof key === 'number' && !has.call(receiver, key)) { + key = getKey.call(receiver, key); + } + return has.call(receiver, key) ? !!set.call(receiver, key, val) : false; + }, + }; + return (row) => new Proxy(row, RowProxyHandler); +})(); + +//# sourceMappingURL=row.mjs.map diff --git a/frontend/node_modules/apache-arrow/vector/row.mjs.map b/frontend/node_modules/apache-arrow/vector/row.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..6c47abc474f84880c67675d039223ddc0c45bfc6 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/row.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/row.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAIrB,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAG/C,cAAc,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACpD,cAAc,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AACxD,cAAc,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AACxD,cAAc,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AACxD,cAAc,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;AAE/E,MAAe,GAAG;IAUd,YAAY,MAAsB,EAAE,OAAe;QAC/C,IAAI,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC;IACxB,CAAC;IASM,OAAO,KAAK,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;IAE7C,GAAG,CAAC,GAAM,IAAI,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,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K,SAAS,CAAC;gBAC9H,KAAK,MAAM,CAAC;gBAAC,KAAK,KAAK,CAAC;gBAAC,KAAK,KAAK,CAAC;gBAAC,KAAK,KAAK,CAAC;gBAAC,KAAK,OAAO,CAAC;gBAAC,KAAK,QAAQ,CAAC;gBAAC,KAAK,MAAM,CAAC;gBAAC,KAAK,QAAQ,CAAC;gBAAC,KAAK,SAAS,CAAC;gBAAC,KAAK,SAAS,CAAC;gBACzI,KAAK,WAAW,CAAC;gBAAC,KAAK,kBAAkB,CAAC;gBAAC,KAAK,kBAAkB,CAAC;gBAAC,KAAK,gBAAgB,CAAC;gBAAC,KAAK,kBAAkB,CAAC;gBAAC,KAAK,kBAAkB,CAAC;gBAC5I,KAAK,MAAM,CAAC,QAAQ,CAAC;gBAAC,KAAK,MAAM,CAAC,WAAW;oBACzC,OAAO,KAAK,CAAC;aACpB;YACD,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE;gBACrD,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;aACpC;YACD,OAAO,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QAC5E,CAAC;KACJ,CAAC;IACF,OAAO,CAAgB,GAAM,EAAE,EAAE,CAAC,IAAI,KAAK,CAAC,GAAG,EAAE,eAAe,CAAM,CAAC;AAC3E,CAAC,CAAC,EAAE,CAAC","file":"row.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Vector } from '../vector';\nimport { StructVector } from './struct';\nimport { valueToString } from '../util/pretty';\nimport { DataType, Struct, RowLike } from '../type';\n\n/** @ignore */ const kParent = Symbol.for('parent');\n/** @ignore */ const kRowIndex = Symbol.for('rowIndex');\n/** @ignore */ const kKeyToIdx = Symbol.for('keyToIdx');\n/** @ignore */ const kIdxToVal = Symbol.for('idxToVal');\n/** @ignore */ const kCustomInspect = Symbol.for('nodejs.util.inspect.custom');\n\nabstract class Row implements Map {\n\n public readonly size: number;\n public readonly [Symbol.toStringTag]: string;\n\n protected [kRowIndex]: number;\n protected [kParent]: Vector;\n protected [kKeyToIdx]: Map;\n protected [kIdxToVal]: V[];\n\n constructor(parent: Vector, numKeys: number) {\n this[kParent] = parent;\n this.size = numKeys;\n }\n\n public abstract keys(): IterableIterator;\n public abstract values(): IterableIterator;\n public abstract getKey(idx: number): K;\n public abstract getIndex(key: K): number;\n public abstract getValue(idx: number): V;\n public abstract setValue(idx: number, val: V): void;\n\n public entries() { return this[Symbol.iterator](); }\n\n public has(key: K) { return this.get(key) !== undefined; }\n\n public get(key: K) {\n let val = undefined;\n if (key !== null && key !== undefined) {\n const ktoi = this[kKeyToIdx] || (this[kKeyToIdx] = new Map());\n let idx = ktoi.get(key);\n if (idx !== undefined) {\n const itov = this[kIdxToVal] || (this[kIdxToVal] = new Array(this.size));\n ((val = itov[idx]) !== undefined) || (itov[idx] = val = this.getValue(idx));\n } else if ((idx = this.getIndex(key)) > -1) {\n ktoi.set(key, idx);\n const itov = this[kIdxToVal] || (this[kIdxToVal] = new Array(this.size));\n ((val = itov[idx]) !== undefined) || (itov[idx] = val = this.getValue(idx));\n }\n }\n return val;\n }\n\n public set(key: K, val: V) {\n if (key !== null && key !== undefined) {\n const ktoi = this[kKeyToIdx] || (this[kKeyToIdx] = new Map());\n let idx = ktoi.get(key);\n if (idx === undefined) {\n ktoi.set(key, idx = this.getIndex(key));\n }\n if (idx > -1) {\n const itov = this[kIdxToVal] || (this[kIdxToVal] = new Array(this.size));\n itov[idx] = this.setValue(idx, val);\n }\n }\n return this;\n }\n\n public clear(): void { throw new Error(`Clearing ${this[Symbol.toStringTag]} not supported.`); }\n\n public delete(_: K): boolean { throw new Error(`Deleting ${this[Symbol.toStringTag]} values not supported.`); }\n\n public *[Symbol.iterator](): IterableIterator<[K, V]> {\n\n const ki = this.keys();\n const vi = this.values();\n const ktoi = this[kKeyToIdx] || (this[kKeyToIdx] = new Map());\n const itov = this[kIdxToVal] || (this[kIdxToVal] = new Array(this.size));\n\n for (let k: K, v: V, i = 0, kr: IteratorResult, vr: IteratorResult;\n !((kr = ki.next()).done || (vr = vi.next()).done);\n ++i\n ) {\n k = kr.value;\n v = vr.value;\n itov[i] = v;\n ktoi.has(k) || ktoi.set(k, i);\n yield [k, v];\n }\n }\n\n public forEach(callbackfn: (value: V, key: K, map: Map) => void, thisArg?: any): void {\n\n const ki = this.keys();\n const vi = this.values();\n const callback = thisArg === undefined ? callbackfn :\n (v: V, k: K, m: Map) => callbackfn.call(thisArg, v, k, m);\n const ktoi = this[kKeyToIdx] || (this[kKeyToIdx] = new Map());\n const itov = this[kIdxToVal] || (this[kIdxToVal] = new Array(this.size));\n\n for (let k: K, v: V, i = 0, kr: IteratorResult, vr: IteratorResult;\n !((kr = ki.next()).done || (vr = vi.next()).done);\n ++i\n ) {\n k = kr.value;\n v = vr.value;\n itov[i] = v;\n ktoi.has(k) || ktoi.set(k, i);\n callback(v, k, this);\n }\n }\n\n public toArray() { return [...this.values()]; }\n public toJSON() {\n const obj = {} as any;\n this.forEach((val, key) => obj[key] = val);\n return obj;\n }\n\n public inspect() { return this.toString(); }\n public [kCustomInspect]() { return this.toString(); }\n public toString() {\n const str: string[] = [];\n this.forEach((val, key) => {\n key = valueToString(key);\n val = valueToString(val);\n str.push(`${key}: ${val}`);\n });\n return `{ ${str.join(', ')} }`;\n }\n\n protected static [Symbol.toStringTag] = ((proto: Row) => {\n Object.defineProperties(proto, {\n 'size': { writable: true, enumerable: false, configurable: false, value: 0 },\n [kParent]: { writable: true, enumerable: false, configurable: false, value: null },\n [kRowIndex]: { writable: true, enumerable: false, configurable: false, value: -1 },\n });\n return (proto as any)[Symbol.toStringTag] = 'Row';\n })(Row.prototype);\n}\n\nexport class MapRow extends Row {\n constructor(slice: Vector>) {\n super(slice, slice.length);\n return createRowProxy(this);\n }\n public keys() {\n return this[kParent].getChildAt(0)![Symbol.iterator]();\n }\n public values() {\n return this[kParent].getChildAt(1)![Symbol.iterator]();\n }\n public getKey(idx: number): K['TValue'] {\n return this[kParent].getChildAt(0)!.get(idx);\n }\n public getIndex(key: K['TValue']): number {\n return this[kParent].getChildAt(0)!.indexOf(key);\n }\n public getValue(index: number): V['TValue'] | null {\n return this[kParent].getChildAt(1)!.get(index);\n }\n public setValue(index: number, value: V['TValue'] | null): void {\n this[kParent].getChildAt(1)!.set(index, value);\n }\n}\n\nexport class StructRow extends Row {\n constructor(parent: StructVector) {\n super(parent, parent.type.children.length);\n return defineRowProxyProperties(this);\n }\n public *keys() {\n for (const field of this[kParent].type.children) {\n yield field.name as keyof T;\n }\n }\n public *values() {\n for (const field of this[kParent].type.children) {\n yield (this as RowLike)[field.name];\n }\n }\n public getKey(idx: number): keyof T {\n return this[kParent].type.children[idx].name as keyof T;\n }\n public getIndex(key: keyof T): number {\n return this[kParent].type.children.findIndex((f) => f.name === key);\n }\n public getValue(index: number): T[keyof T]['TValue'] | null {\n return this[kParent].getChildAt(index)!.get(this[kRowIndex]);\n }\n public setValue(index: number, value: T[keyof T]['TValue'] | null): void {\n return this[kParent].getChildAt(index)!.set(this[kRowIndex], value);\n }\n}\n\nObject.setPrototypeOf(Row.prototype, Map.prototype);\n\n/** @ignore */\nconst defineRowProxyProperties = (() => {\n const desc = { enumerable: true, configurable: false, get: null as any, set: null as any };\n return (row: T) => {\n let idx = -1, ktoi = row[kKeyToIdx] || (row[kKeyToIdx] = new Map());\n const getter = (key: any) => function(this: T) { return this.get(key); };\n const setter = (key: any) => function(this: T, val: any) { return this.set(key, val); };\n for (const key of row.keys()) {\n ktoi.set(key, ++idx);\n desc.get = getter(key);\n desc.set = setter(key);\n row.hasOwnProperty(key) || (desc.enumerable = true, Object.defineProperty(row, key, desc));\n row.hasOwnProperty(idx) || (desc.enumerable = false, Object.defineProperty(row, idx, desc));\n }\n desc.get = desc.set = null;\n return row;\n };\n})();\n\n/** @ignore */\nconst createRowProxy = (() => {\n if (typeof Proxy === 'undefined') {\n return defineRowProxyProperties;\n }\n const has = Row.prototype.has;\n const get = Row.prototype.get;\n const set = Row.prototype.set;\n const getKey = Row.prototype.getKey;\n const RowProxyHandler: ProxyHandler = {\n isExtensible() { return false; },\n deleteProperty() { return false; },\n preventExtensions() { return true; },\n ownKeys(row: Row) { return [...row.keys()].map((x) => `${x}`); },\n has(row: Row, key: PropertyKey) {\n switch (key) {\n case 'getKey': case 'getIndex': case 'getValue': case 'setValue': case 'toArray': case 'toJSON': case 'inspect':\n case 'constructor': case 'isPrototypeOf': case 'propertyIsEnumerable': case 'toString': case 'toLocaleString': case 'valueOf':\n case 'size': case 'has': case 'get': case 'set': case 'clear': case 'delete': case 'keys': case 'values': case 'entries': case 'forEach':\n case '__proto__': case '__defineGetter__': case '__defineSetter__': case 'hasOwnProperty': case '__lookupGetter__': case '__lookupSetter__':\n case Symbol.iterator: case Symbol.toStringTag: case kParent: case kRowIndex: case kIdxToVal: case kKeyToIdx: case kCustomInspect:\n return true;\n }\n if (typeof key === 'number' && !row.has(key)) {\n key = row.getKey(key);\n }\n return row.has(key);\n },\n get(row: Row, key: PropertyKey, receiver: any) {\n switch (key) {\n case 'getKey': case 'getIndex': case 'getValue': case 'setValue': case 'toArray': case 'toJSON': case 'inspect':\n case 'constructor': case 'isPrototypeOf': case 'propertyIsEnumerable': case 'toString': case 'toLocaleString': case 'valueOf':\n case 'size': case 'has': case 'get': case 'set': case 'clear': case 'delete': case 'keys': case 'values': case 'entries': case 'forEach':\n case '__proto__': case '__defineGetter__': case '__defineSetter__': case 'hasOwnProperty': case '__lookupGetter__': case '__lookupSetter__':\n case Symbol.iterator: case Symbol.toStringTag: case kParent: case kRowIndex: case kIdxToVal: case kKeyToIdx: case kCustomInspect:\n return Reflect.get(row, key, receiver);\n }\n if (typeof key === 'number' && !has.call(receiver, key)) {\n key = getKey.call(receiver, key);\n }\n return get.call(receiver, key);\n },\n set(row: Row, key: PropertyKey, val: any, receiver: any) {\n switch (key) {\n case kParent: case kRowIndex: case kIdxToVal: case kKeyToIdx:\n return Reflect.set(row, key, val, receiver);\n case 'getKey': case 'getIndex': case 'getValue': case 'setValue': case 'toArray': case 'toJSON': case 'inspect':\n case 'constructor': case 'isPrototypeOf': case 'propertyIsEnumerable': case 'toString': case 'toLocaleString': case 'valueOf':\n case 'size': case 'has': case 'get': case 'set': case 'clear': case 'delete': case 'keys': case 'values': case 'entries': case 'forEach':\n case '__proto__': case '__defineGetter__': case '__defineSetter__': case 'hasOwnProperty': case '__lookupGetter__': case '__lookupSetter__':\n case Symbol.iterator: case Symbol.toStringTag:\n return false;\n }\n if (typeof key === 'number' && !has.call(receiver, key)) {\n key = getKey.call(receiver, key);\n }\n return has.call(receiver, key) ? !!set.call(receiver, key, val) : false;\n },\n };\n return (row: T) => new Proxy(row, RowProxyHandler) as T;\n})();\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/struct.d.ts b/frontend/node_modules/apache-arrow/vector/struct.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d72e89f1aefdd416c59d90ef07719451541f6c8a --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/struct.d.ts @@ -0,0 +1,9 @@ +import { BaseVector } from './base'; +import { DataType, Struct } from '../type'; +/** @ignore */ +export declare class StructVector extends BaseVector> { + private _row; + bind(index: number): Struct['TValue']; +} diff --git a/frontend/node_modules/apache-arrow/vector/struct.js b/frontend/node_modules/apache-arrow/vector/struct.js new file mode 100644 index 0000000000000000000000000000000000000000..fa8680c0aa55252dc62a403650c85ec88b7eabbd --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/struct.js @@ -0,0 +1,33 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const row_1 = require("./row"); +const base_1 = require("./base"); +/** @ignore */ const kRowIndex = Symbol.for('rowIndex'); +/** @ignore */ +class StructVector extends base_1.BaseVector { + bind(index) { + const proto = this._row || (this._row = new row_1.StructRow(this)); + const bound = Object.create(proto); + bound[kRowIndex] = index; + return bound; + } +} +exports.StructVector = StructVector; + +//# sourceMappingURL=struct.js.map diff --git a/frontend/node_modules/apache-arrow/vector/struct.js.map b/frontend/node_modules/apache-arrow/vector/struct.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a354ee26bbbf2b2adf8fb3ff8993b1a4f5af55ac --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/struct.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/struct.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,+BAAkC;AAClC,iCAAoC;AAGpC,cAAc,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AACxD,cAAc;AACd,MAAa,YAA0D,SAAQ,iBAAqB;IAGzF,IAAI,CAAC,KAAa;QACrB,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,eAAS,CAAI,IAAI,CAAC,CAAC,CAAC;QAChE,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACnC,KAAK,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC;QACzB,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ;AATD,oCASC","file":"struct.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { StructRow } from './row';\nimport { BaseVector } from './base';\nimport { DataType, Struct } from '../type';\n\n/** @ignore */ const kRowIndex = Symbol.for('rowIndex');\n/** @ignore */\nexport class StructVector extends BaseVector> {\n // @ts-ignore\n private _row: StructRow;\n public bind(index: number): Struct['TValue'] {\n const proto = this._row || (this._row = new StructRow(this));\n const bound = Object.create(proto);\n bound[kRowIndex] = index;\n return bound;\n }\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/struct.mjs b/frontend/node_modules/apache-arrow/vector/struct.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d96e9a3969114e8ae11eef460d1532a9bc3da655 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/struct.mjs @@ -0,0 +1,30 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { StructRow } from './row'; +import { BaseVector } from './base'; +/** @ignore */ const kRowIndex = Symbol.for('rowIndex'); +/** @ignore */ +export class StructVector extends BaseVector { + bind(index) { + const proto = this._row || (this._row = new StructRow(this)); + const bound = Object.create(proto); + bound[kRowIndex] = index; + return bound; + } +} + +//# sourceMappingURL=struct.mjs.map diff --git a/frontend/node_modules/apache-arrow/vector/struct.mjs.map b/frontend/node_modules/apache-arrow/vector/struct.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..4c02bbccd087a96d887c24677b29d7562ee762c8 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/struct.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/struct.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAGpC,cAAc,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AACxD,cAAc;AACd,MAAM,OAAO,YAA0D,SAAQ,UAAqB;IAGzF,IAAI,CAAC,KAAa;QACrB,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,SAAS,CAAI,IAAI,CAAC,CAAC,CAAC;QAChE,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACnC,KAAK,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC;QACzB,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ","file":"struct.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { StructRow } from './row';\nimport { BaseVector } from './base';\nimport { DataType, Struct } from '../type';\n\n/** @ignore */ const kRowIndex = Symbol.for('rowIndex');\n/** @ignore */\nexport class StructVector extends BaseVector> {\n // @ts-ignore\n private _row: StructRow;\n public bind(index: number): Struct['TValue'] {\n const proto = this._row || (this._row = new StructRow(this));\n const bound = Object.create(proto);\n bound[kRowIndex] = index;\n return bound;\n }\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/time.d.ts b/frontend/node_modules/apache-arrow/vector/time.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b9b92d0e54244dd9ac12313b8834b36a0447e5fa --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/time.d.ts @@ -0,0 +1,17 @@ +import { BaseVector } from './base'; +import { Time, TimeSecond, TimeMillisecond, TimeMicrosecond, TimeNanosecond } from '../type'; +/** @ignore */ +export declare class TimeVector extends BaseVector { +} +/** @ignore */ +export declare class TimeSecondVector extends TimeVector { +} +/** @ignore */ +export declare class TimeMillisecondVector extends TimeVector { +} +/** @ignore */ +export declare class TimeMicrosecondVector extends TimeVector { +} +/** @ignore */ +export declare class TimeNanosecondVector extends TimeVector { +} diff --git a/frontend/node_modules/apache-arrow/vector/time.js b/frontend/node_modules/apache-arrow/vector/time.js new file mode 100644 index 0000000000000000000000000000000000000000..776ec7b654cf406619633da58bcfabc7b5db0fb7 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/time.js @@ -0,0 +1,41 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const base_1 = require("./base"); +/** @ignore */ +class TimeVector extends base_1.BaseVector { +} +exports.TimeVector = TimeVector; +/** @ignore */ +class TimeSecondVector extends TimeVector { +} +exports.TimeSecondVector = TimeSecondVector; +/** @ignore */ +class TimeMillisecondVector extends TimeVector { +} +exports.TimeMillisecondVector = TimeMillisecondVector; +/** @ignore */ +class TimeMicrosecondVector extends TimeVector { +} +exports.TimeMicrosecondVector = TimeMicrosecondVector; +/** @ignore */ +class TimeNanosecondVector extends TimeVector { +} +exports.TimeNanosecondVector = TimeNanosecondVector; + +//# sourceMappingURL=time.js.map diff --git a/frontend/node_modules/apache-arrow/vector/time.js.map b/frontend/node_modules/apache-arrow/vector/time.js.map new file mode 100644 index 0000000000000000000000000000000000000000..dd9df583486d9bbbe2edb892c315dbd3045fd725 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/time.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/time.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,iCAAoC;AAGpC,cAAc;AACd,MAAa,UAAkC,SAAQ,iBAAa;CAAG;AAAvE,gCAAuE;AACvE,cAAc;AACd,MAAa,gBAAiB,SAAQ,UAAsB;CAAG;AAA/D,4CAA+D;AAC/D,cAAc;AACd,MAAa,qBAAsB,SAAQ,UAA2B;CAAG;AAAzE,sDAAyE;AACzE,cAAc;AACd,MAAa,qBAAsB,SAAQ,UAA2B;CAAG;AAAzE,sDAAyE;AACzE,cAAc;AACd,MAAa,oBAAqB,SAAQ,UAA0B;CAAG;AAAvE,oDAAuE","file":"time.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { BaseVector } from './base';\nimport { Time, TimeSecond, TimeMillisecond, TimeMicrosecond, TimeNanosecond } from '../type';\n\n/** @ignore */\nexport class TimeVector extends BaseVector {}\n/** @ignore */\nexport class TimeSecondVector extends TimeVector {}\n/** @ignore */\nexport class TimeMillisecondVector extends TimeVector {}\n/** @ignore */\nexport class TimeMicrosecondVector extends TimeVector {}\n/** @ignore */\nexport class TimeNanosecondVector extends TimeVector {}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/time.mjs b/frontend/node_modules/apache-arrow/vector/time.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b9f59d2137ed5033c82a615508deb9eb0d815160 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/time.mjs @@ -0,0 +1,34 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { BaseVector } from './base'; +/** @ignore */ +export class TimeVector extends BaseVector { +} +/** @ignore */ +export class TimeSecondVector extends TimeVector { +} +/** @ignore */ +export class TimeMillisecondVector extends TimeVector { +} +/** @ignore */ +export class TimeMicrosecondVector extends TimeVector { +} +/** @ignore */ +export class TimeNanosecondVector extends TimeVector { +} + +//# sourceMappingURL=time.mjs.map diff --git a/frontend/node_modules/apache-arrow/vector/time.mjs.map b/frontend/node_modules/apache-arrow/vector/time.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..b2af1d5b27827c0f6c99564c05aa7e116fb62509 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/time.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/time.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAGpC,cAAc;AACd,MAAM,OAAO,UAAkC,SAAQ,UAAa;CAAG;AACvE,cAAc;AACd,MAAM,OAAO,gBAAiB,SAAQ,UAAsB;CAAG;AAC/D,cAAc;AACd,MAAM,OAAO,qBAAsB,SAAQ,UAA2B;CAAG;AACzE,cAAc;AACd,MAAM,OAAO,qBAAsB,SAAQ,UAA2B;CAAG;AACzE,cAAc;AACd,MAAM,OAAO,oBAAqB,SAAQ,UAA0B;CAAG","file":"time.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { BaseVector } from './base';\nimport { Time, TimeSecond, TimeMillisecond, TimeMicrosecond, TimeNanosecond } from '../type';\n\n/** @ignore */\nexport class TimeVector extends BaseVector {}\n/** @ignore */\nexport class TimeSecondVector extends TimeVector {}\n/** @ignore */\nexport class TimeMillisecondVector extends TimeVector {}\n/** @ignore */\nexport class TimeMicrosecondVector extends TimeVector {}\n/** @ignore */\nexport class TimeNanosecondVector extends TimeVector {}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/timestamp.d.ts b/frontend/node_modules/apache-arrow/vector/timestamp.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..cc81562667995f41d04d6dfe0df6896fbbc999f3 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/timestamp.d.ts @@ -0,0 +1,17 @@ +import { BaseVector } from './base'; +import { Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond } from '../type'; +/** @ignore */ +export declare class TimestampVector extends BaseVector { +} +/** @ignore */ +export declare class TimestampSecondVector extends TimestampVector { +} +/** @ignore */ +export declare class TimestampMillisecondVector extends TimestampVector { +} +/** @ignore */ +export declare class TimestampMicrosecondVector extends TimestampVector { +} +/** @ignore */ +export declare class TimestampNanosecondVector extends TimestampVector { +} diff --git a/frontend/node_modules/apache-arrow/vector/timestamp.js b/frontend/node_modules/apache-arrow/vector/timestamp.js new file mode 100644 index 0000000000000000000000000000000000000000..cd06327096ad8902356797ef03938b2d45577dc9 --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/timestamp.js @@ -0,0 +1,41 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const base_1 = require("./base"); +/** @ignore */ +class TimestampVector extends base_1.BaseVector { +} +exports.TimestampVector = TimestampVector; +/** @ignore */ +class TimestampSecondVector extends TimestampVector { +} +exports.TimestampSecondVector = TimestampSecondVector; +/** @ignore */ +class TimestampMillisecondVector extends TimestampVector { +} +exports.TimestampMillisecondVector = TimestampMillisecondVector; +/** @ignore */ +class TimestampMicrosecondVector extends TimestampVector { +} +exports.TimestampMicrosecondVector = TimestampMicrosecondVector; +/** @ignore */ +class TimestampNanosecondVector extends TimestampVector { +} +exports.TimestampNanosecondVector = TimestampNanosecondVector; + +//# sourceMappingURL=timestamp.js.map diff --git a/frontend/node_modules/apache-arrow/vector/timestamp.js.map b/frontend/node_modules/apache-arrow/vector/timestamp.js.map new file mode 100644 index 0000000000000000000000000000000000000000..b8abd421026dbde682071225c9081a7e62f806ec --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/timestamp.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/timestamp.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,iCAAoC;AAGpC,cAAc;AACd,MAAa,eAAiD,SAAQ,iBAAa;CAAG;AAAtF,0CAAsF;AACtF,cAAc;AACd,MAAa,qBAAsB,SAAQ,eAAgC;CAAG;AAA9E,sDAA8E;AAC9E,cAAc;AACd,MAAa,0BAA2B,SAAQ,eAAqC;CAAG;AAAxF,gEAAwF;AACxF,cAAc;AACd,MAAa,0BAA2B,SAAQ,eAAqC;CAAG;AAAxF,gEAAwF;AACxF,cAAc;AACd,MAAa,yBAA0B,SAAQ,eAAoC;CAAG;AAAtF,8DAAsF","file":"timestamp.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { BaseVector } from './base';\nimport { Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond } from '../type';\n\n/** @ignore */\nexport class TimestampVector extends BaseVector {}\n/** @ignore */\nexport class TimestampSecondVector extends TimestampVector {}\n/** @ignore */\nexport class TimestampMillisecondVector extends TimestampVector {}\n/** @ignore */\nexport class TimestampMicrosecondVector extends TimestampVector {}\n/** @ignore */\nexport class TimestampNanosecondVector extends TimestampVector {}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/vector/timestamp.mjs b/frontend/node_modules/apache-arrow/vector/timestamp.mjs new file mode 100644 index 0000000000000000000000000000000000000000..78fb8b4dd339324252575294516b2c646b26261d --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/timestamp.mjs @@ -0,0 +1,34 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { BaseVector } from './base'; +/** @ignore */ +export class TimestampVector extends BaseVector { +} +/** @ignore */ +export class TimestampSecondVector extends TimestampVector { +} +/** @ignore */ +export class TimestampMillisecondVector extends TimestampVector { +} +/** @ignore */ +export class TimestampMicrosecondVector extends TimestampVector { +} +/** @ignore */ +export class TimestampNanosecondVector extends TimestampVector { +} + +//# sourceMappingURL=timestamp.mjs.map diff --git a/frontend/node_modules/apache-arrow/vector/timestamp.mjs.map b/frontend/node_modules/apache-arrow/vector/timestamp.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..a7da7c8e045eeff5412947f533e220cdf9a71e7f --- /dev/null +++ b/frontend/node_modules/apache-arrow/vector/timestamp.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["vector/timestamp.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAGpC,cAAc;AACd,MAAM,OAAO,eAAiD,SAAQ,UAAa;CAAG;AACtF,cAAc;AACd,MAAM,OAAO,qBAAsB,SAAQ,eAAgC;CAAG;AAC9E,cAAc;AACd,MAAM,OAAO,0BAA2B,SAAQ,eAAqC;CAAG;AACxF,cAAc;AACd,MAAM,OAAO,0BAA2B,SAAQ,eAAqC;CAAG;AACxF,cAAc;AACd,MAAM,OAAO,yBAA0B,SAAQ,eAAoC;CAAG","file":"timestamp.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { BaseVector } from './base';\nimport { Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond } from '../type';\n\n/** @ignore */\nexport class TimestampVector extends BaseVector {}\n/** @ignore */\nexport class TimestampSecondVector extends TimestampVector {}\n/** @ignore */\nexport class TimestampMillisecondVector extends TimestampVector {}\n/** @ignore */\nexport class TimestampMicrosecondVector extends TimestampVector {}\n/** @ignore */\nexport class TimestampNanosecondVector extends TimestampVector {}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor.d.ts b/frontend/node_modules/apache-arrow/visitor.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..80ac4e7708d534b8f00d06361479baef38d44255 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor.d.ts @@ -0,0 +1,50 @@ +export declare abstract class Visitor { + visitMany(nodes: any[], ...args: any[][]): any[]; + visit(...args: any[]): any; + getVisitFn(node: any, throwIfNotFound?: boolean): any; +} +export interface Visitor { + visitNull(node: any, ...args: any[]): any; + visitBool(node: any, ...args: any[]): any; + visitInt(node: any, ...args: any[]): any; + visitInt8?(node: any, ...args: any[]): any; + visitInt16?(node: any, ...args: any[]): any; + visitInt32?(node: any, ...args: any[]): any; + visitInt64?(node: any, ...args: any[]): any; + visitUint8?(node: any, ...args: any[]): any; + visitUint16?(node: any, ...args: any[]): any; + visitUint32?(node: any, ...args: any[]): any; + visitUint64?(node: any, ...args: any[]): any; + visitFloat(node: any, ...args: any[]): any; + visitFloat16?(node: any, ...args: any[]): any; + visitFloat32?(node: any, ...args: any[]): any; + visitFloat64?(node: any, ...args: any[]): any; + visitUtf8(node: any, ...args: any[]): any; + visitBinary(node: any, ...args: any[]): any; + visitFixedSizeBinary(node: any, ...args: any[]): any; + visitDate(node: any, ...args: any[]): any; + visitDateDay?(node: any, ...args: any[]): any; + visitDateMillisecond?(node: any, ...args: any[]): any; + visitTimestamp(node: any, ...args: any[]): any; + visitTimestampSecond?(node: any, ...args: any[]): any; + visitTimestampMillisecond?(node: any, ...args: any[]): any; + visitTimestampMicrosecond?(node: any, ...args: any[]): any; + visitTimestampNanosecond?(node: any, ...args: any[]): any; + visitTime(node: any, ...args: any[]): any; + visitTimeSecond?(node: any, ...args: any[]): any; + visitTimeMillisecond?(node: any, ...args: any[]): any; + visitTimeMicrosecond?(node: any, ...args: any[]): any; + visitTimeNanosecond?(node: any, ...args: any[]): any; + visitDecimal(node: any, ...args: any[]): any; + visitList(node: any, ...args: any[]): any; + visitStruct(node: any, ...args: any[]): any; + visitUnion(node: any, ...args: any[]): any; + visitDenseUnion?(node: any, ...args: any[]): any; + visitSparseUnion?(node: any, ...args: any[]): any; + visitDictionary(node: any, ...args: any[]): any; + visitInterval(node: any, ...args: any[]): any; + visitIntervalDayTime?(node: any, ...args: any[]): any; + visitIntervalYearMonth?(node: any, ...args: any[]): any; + visitFixedSizeList(node: any, ...args: any[]): any; + visitMap(node: any, ...args: any[]): any; +} diff --git a/frontend/node_modules/apache-arrow/visitor.js b/frontend/node_modules/apache-arrow/visitor.js new file mode 100644 index 0000000000000000000000000000000000000000..7f239d6ce2445b36f7d48ee23b37ab8fc4679b02 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor.js @@ -0,0 +1,302 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const data_1 = require("./data"); +const vector_1 = require("./vector"); +const enum_1 = require("./enum"); +const type_1 = require("./type"); +class Visitor { + visitMany(nodes, ...args) { + return nodes.map((node, i) => this.visit(node, ...args.map((x) => x[i]))); + } + visit(...args) { + return this.getVisitFn(args[0], false).apply(this, args); + } + getVisitFn(node, throwIfNotFound = true) { + return getVisitFn(this, node, throwIfNotFound); + } + visitNull(_node, ..._args) { return null; } + visitBool(_node, ..._args) { return null; } + visitInt(_node, ..._args) { return null; } + visitFloat(_node, ..._args) { return null; } + visitUtf8(_node, ..._args) { return null; } + visitBinary(_node, ..._args) { return null; } + visitFixedSizeBinary(_node, ..._args) { return null; } + visitDate(_node, ..._args) { return null; } + visitTimestamp(_node, ..._args) { return null; } + visitTime(_node, ..._args) { return null; } + visitDecimal(_node, ..._args) { return null; } + visitList(_node, ..._args) { return null; } + visitStruct(_node, ..._args) { return null; } + visitUnion(_node, ..._args) { return null; } + visitDictionary(_node, ..._args) { return null; } + visitInterval(_node, ..._args) { return null; } + visitFixedSizeList(_node, ..._args) { return null; } + visitMap(_node, ..._args) { return null; } +} +exports.Visitor = Visitor; +/** @ignore */ +function getVisitFn(visitor, node, throwIfNotFound = true) { + let fn = null; + let dtype = enum_1.Type.NONE; + // tslint:disable + if (node instanceof data_1.Data) { + dtype = inferDType(node.type); + } + else if (node instanceof vector_1.Vector) { + dtype = inferDType(node.type); + } + else if (node instanceof type_1.DataType) { + dtype = inferDType(node); + } + else if (typeof (dtype = node) !== 'number') { + dtype = enum_1.Type[node]; + } + switch (dtype) { + case enum_1.Type.Null: + fn = visitor.visitNull; + break; + case enum_1.Type.Bool: + fn = visitor.visitBool; + break; + case enum_1.Type.Int: + fn = visitor.visitInt; + break; + case enum_1.Type.Int8: + fn = visitor.visitInt8 || visitor.visitInt; + break; + case enum_1.Type.Int16: + fn = visitor.visitInt16 || visitor.visitInt; + break; + case enum_1.Type.Int32: + fn = visitor.visitInt32 || visitor.visitInt; + break; + case enum_1.Type.Int64: + fn = visitor.visitInt64 || visitor.visitInt; + break; + case enum_1.Type.Uint8: + fn = visitor.visitUint8 || visitor.visitInt; + break; + case enum_1.Type.Uint16: + fn = visitor.visitUint16 || visitor.visitInt; + break; + case enum_1.Type.Uint32: + fn = visitor.visitUint32 || visitor.visitInt; + break; + case enum_1.Type.Uint64: + fn = visitor.visitUint64 || visitor.visitInt; + break; + case enum_1.Type.Float: + fn = visitor.visitFloat; + break; + case enum_1.Type.Float16: + fn = visitor.visitFloat16 || visitor.visitFloat; + break; + case enum_1.Type.Float32: + fn = visitor.visitFloat32 || visitor.visitFloat; + break; + case enum_1.Type.Float64: + fn = visitor.visitFloat64 || visitor.visitFloat; + break; + case enum_1.Type.Utf8: + fn = visitor.visitUtf8; + break; + case enum_1.Type.Binary: + fn = visitor.visitBinary; + break; + case enum_1.Type.FixedSizeBinary: + fn = visitor.visitFixedSizeBinary; + break; + case enum_1.Type.Date: + fn = visitor.visitDate; + break; + case enum_1.Type.DateDay: + fn = visitor.visitDateDay || visitor.visitDate; + break; + case enum_1.Type.DateMillisecond: + fn = visitor.visitDateMillisecond || visitor.visitDate; + break; + case enum_1.Type.Timestamp: + fn = visitor.visitTimestamp; + break; + case enum_1.Type.TimestampSecond: + fn = visitor.visitTimestampSecond || visitor.visitTimestamp; + break; + case enum_1.Type.TimestampMillisecond: + fn = visitor.visitTimestampMillisecond || visitor.visitTimestamp; + break; + case enum_1.Type.TimestampMicrosecond: + fn = visitor.visitTimestampMicrosecond || visitor.visitTimestamp; + break; + case enum_1.Type.TimestampNanosecond: + fn = visitor.visitTimestampNanosecond || visitor.visitTimestamp; + break; + case enum_1.Type.Time: + fn = visitor.visitTime; + break; + case enum_1.Type.TimeSecond: + fn = visitor.visitTimeSecond || visitor.visitTime; + break; + case enum_1.Type.TimeMillisecond: + fn = visitor.visitTimeMillisecond || visitor.visitTime; + break; + case enum_1.Type.TimeMicrosecond: + fn = visitor.visitTimeMicrosecond || visitor.visitTime; + break; + case enum_1.Type.TimeNanosecond: + fn = visitor.visitTimeNanosecond || visitor.visitTime; + break; + case enum_1.Type.Decimal: + fn = visitor.visitDecimal; + break; + case enum_1.Type.List: + fn = visitor.visitList; + break; + case enum_1.Type.Struct: + fn = visitor.visitStruct; + break; + case enum_1.Type.Union: + fn = visitor.visitUnion; + break; + case enum_1.Type.DenseUnion: + fn = visitor.visitDenseUnion || visitor.visitUnion; + break; + case enum_1.Type.SparseUnion: + fn = visitor.visitSparseUnion || visitor.visitUnion; + break; + case enum_1.Type.Dictionary: + fn = visitor.visitDictionary; + break; + case enum_1.Type.Interval: + fn = visitor.visitInterval; + break; + case enum_1.Type.IntervalDayTime: + fn = visitor.visitIntervalDayTime || visitor.visitInterval; + break; + case enum_1.Type.IntervalYearMonth: + fn = visitor.visitIntervalYearMonth || visitor.visitInterval; + break; + case enum_1.Type.FixedSizeList: + fn = visitor.visitFixedSizeList; + break; + case enum_1.Type.Map: + fn = visitor.visitMap; + break; + } + if (typeof fn === 'function') + return fn; + if (!throwIfNotFound) + return () => null; + throw new Error(`Unrecognized type '${enum_1.Type[dtype]}'`); +} +/** @ignore */ +function inferDType(type) { + switch (type.typeId) { + case enum_1.Type.Null: return enum_1.Type.Null; + case enum_1.Type.Int: + const { bitWidth, isSigned } = type; + switch (bitWidth) { + case 8: return isSigned ? enum_1.Type.Int8 : enum_1.Type.Uint8; + case 16: return isSigned ? enum_1.Type.Int16 : enum_1.Type.Uint16; + case 32: return isSigned ? enum_1.Type.Int32 : enum_1.Type.Uint32; + case 64: return isSigned ? enum_1.Type.Int64 : enum_1.Type.Uint64; + } + return enum_1.Type.Int; + case enum_1.Type.Float: + switch (type.precision) { + case enum_1.Precision.HALF: return enum_1.Type.Float16; + case enum_1.Precision.SINGLE: return enum_1.Type.Float32; + case enum_1.Precision.DOUBLE: return enum_1.Type.Float64; + } + return enum_1.Type.Float; + case enum_1.Type.Binary: return enum_1.Type.Binary; + case enum_1.Type.Utf8: return enum_1.Type.Utf8; + case enum_1.Type.Bool: return enum_1.Type.Bool; + case enum_1.Type.Decimal: return enum_1.Type.Decimal; + case enum_1.Type.Time: + switch (type.unit) { + case enum_1.TimeUnit.SECOND: return enum_1.Type.TimeSecond; + case enum_1.TimeUnit.MILLISECOND: return enum_1.Type.TimeMillisecond; + case enum_1.TimeUnit.MICROSECOND: return enum_1.Type.TimeMicrosecond; + case enum_1.TimeUnit.NANOSECOND: return enum_1.Type.TimeNanosecond; + } + return enum_1.Type.Time; + case enum_1.Type.Timestamp: + switch (type.unit) { + case enum_1.TimeUnit.SECOND: return enum_1.Type.TimestampSecond; + case enum_1.TimeUnit.MILLISECOND: return enum_1.Type.TimestampMillisecond; + case enum_1.TimeUnit.MICROSECOND: return enum_1.Type.TimestampMicrosecond; + case enum_1.TimeUnit.NANOSECOND: return enum_1.Type.TimestampNanosecond; + } + return enum_1.Type.Timestamp; + case enum_1.Type.Date: + switch (type.unit) { + case enum_1.DateUnit.DAY: return enum_1.Type.DateDay; + case enum_1.DateUnit.MILLISECOND: return enum_1.Type.DateMillisecond; + } + return enum_1.Type.Date; + case enum_1.Type.Interval: + switch (type.unit) { + case enum_1.IntervalUnit.DAY_TIME: return enum_1.Type.IntervalDayTime; + case enum_1.IntervalUnit.YEAR_MONTH: return enum_1.Type.IntervalYearMonth; + } + return enum_1.Type.Interval; + case enum_1.Type.Map: return enum_1.Type.Map; + case enum_1.Type.List: return enum_1.Type.List; + case enum_1.Type.Struct: return enum_1.Type.Struct; + case enum_1.Type.Union: + switch (type.mode) { + case enum_1.UnionMode.Dense: return enum_1.Type.DenseUnion; + case enum_1.UnionMode.Sparse: return enum_1.Type.SparseUnion; + } + return enum_1.Type.Union; + case enum_1.Type.FixedSizeBinary: return enum_1.Type.FixedSizeBinary; + case enum_1.Type.FixedSizeList: return enum_1.Type.FixedSizeList; + case enum_1.Type.Dictionary: return enum_1.Type.Dictionary; + } + throw new Error(`Unrecognized type '${enum_1.Type[type.typeId]}'`); +} +// Add these here so they're picked up by the externs creator +// in the build, and closure-compiler doesn't minify them away +Visitor.prototype.visitInt8 = null; +Visitor.prototype.visitInt16 = null; +Visitor.prototype.visitInt32 = null; +Visitor.prototype.visitInt64 = null; +Visitor.prototype.visitUint8 = null; +Visitor.prototype.visitUint16 = null; +Visitor.prototype.visitUint32 = null; +Visitor.prototype.visitUint64 = null; +Visitor.prototype.visitFloat16 = null; +Visitor.prototype.visitFloat32 = null; +Visitor.prototype.visitFloat64 = null; +Visitor.prototype.visitDateDay = null; +Visitor.prototype.visitDateMillisecond = null; +Visitor.prototype.visitTimestampSecond = null; +Visitor.prototype.visitTimestampMillisecond = null; +Visitor.prototype.visitTimestampMicrosecond = null; +Visitor.prototype.visitTimestampNanosecond = null; +Visitor.prototype.visitTimeSecond = null; +Visitor.prototype.visitTimeMillisecond = null; +Visitor.prototype.visitTimeMicrosecond = null; +Visitor.prototype.visitTimeNanosecond = null; +Visitor.prototype.visitDenseUnion = null; +Visitor.prototype.visitSparseUnion = null; +Visitor.prototype.visitIntervalDayTime = null; +Visitor.prototype.visitIntervalYearMonth = null; + +//# sourceMappingURL=visitor.js.map diff --git a/frontend/node_modules/apache-arrow/visitor.js.map b/frontend/node_modules/apache-arrow/visitor.js.map new file mode 100644 index 0000000000000000000000000000000000000000..7c454c8b753668fb894087b703de940b895e0cc1 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,iCAA8B;AAC9B,qCAAkC;AAClC,iCAAsF;AACtF,iCAAwF;AAExF,MAAsB,OAAO;IAClB,SAAS,CAAC,KAAY,EAAE,GAAG,IAAa;QAC3C,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,C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AC;AAC7C,OAAO,CAAC,SAAiB,CAAC,YAAY,GAAG,IAAI,CAAC;AAC9C,OAAO,CAAC,SAAiB,CAAC,YAAY,GAAG,IAAI,CAAC;AAC9C,OAAO,CAAC,SAAiB,CAAC,YAAY,GAAG,IAAI,CAAC;AAC9C,OAAO,CAAC,SAAiB,CAAC,YAAY,GAAG,IAAI,CAAC;AAC9C,OAAO,CAAC,SAAiB,CAAC,oBAAoB,GAAG,IAAI,CAAC;AACtD,OAAO,CAAC,SAAiB,CAAC,oBAAoB,GAAG,IAAI,CAAC;AACtD,OAAO,CAAC,SAAiB,CAAC,yBAAyB,GAAG,IAAI,CAAC;AAC3D,OAAO,CAAC,SAAiB,CAAC,yBAAyB,GAAG,IAAI,CAAC;AAC3D,OAAO,CAAC,SAAiB,CAAC,wBAAwB,GAAG,IAAI,CAAC;AAC1D,OAAO,CAAC,SAAiB,CAAC,eAAe,GAAG,IAAI,CAAC;AACjD,OAAO,CAAC,SAAiB,CAAC,oBAAoB,GAAG,IAAI,CAAC;AACtD,OAAO,CAAC,SAAiB,CAAC,oBAAoB,GAAG,IAAI,CAAC;AACtD,OAAO,CAAC,SAAiB,CAAC,mBAAmB,GAAG,IAAI,CAAC;AACrD,OAAO,CAAC,SAAiB,CAAC,eAAe,GAAG,IAAI,CAAC;AACjD,OAAO,CAAC,SAAiB,CAAC,gBAAgB,GAAG,IAAI,CAAC;AAClD,OAAO,CAAC,SAAiB,CAAC,oBAAoB,GAAG,IAAI,CAAC;AACtD,OAAO,CAAC,SAAiB,CAAC,sBAAsB,GAAG,IAAI,CAAC","file":"visitor.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from './data';\nimport { Vector } from './vector';\nimport { Type, Precision, DateUnit, TimeUnit, IntervalUnit, UnionMode } from './enum';\nimport { DataType, Float, Int, Date_, Interval, Time, Timestamp, Union, } from './type';\n\nexport abstract class Visitor {\n public visitMany(nodes: any[], ...args: any[][]) {\n return nodes.map((node, i) => this.visit(node, ...args.map((x) => x[i])));\n }\n public visit(...args: any[]) {\n return this.getVisitFn(args[0], false).apply(this, args);\n }\n public getVisitFn(node: any, throwIfNotFound = true) {\n return getVisitFn(this, node, throwIfNotFound);\n }\n public visitNull (_node: any, ..._args: any[]): any { return null; }\n public visitBool (_node: any, ..._args: any[]): any { return null; }\n public visitInt (_node: any, ..._args: any[]): any { return null; }\n public visitFloat (_node: any, ..._args: any[]): any { return null; }\n public visitUtf8 (_node: any, ..._args: any[]): any { return null; }\n public visitBinary (_node: any, ..._args: any[]): any { return null; }\n public visitFixedSizeBinary (_node: any, ..._args: any[]): any { return null; }\n public visitDate (_node: any, ..._args: any[]): any { return null; }\n public visitTimestamp (_node: any, ..._args: any[]): any { return null; }\n public visitTime (_node: any, ..._args: any[]): any { return null; }\n public visitDecimal (_node: any, ..._args: any[]): any { return null; }\n public visitList (_node: any, ..._args: any[]): any { return null; }\n public visitStruct (_node: any, ..._args: any[]): any { return null; }\n public visitUnion (_node: any, ..._args: any[]): any { return null; }\n public visitDictionary (_node: any, ..._args: any[]): any { return null; }\n public visitInterval (_node: any, ..._args: any[]): any { return null; }\n public visitFixedSizeList (_node: any, ..._args: any[]): any { return null; }\n public visitMap (_node: any, ..._args: any[]): any { return null; }\n}\n\n/** @ignore */\nfunction getVisitFn(visitor: Visitor, node: any, throwIfNotFound = true) {\n let fn: any = null;\n let dtype: T['TType'] = Type.NONE;\n // tslint:disable\n if (node instanceof Data ) { dtype = inferDType(node.type as T); }\n else if (node instanceof Vector ) { dtype = inferDType(node.type as T); }\n else if (node instanceof DataType) { dtype = inferDType(node as T); }\n else if (typeof (dtype = node) !== 'number') { dtype = Type[node] as any as T['TType']; }\n\n switch (dtype) {\n case Type.Null: fn = visitor.visitNull; break;\n case Type.Bool: fn = visitor.visitBool; break;\n case Type.Int: fn = visitor.visitInt; break;\n case Type.Int8: fn = visitor.visitInt8 || visitor.visitInt; break;\n case Type.Int16: fn = visitor.visitInt16 || visitor.visitInt; break;\n case Type.Int32: fn = visitor.visitInt32 || visitor.visitInt; break;\n case Type.Int64: fn = visitor.visitInt64 || visitor.visitInt; break;\n case Type.Uint8: fn = visitor.visitUint8 || visitor.visitInt; break;\n case Type.Uint16: fn = visitor.visitUint16 || visitor.visitInt; break;\n case Type.Uint32: fn = visitor.visitUint32 || visitor.visitInt; break;\n case Type.Uint64: fn = visitor.visitUint64 || visitor.visitInt; break;\n case Type.Float: fn = visitor.visitFloat; break;\n case Type.Float16: fn = visitor.visitFloat16 || visitor.visitFloat; break;\n case Type.Float32: fn = visitor.visitFloat32 || visitor.visitFloat; break;\n case Type.Float64: fn = visitor.visitFloat64 || visitor.visitFloat; break;\n case Type.Utf8: fn = visitor.visitUtf8; break;\n case Type.Binary: fn = visitor.visitBinary; break;\n case Type.FixedSizeBinary: fn = visitor.visitFixedSizeBinary; break;\n case Type.Date: fn = visitor.visitDate; break;\n case Type.DateDay: fn = visitor.visitDateDay || visitor.visitDate; break;\n case Type.DateMillisecond: fn = visitor.visitDateMillisecond || visitor.visitDate; break;\n case Type.Timestamp: fn = visitor.visitTimestamp; break;\n case Type.TimestampSecond: fn = visitor.visitTimestampSecond || visitor.visitTimestamp; break;\n case Type.TimestampMillisecond: fn = visitor.visitTimestampMillisecond || visitor.visitTimestamp; break;\n case Type.TimestampMicrosecond: fn = visitor.visitTimestampMicrosecond || visitor.visitTimestamp; break;\n case Type.TimestampNanosecond: fn = visitor.visitTimestampNanosecond || visitor.visitTimestamp; break;\n case Type.Time: fn = visitor.visitTime; break;\n case Type.TimeSecond: fn = visitor.visitTimeSecond || visitor.visitTime; break;\n case Type.TimeMillisecond: fn = visitor.visitTimeMillisecond || visitor.visitTime; break;\n case Type.TimeMicrosecond: fn = visitor.visitTimeMicrosecond || visitor.visitTime; break;\n case Type.TimeNanosecond: fn = visitor.visitTimeNanosecond || visitor.visitTime; break;\n case Type.Decimal: fn = visitor.visitDecimal; break;\n case Type.List: fn = visitor.visitList; break;\n case Type.Struct: fn = visitor.visitStruct; break;\n case Type.Union: fn = visitor.visitUnion; break;\n case Type.DenseUnion: fn = visitor.visitDenseUnion || visitor.visitUnion; break;\n case Type.SparseUnion: fn = visitor.visitSparseUnion || visitor.visitUnion; break;\n case Type.Dictionary: fn = visitor.visitDictionary; break;\n case Type.Interval: fn = visitor.visitInterval; break;\n case Type.IntervalDayTime: fn = visitor.visitIntervalDayTime || visitor.visitInterval; break;\n case Type.IntervalYearMonth: fn = visitor.visitIntervalYearMonth || visitor.visitInterval; break;\n case Type.FixedSizeList: fn = visitor.visitFixedSizeList; break;\n case Type.Map: fn = visitor.visitMap; break;\n }\n if (typeof fn === 'function') return fn;\n if (!throwIfNotFound) return () => null;\n throw new Error(`Unrecognized type '${Type[dtype]}'`);\n}\n\n/** @ignore */\nfunction inferDType(type: T): Type {\n switch (type.typeId) {\n case Type.Null: return Type.Null;\n case Type.Int:\n const { bitWidth, isSigned } = (type as any as Int);\n switch (bitWidth) {\n case 8: return isSigned ? Type.Int8 : Type.Uint8 ;\n case 16: return isSigned ? Type.Int16 : Type.Uint16;\n case 32: return isSigned ? Type.Int32 : Type.Uint32;\n case 64: return isSigned ? Type.Int64 : Type.Uint64;\n }\n return Type.Int;\n case Type.Float:\n switch((type as any as Float).precision) {\n case Precision.HALF: return Type.Float16;\n case Precision.SINGLE: return Type.Float32;\n case Precision.DOUBLE: return Type.Float64;\n }\n return Type.Float;\n case Type.Binary: return Type.Binary;\n case Type.Utf8: return Type.Utf8;\n case Type.Bool: return Type.Bool;\n case Type.Decimal: return Type.Decimal;\n case Type.Time:\n switch ((type as any as Time).unit) {\n case TimeUnit.SECOND: return Type.TimeSecond;\n case TimeUnit.MILLISECOND: return Type.TimeMillisecond;\n case TimeUnit.MICROSECOND: return Type.TimeMicrosecond;\n case TimeUnit.NANOSECOND: return Type.TimeNanosecond;\n }\n return Type.Time;\n case Type.Timestamp:\n switch ((type as any as Timestamp).unit) {\n case TimeUnit.SECOND: return Type.TimestampSecond;\n case TimeUnit.MILLISECOND: return Type.TimestampMillisecond;\n case TimeUnit.MICROSECOND: return Type.TimestampMicrosecond;\n case TimeUnit.NANOSECOND: return Type.TimestampNanosecond;\n }\n return Type.Timestamp;\n case Type.Date:\n switch ((type as any as Date_).unit) {\n case DateUnit.DAY: return Type.DateDay;\n case DateUnit.MILLISECOND: return Type.DateMillisecond;\n }\n return Type.Date;\n case Type.Interval:\n switch ((type as any as Interval).unit) {\n case IntervalUnit.DAY_TIME: return Type.IntervalDayTime;\n case IntervalUnit.YEAR_MONTH: return Type.IntervalYearMonth;\n }\n return Type.Interval;\n case Type.Map: return Type.Map;\n case Type.List: return Type.List;\n case Type.Struct: return Type.Struct;\n case Type.Union:\n switch ((type as any as Union).mode) {\n case UnionMode.Dense: return Type.DenseUnion;\n case UnionMode.Sparse: return Type.SparseUnion;\n }\n return Type.Union;\n case Type.FixedSizeBinary: return Type.FixedSizeBinary;\n case Type.FixedSizeList: return Type.FixedSizeList;\n case Type.Dictionary: return Type.Dictionary;\n }\n throw new Error(`Unrecognized type '${Type[type.typeId]}'`);\n}\n\nexport interface Visitor {\n visitNull (node: any, ...args: any[]): any;\n visitBool (node: any, ...args: any[]): any;\n visitInt (node: any, ...args: any[]): any;\n visitInt8? (node: any, ...args: any[]): any;\n visitInt16? (node: any, ...args: any[]): any;\n visitInt32? (node: any, ...args: any[]): any;\n visitInt64? (node: any, ...args: any[]): any;\n visitUint8? (node: any, ...args: any[]): any;\n visitUint16? (node: any, ...args: any[]): any;\n visitUint32? (node: any, ...args: any[]): any;\n visitUint64? (node: any, ...args: any[]): any;\n visitFloat (node: any, ...args: any[]): any;\n visitFloat16? (node: any, ...args: any[]): any;\n visitFloat32? (node: any, ...args: any[]): any;\n visitFloat64? (node: any, ...args: any[]): any;\n visitUtf8 (node: any, ...args: any[]): any;\n visitBinary (node: any, ...args: any[]): any;\n visitFixedSizeBinary (node: any, ...args: any[]): any;\n visitDate (node: any, ...args: any[]): any;\n visitDateDay? (node: any, ...args: any[]): any;\n visitDateMillisecond? (node: any, ...args: any[]): any;\n visitTimestamp (node: any, ...args: any[]): any;\n visitTimestampSecond? (node: any, ...args: any[]): any;\n visitTimestampMillisecond? (node: any, ...args: any[]): any;\n visitTimestampMicrosecond? (node: any, ...args: any[]): any;\n visitTimestampNanosecond? (node: any, ...args: any[]): any;\n visitTime (node: any, ...args: any[]): any;\n visitTimeSecond? (node: any, ...args: any[]): any;\n visitTimeMillisecond? (node: any, ...args: any[]): any;\n visitTimeMicrosecond? (node: any, ...args: any[]): any;\n visitTimeNanosecond? (node: any, ...args: any[]): any;\n visitDecimal (node: any, ...args: any[]): any;\n visitList (node: any, ...args: any[]): any;\n visitStruct (node: any, ...args: any[]): any;\n visitUnion (node: any, ...args: any[]): any;\n visitDenseUnion? (node: any, ...args: any[]): any;\n visitSparseUnion? (node: any, ...args: any[]): any;\n visitDictionary (node: any, ...args: any[]): any;\n visitInterval (node: any, ...args: any[]): any;\n visitIntervalDayTime? (node: any, ...args: any[]): any;\n visitIntervalYearMonth? (node: any, ...args: any[]): any;\n visitFixedSizeList (node: any, ...args: any[]): any;\n visitMap (node: any, ...args: any[]): any;\n}\n\n// Add these here so they're picked up by the externs creator\n// in the build, and closure-compiler doesn't minify them away\n(Visitor.prototype as any).visitInt8 = null;\n(Visitor.prototype as any).visitInt16 = null;\n(Visitor.prototype as any).visitInt32 = null;\n(Visitor.prototype as any).visitInt64 = null;\n(Visitor.prototype as any).visitUint8 = null;\n(Visitor.prototype as any).visitUint16 = null;\n(Visitor.prototype as any).visitUint32 = null;\n(Visitor.prototype as any).visitUint64 = null;\n(Visitor.prototype as any).visitFloat16 = null;\n(Visitor.prototype as any).visitFloat32 = null;\n(Visitor.prototype as any).visitFloat64 = null;\n(Visitor.prototype as any).visitDateDay = null;\n(Visitor.prototype as any).visitDateMillisecond = null;\n(Visitor.prototype as any).visitTimestampSecond = null;\n(Visitor.prototype as any).visitTimestampMillisecond = null;\n(Visitor.prototype as any).visitTimestampMicrosecond = null;\n(Visitor.prototype as any).visitTimestampNanosecond = null;\n(Visitor.prototype as any).visitTimeSecond = null;\n(Visitor.prototype as any).visitTimeMillisecond = null;\n(Visitor.prototype as any).visitTimeMicrosecond = null;\n(Visitor.prototype as any).visitTimeNanosecond = null;\n(Visitor.prototype as any).visitDenseUnion = null;\n(Visitor.prototype as any).visitSparseUnion = null;\n(Visitor.prototype as any).visitIntervalDayTime = null;\n(Visitor.prototype as any).visitIntervalYearMonth = null;\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor.mjs b/frontend/node_modules/apache-arrow/visitor.mjs new file mode 100644 index 0000000000000000000000000000000000000000..9131598f25c9ea8ab54752108323acca32a606c1 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor.mjs @@ -0,0 +1,299 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { Data } from './data'; +import { Vector } from './vector'; +import { Type, Precision, DateUnit, TimeUnit, IntervalUnit, UnionMode } from './enum'; +import { DataType, } from './type'; +export class Visitor { + visitMany(nodes, ...args) { + return nodes.map((node, i) => this.visit(node, ...args.map((x) => x[i]))); + } + visit(...args) { + return this.getVisitFn(args[0], false).apply(this, args); + } + getVisitFn(node, throwIfNotFound = true) { + return getVisitFn(this, node, throwIfNotFound); + } + visitNull(_node, ..._args) { return null; } + visitBool(_node, ..._args) { return null; } + visitInt(_node, ..._args) { return null; } + visitFloat(_node, ..._args) { return null; } + visitUtf8(_node, ..._args) { return null; } + visitBinary(_node, ..._args) { return null; } + visitFixedSizeBinary(_node, ..._args) { return null; } + visitDate(_node, ..._args) { return null; } + visitTimestamp(_node, ..._args) { return null; } + visitTime(_node, ..._args) { return null; } + visitDecimal(_node, ..._args) { return null; } + visitList(_node, ..._args) { return null; } + visitStruct(_node, ..._args) { return null; } + visitUnion(_node, ..._args) { return null; } + visitDictionary(_node, ..._args) { return null; } + visitInterval(_node, ..._args) { return null; } + visitFixedSizeList(_node, ..._args) { return null; } + visitMap(_node, ..._args) { return null; } +} +/** @ignore */ +function getVisitFn(visitor, node, throwIfNotFound = true) { + let fn = null; + let dtype = Type.NONE; + // tslint:disable + if (node instanceof Data) { + dtype = inferDType(node.type); + } + else if (node instanceof Vector) { + dtype = inferDType(node.type); + } + else if (node instanceof DataType) { + dtype = inferDType(node); + } + else if (typeof (dtype = node) !== 'number') { + dtype = Type[node]; + } + switch (dtype) { + case Type.Null: + fn = visitor.visitNull; + break; + case Type.Bool: + fn = visitor.visitBool; + break; + case Type.Int: + fn = visitor.visitInt; + break; + case Type.Int8: + fn = visitor.visitInt8 || visitor.visitInt; + break; + case Type.Int16: + fn = visitor.visitInt16 || visitor.visitInt; + break; + case Type.Int32: + fn = visitor.visitInt32 || visitor.visitInt; + break; + case Type.Int64: + fn = visitor.visitInt64 || visitor.visitInt; + break; + case Type.Uint8: + fn = visitor.visitUint8 || visitor.visitInt; + break; + case Type.Uint16: + fn = visitor.visitUint16 || visitor.visitInt; + break; + case Type.Uint32: + fn = visitor.visitUint32 || visitor.visitInt; + break; + case Type.Uint64: + fn = visitor.visitUint64 || visitor.visitInt; + break; + case Type.Float: + fn = visitor.visitFloat; + break; + case Type.Float16: + fn = visitor.visitFloat16 || visitor.visitFloat; + break; + case Type.Float32: + fn = visitor.visitFloat32 || visitor.visitFloat; + break; + case Type.Float64: + fn = visitor.visitFloat64 || visitor.visitFloat; + break; + case Type.Utf8: + fn = visitor.visitUtf8; + break; + case Type.Binary: + fn = visitor.visitBinary; + break; + case Type.FixedSizeBinary: + fn = visitor.visitFixedSizeBinary; + break; + case Type.Date: + fn = visitor.visitDate; + break; + case Type.DateDay: + fn = visitor.visitDateDay || visitor.visitDate; + break; + case Type.DateMillisecond: + fn = visitor.visitDateMillisecond || visitor.visitDate; + break; + case Type.Timestamp: + fn = visitor.visitTimestamp; + break; + case Type.TimestampSecond: + fn = visitor.visitTimestampSecond || visitor.visitTimestamp; + break; + case Type.TimestampMillisecond: + fn = visitor.visitTimestampMillisecond || visitor.visitTimestamp; + break; + case Type.TimestampMicrosecond: + fn = visitor.visitTimestampMicrosecond || visitor.visitTimestamp; + break; + case Type.TimestampNanosecond: + fn = visitor.visitTimestampNanosecond || visitor.visitTimestamp; + break; + case Type.Time: + fn = visitor.visitTime; + break; + case Type.TimeSecond: + fn = visitor.visitTimeSecond || visitor.visitTime; + break; + case Type.TimeMillisecond: + fn = visitor.visitTimeMillisecond || visitor.visitTime; + break; + case Type.TimeMicrosecond: + fn = visitor.visitTimeMicrosecond || visitor.visitTime; + break; + case Type.TimeNanosecond: + fn = visitor.visitTimeNanosecond || visitor.visitTime; + break; + case Type.Decimal: + fn = visitor.visitDecimal; + break; + case Type.List: + fn = visitor.visitList; + break; + case Type.Struct: + fn = visitor.visitStruct; + break; + case Type.Union: + fn = visitor.visitUnion; + break; + case Type.DenseUnion: + fn = visitor.visitDenseUnion || visitor.visitUnion; + break; + case Type.SparseUnion: + fn = visitor.visitSparseUnion || visitor.visitUnion; + break; + case Type.Dictionary: + fn = visitor.visitDictionary; + break; + case Type.Interval: + fn = visitor.visitInterval; + break; + case Type.IntervalDayTime: + fn = visitor.visitIntervalDayTime || visitor.visitInterval; + break; + case Type.IntervalYearMonth: + fn = visitor.visitIntervalYearMonth || visitor.visitInterval; + break; + case Type.FixedSizeList: + fn = visitor.visitFixedSizeList; + break; + case Type.Map: + fn = visitor.visitMap; + break; + } + if (typeof fn === 'function') + return fn; + if (!throwIfNotFound) + return () => null; + throw new Error(`Unrecognized type '${Type[dtype]}'`); +} +/** @ignore */ +function inferDType(type) { + switch (type.typeId) { + case Type.Null: return Type.Null; + case Type.Int: + const { bitWidth, isSigned } = type; + switch (bitWidth) { + case 8: return isSigned ? Type.Int8 : Type.Uint8; + case 16: return isSigned ? Type.Int16 : Type.Uint16; + case 32: return isSigned ? Type.Int32 : Type.Uint32; + case 64: return isSigned ? Type.Int64 : Type.Uint64; + } + return Type.Int; + case Type.Float: + switch (type.precision) { + case Precision.HALF: return Type.Float16; + case Precision.SINGLE: return Type.Float32; + case Precision.DOUBLE: return Type.Float64; + } + return Type.Float; + case Type.Binary: return Type.Binary; + case Type.Utf8: return Type.Utf8; + case Type.Bool: return Type.Bool; + case Type.Decimal: return Type.Decimal; + case Type.Time: + switch (type.unit) { + case TimeUnit.SECOND: return Type.TimeSecond; + case TimeUnit.MILLISECOND: return Type.TimeMillisecond; + case TimeUnit.MICROSECOND: return Type.TimeMicrosecond; + case TimeUnit.NANOSECOND: return Type.TimeNanosecond; + } + return Type.Time; + case Type.Timestamp: + switch (type.unit) { + case TimeUnit.SECOND: return Type.TimestampSecond; + case TimeUnit.MILLISECOND: return Type.TimestampMillisecond; + case TimeUnit.MICROSECOND: return Type.TimestampMicrosecond; + case TimeUnit.NANOSECOND: return Type.TimestampNanosecond; + } + return Type.Timestamp; + case Type.Date: + switch (type.unit) { + case DateUnit.DAY: return Type.DateDay; + case DateUnit.MILLISECOND: return Type.DateMillisecond; + } + return Type.Date; + case Type.Interval: + switch (type.unit) { + case IntervalUnit.DAY_TIME: return Type.IntervalDayTime; + case IntervalUnit.YEAR_MONTH: return Type.IntervalYearMonth; + } + return Type.Interval; + case Type.Map: return Type.Map; + case Type.List: return Type.List; + case Type.Struct: return Type.Struct; + case Type.Union: + switch (type.mode) { + case UnionMode.Dense: return Type.DenseUnion; + case UnionMode.Sparse: return Type.SparseUnion; + } + return Type.Union; + case Type.FixedSizeBinary: return Type.FixedSizeBinary; + case Type.FixedSizeList: return Type.FixedSizeList; + case Type.Dictionary: return Type.Dictionary; + } + throw new Error(`Unrecognized type '${Type[type.typeId]}'`); +} +// Add these here so they're picked up by the externs creator +// in the build, and closure-compiler doesn't minify them away +Visitor.prototype.visitInt8 = null; +Visitor.prototype.visitInt16 = null; +Visitor.prototype.visitInt32 = null; +Visitor.prototype.visitInt64 = null; +Visitor.prototype.visitUint8 = null; +Visitor.prototype.visitUint16 = null; +Visitor.prototype.visitUint32 = null; +Visitor.prototype.visitUint64 = null; +Visitor.prototype.visitFloat16 = null; +Visitor.prototype.visitFloat32 = null; +Visitor.prototype.visitFloat64 = null; +Visitor.prototype.visitDateDay = null; +Visitor.prototype.visitDateMillisecond = null; +Visitor.prototype.visitTimestampSecond = null; +Visitor.prototype.visitTimestampMillisecond = null; +Visitor.prototype.visitTimestampMicrosecond = null; +Visitor.prototype.visitTimestampNanosecond = null; +Visitor.prototype.visitTimeSecond = null; +Visitor.prototype.visitTimeMillisecond = null; +Visitor.prototype.visitTimeMicrosecond = null; +Visitor.prototype.visitTimeNanosecond = null; +Visitor.prototype.visitDenseUnion = null; +Visitor.prototype.visitSparseUnion = null; +Visitor.prototype.visitIntervalDayTime = null; +Visitor.prototype.visitIntervalYearMonth = null; + +//# sourceMappingURL=visitor.mjs.map diff --git a/frontend/node_modules/apache-arrow/visitor.mjs.map b/frontend/node_modules/apache-arrow/visitor.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..0acd5f9fdca348730073e4e521fc2f240addb47b --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor.mjs.map @@ -0,0 +1 @@ +{"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e,GAAG,IAAI,CAAC;AACjD,OAAO,CAAC,SAAiB,CAAC,oBAAoB,GAAG,IAAI,CAAC;AACtD,OAAO,CAAC,SAAiB,CAAC,oBAAoB,GAAG,IAAI,CAAC;AACtD,OAAO,CAAC,SAAiB,CAAC,mBAAmB,GAAG,IAAI,CAAC;AACrD,OAAO,CAAC,SAAiB,CAAC,eAAe,GAAG,IAAI,CAAC;AACjD,OAAO,CAAC,SAAiB,CAAC,gBAAgB,GAAG,IAAI,CAAC;AAClD,OAAO,CAAC,SAAiB,CAAC,oBAAoB,GAAG,IAAI,CAAC;AACtD,OAAO,CAAC,SAAiB,CAAC,sBAAsB,GAAG,IAAI,CAAC","file":"visitor.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from './data';\nimport { Vector } from './vector';\nimport { Type, Precision, DateUnit, TimeUnit, IntervalUnit, UnionMode } from './enum';\nimport { DataType, Float, Int, Date_, Interval, Time, Timestamp, Union, } from './type';\n\nexport abstract class Visitor {\n public visitMany(nodes: any[], ...args: any[][]) {\n return nodes.map((node, i) => this.visit(node, ...args.map((x) => x[i])));\n }\n public visit(...args: any[]) {\n return this.getVisitFn(args[0], false).apply(this, args);\n }\n public getVisitFn(node: any, throwIfNotFound = true) {\n return getVisitFn(this, node, throwIfNotFound);\n }\n public visitNull (_node: any, ..._args: any[]): any { return null; }\n public visitBool (_node: any, ..._args: any[]): any { return null; }\n public visitInt (_node: any, ..._args: any[]): any { return null; }\n public visitFloat (_node: any, ..._args: any[]): any { return null; }\n public visitUtf8 (_node: any, ..._args: any[]): any { return null; }\n public visitBinary (_node: any, ..._args: any[]): any { return null; }\n public visitFixedSizeBinary (_node: any, ..._args: any[]): any { return null; }\n public visitDate (_node: any, ..._args: any[]): any { return null; }\n public visitTimestamp (_node: any, ..._args: any[]): any { return null; }\n public visitTime (_node: any, ..._args: any[]): any { return null; }\n public visitDecimal (_node: any, ..._args: any[]): any { return null; }\n public visitList (_node: any, ..._args: any[]): any { return null; }\n public visitStruct (_node: any, ..._args: any[]): any { return null; }\n public visitUnion (_node: any, ..._args: any[]): any { return null; }\n public visitDictionary (_node: any, ..._args: any[]): any { return null; }\n public visitInterval (_node: any, ..._args: any[]): any { return null; }\n public visitFixedSizeList (_node: any, ..._args: any[]): any { return null; }\n public visitMap (_node: any, ..._args: any[]): any { return null; }\n}\n\n/** @ignore */\nfunction getVisitFn(visitor: Visitor, node: any, throwIfNotFound = true) {\n let fn: any = null;\n let dtype: T['TType'] = Type.NONE;\n // tslint:disable\n if (node instanceof Data ) { dtype = inferDType(node.type as T); }\n else if (node instanceof Vector ) { dtype = inferDType(node.type as T); }\n else if (node instanceof DataType) { dtype = inferDType(node as T); }\n else if (typeof (dtype = node) !== 'number') { dtype = Type[node] as any as T['TType']; }\n\n switch (dtype) {\n case Type.Null: fn = visitor.visitNull; break;\n case Type.Bool: fn = visitor.visitBool; break;\n case Type.Int: fn = visitor.visitInt; break;\n case Type.Int8: fn = visitor.visitInt8 || visitor.visitInt; break;\n case Type.Int16: fn = visitor.visitInt16 || visitor.visitInt; break;\n case Type.Int32: fn = visitor.visitInt32 || visitor.visitInt; break;\n case Type.Int64: fn = visitor.visitInt64 || visitor.visitInt; break;\n case Type.Uint8: fn = visitor.visitUint8 || visitor.visitInt; break;\n case Type.Uint16: fn = visitor.visitUint16 || visitor.visitInt; break;\n case Type.Uint32: fn = visitor.visitUint32 || visitor.visitInt; break;\n case Type.Uint64: fn = visitor.visitUint64 || visitor.visitInt; break;\n case Type.Float: fn = visitor.visitFloat; break;\n case Type.Float16: fn = visitor.visitFloat16 || visitor.visitFloat; break;\n case Type.Float32: fn = visitor.visitFloat32 || visitor.visitFloat; break;\n case Type.Float64: fn = visitor.visitFloat64 || visitor.visitFloat; break;\n case Type.Utf8: fn = visitor.visitUtf8; break;\n case Type.Binary: fn = visitor.visitBinary; break;\n case Type.FixedSizeBinary: fn = visitor.visitFixedSizeBinary; break;\n case Type.Date: fn = visitor.visitDate; break;\n case Type.DateDay: fn = visitor.visitDateDay || visitor.visitDate; break;\n case Type.DateMillisecond: fn = visitor.visitDateMillisecond || visitor.visitDate; break;\n case Type.Timestamp: fn = visitor.visitTimestamp; break;\n case Type.TimestampSecond: fn = visitor.visitTimestampSecond || visitor.visitTimestamp; break;\n case Type.TimestampMillisecond: fn = visitor.visitTimestampMillisecond || visitor.visitTimestamp; break;\n case Type.TimestampMicrosecond: fn = visitor.visitTimestampMicrosecond || visitor.visitTimestamp; break;\n case Type.TimestampNanosecond: fn = visitor.visitTimestampNanosecond || visitor.visitTimestamp; break;\n case Type.Time: fn = visitor.visitTime; break;\n case Type.TimeSecond: fn = visitor.visitTimeSecond || visitor.visitTime; break;\n case Type.TimeMillisecond: fn = visitor.visitTimeMillisecond || visitor.visitTime; break;\n case Type.TimeMicrosecond: fn = visitor.visitTimeMicrosecond || visitor.visitTime; break;\n case Type.TimeNanosecond: fn = visitor.visitTimeNanosecond || visitor.visitTime; break;\n case Type.Decimal: fn = visitor.visitDecimal; break;\n case Type.List: fn = visitor.visitList; break;\n case Type.Struct: fn = visitor.visitStruct; break;\n case Type.Union: fn = visitor.visitUnion; break;\n case Type.DenseUnion: fn = visitor.visitDenseUnion || visitor.visitUnion; break;\n case Type.SparseUnion: fn = visitor.visitSparseUnion || visitor.visitUnion; break;\n case Type.Dictionary: fn = visitor.visitDictionary; break;\n case Type.Interval: fn = visitor.visitInterval; break;\n case Type.IntervalDayTime: fn = visitor.visitIntervalDayTime || visitor.visitInterval; break;\n case Type.IntervalYearMonth: fn = visitor.visitIntervalYearMonth || visitor.visitInterval; break;\n case Type.FixedSizeList: fn = visitor.visitFixedSizeList; break;\n case Type.Map: fn = visitor.visitMap; break;\n }\n if (typeof fn === 'function') return fn;\n if (!throwIfNotFound) return () => null;\n throw new Error(`Unrecognized type '${Type[dtype]}'`);\n}\n\n/** @ignore */\nfunction inferDType(type: T): Type {\n switch (type.typeId) {\n case Type.Null: return Type.Null;\n case Type.Int:\n const { bitWidth, isSigned } = (type as any as Int);\n switch (bitWidth) {\n case 8: return isSigned ? Type.Int8 : Type.Uint8 ;\n case 16: return isSigned ? Type.Int16 : Type.Uint16;\n case 32: return isSigned ? Type.Int32 : Type.Uint32;\n case 64: return isSigned ? Type.Int64 : Type.Uint64;\n }\n return Type.Int;\n case Type.Float:\n switch((type as any as Float).precision) {\n case Precision.HALF: return Type.Float16;\n case Precision.SINGLE: return Type.Float32;\n case Precision.DOUBLE: return Type.Float64;\n }\n return Type.Float;\n case Type.Binary: return Type.Binary;\n case Type.Utf8: return Type.Utf8;\n case Type.Bool: return Type.Bool;\n case Type.Decimal: return Type.Decimal;\n case Type.Time:\n switch ((type as any as Time).unit) {\n case TimeUnit.SECOND: return Type.TimeSecond;\n case TimeUnit.MILLISECOND: return Type.TimeMillisecond;\n case TimeUnit.MICROSECOND: return Type.TimeMicrosecond;\n case TimeUnit.NANOSECOND: return Type.TimeNanosecond;\n }\n return Type.Time;\n case Type.Timestamp:\n switch ((type as any as Timestamp).unit) {\n case TimeUnit.SECOND: return Type.TimestampSecond;\n case TimeUnit.MILLISECOND: return Type.TimestampMillisecond;\n case TimeUnit.MICROSECOND: return Type.TimestampMicrosecond;\n case TimeUnit.NANOSECOND: return Type.TimestampNanosecond;\n }\n return Type.Timestamp;\n case Type.Date:\n switch ((type as any as Date_).unit) {\n case DateUnit.DAY: return Type.DateDay;\n case DateUnit.MILLISECOND: return Type.DateMillisecond;\n }\n return Type.Date;\n case Type.Interval:\n switch ((type as any as Interval).unit) {\n case IntervalUnit.DAY_TIME: return Type.IntervalDayTime;\n case IntervalUnit.YEAR_MONTH: return Type.IntervalYearMonth;\n }\n return Type.Interval;\n case Type.Map: return Type.Map;\n case Type.List: return Type.List;\n case Type.Struct: return Type.Struct;\n case Type.Union:\n switch ((type as any as Union).mode) {\n case UnionMode.Dense: return Type.DenseUnion;\n case UnionMode.Sparse: return Type.SparseUnion;\n }\n return Type.Union;\n case Type.FixedSizeBinary: return Type.FixedSizeBinary;\n case Type.FixedSizeList: return Type.FixedSizeList;\n case Type.Dictionary: return Type.Dictionary;\n }\n throw new Error(`Unrecognized type '${Type[type.typeId]}'`);\n}\n\nexport interface Visitor {\n visitNull (node: any, ...args: any[]): any;\n visitBool (node: any, ...args: any[]): any;\n visitInt (node: any, ...args: any[]): any;\n visitInt8? (node: any, ...args: any[]): any;\n visitInt16? (node: any, ...args: any[]): any;\n visitInt32? (node: any, ...args: any[]): any;\n visitInt64? (node: any, ...args: any[]): any;\n visitUint8? (node: any, ...args: any[]): any;\n visitUint16? (node: any, ...args: any[]): any;\n visitUint32? (node: any, ...args: any[]): any;\n visitUint64? (node: any, ...args: any[]): any;\n visitFloat (node: any, ...args: any[]): any;\n visitFloat16? (node: any, ...args: any[]): any;\n visitFloat32? (node: any, ...args: any[]): any;\n visitFloat64? (node: any, ...args: any[]): any;\n visitUtf8 (node: any, ...args: any[]): any;\n visitBinary (node: any, ...args: any[]): any;\n visitFixedSizeBinary (node: any, ...args: any[]): any;\n visitDate (node: any, ...args: any[]): any;\n visitDateDay? (node: any, ...args: any[]): any;\n visitDateMillisecond? (node: any, ...args: any[]): any;\n visitTimestamp (node: any, ...args: any[]): any;\n visitTimestampSecond? (node: any, ...args: any[]): any;\n visitTimestampMillisecond? (node: any, ...args: any[]): any;\n visitTimestampMicrosecond? (node: any, ...args: any[]): any;\n visitTimestampNanosecond? (node: any, ...args: any[]): any;\n visitTime (node: any, ...args: any[]): any;\n visitTimeSecond? (node: any, ...args: any[]): any;\n visitTimeMillisecond? (node: any, ...args: any[]): any;\n visitTimeMicrosecond? (node: any, ...args: any[]): any;\n visitTimeNanosecond? (node: any, ...args: any[]): any;\n visitDecimal (node: any, ...args: any[]): any;\n visitList (node: any, ...args: any[]): any;\n visitStruct (node: any, ...args: any[]): any;\n visitUnion (node: any, ...args: any[]): any;\n visitDenseUnion? (node: any, ...args: any[]): any;\n visitSparseUnion? (node: any, ...args: any[]): any;\n visitDictionary (node: any, ...args: any[]): any;\n visitInterval (node: any, ...args: any[]): any;\n visitIntervalDayTime? (node: any, ...args: any[]): any;\n visitIntervalYearMonth? (node: any, ...args: any[]): any;\n visitFixedSizeList (node: any, ...args: any[]): any;\n visitMap (node: any, ...args: any[]): any;\n}\n\n// Add these here so they're picked up by the externs creator\n// in the build, and closure-compiler doesn't minify them away\n(Visitor.prototype as any).visitInt8 = null;\n(Visitor.prototype as any).visitInt16 = null;\n(Visitor.prototype as any).visitInt32 = null;\n(Visitor.prototype as any).visitInt64 = null;\n(Visitor.prototype as any).visitUint8 = null;\n(Visitor.prototype as any).visitUint16 = null;\n(Visitor.prototype as any).visitUint32 = null;\n(Visitor.prototype as any).visitUint64 = null;\n(Visitor.prototype as any).visitFloat16 = null;\n(Visitor.prototype as any).visitFloat32 = null;\n(Visitor.prototype as any).visitFloat64 = null;\n(Visitor.prototype as any).visitDateDay = null;\n(Visitor.prototype as any).visitDateMillisecond = null;\n(Visitor.prototype as any).visitTimestampSecond = null;\n(Visitor.prototype as any).visitTimestampMillisecond = null;\n(Visitor.prototype as any).visitTimestampMicrosecond = null;\n(Visitor.prototype as any).visitTimestampNanosecond = null;\n(Visitor.prototype as any).visitTimeSecond = null;\n(Visitor.prototype as any).visitTimeMillisecond = null;\n(Visitor.prototype as any).visitTimeMicrosecond = null;\n(Visitor.prototype as any).visitTimeNanosecond = null;\n(Visitor.prototype as any).visitDenseUnion = null;\n(Visitor.prototype as any).visitSparseUnion = null;\n(Visitor.prototype as any).visitIntervalDayTime = null;\n(Visitor.prototype as any).visitIntervalYearMonth = null;\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/builderctor.d.ts b/frontend/node_modules/apache-arrow/visitor/builderctor.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6237f640ee0c38469eefd274cc09a8b87b5a3abd --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/builderctor.d.ts @@ -0,0 +1,78 @@ +import { Data } from '../data'; +import { Type } from '../enum'; +import { DataType } from '../type'; +import { Visitor } from '../visitor'; +import { VectorType, BuilderCtor } from '../interfaces'; +import { BinaryBuilder } from '../builder/binary'; +import { BoolBuilder } from '../builder/bool'; +import { DateBuilder, DateDayBuilder, DateMillisecondBuilder } from '../builder/date'; +import { DecimalBuilder } from '../builder/decimal'; +import { DictionaryBuilder } from '../builder/dictionary'; +import { FixedSizeBinaryBuilder } from '../builder/fixedsizebinary'; +import { FixedSizeListBuilder } from '../builder/fixedsizelist'; +import { FloatBuilder, Float16Builder, Float32Builder, Float64Builder } from '../builder/float'; +import { IntervalBuilder, IntervalDayTimeBuilder, IntervalYearMonthBuilder } from '../builder/interval'; +import { IntBuilder, Int8Builder, Int16Builder, Int32Builder, Int64Builder, Uint8Builder, Uint16Builder, Uint32Builder, Uint64Builder } from '../builder/int'; +import { ListBuilder } from '../builder/list'; +import { MapBuilder } from '../builder/map'; +import { NullBuilder } from '../builder/null'; +import { StructBuilder } from '../builder/struct'; +import { TimestampBuilder, TimestampSecondBuilder, TimestampMillisecondBuilder, TimestampMicrosecondBuilder, TimestampNanosecondBuilder } from '../builder/timestamp'; +import { TimeBuilder, TimeSecondBuilder, TimeMillisecondBuilder, TimeMicrosecondBuilder, TimeNanosecondBuilder } from '../builder/time'; +import { UnionBuilder, DenseUnionBuilder, SparseUnionBuilder } from '../builder/union'; +import { Utf8Builder } from '../builder/utf8'; +/** @ignore */ +export interface GetBuilderCtor extends Visitor { + visit(type: T): BuilderCtor; + visitMany(types: T[]): BuilderCtor[]; + getVisitFn(type: T): () => BuilderCtor; + getVisitFn(node: VectorType | Data | T): () => BuilderCtor; +} +/** @ignore */ +export declare class GetBuilderCtor extends Visitor { + visitNull(): typeof NullBuilder; + visitBool(): typeof BoolBuilder; + visitInt(): typeof IntBuilder; + visitInt8(): typeof Int8Builder; + visitInt16(): typeof Int16Builder; + visitInt32(): typeof Int32Builder; + visitInt64(): typeof Int64Builder; + visitUint8(): typeof Uint8Builder; + visitUint16(): typeof Uint16Builder; + visitUint32(): typeof Uint32Builder; + visitUint64(): typeof Uint64Builder; + visitFloat(): typeof FloatBuilder; + visitFloat16(): typeof Float16Builder; + visitFloat32(): typeof Float32Builder; + visitFloat64(): typeof Float64Builder; + visitUtf8(): typeof Utf8Builder; + visitBinary(): typeof BinaryBuilder; + visitFixedSizeBinary(): typeof FixedSizeBinaryBuilder; + visitDate(): typeof DateBuilder; + visitDateDay(): typeof DateDayBuilder; + visitDateMillisecond(): typeof DateMillisecondBuilder; + visitTimestamp(): typeof TimestampBuilder; + visitTimestampSecond(): typeof TimestampSecondBuilder; + visitTimestampMillisecond(): typeof TimestampMillisecondBuilder; + visitTimestampMicrosecond(): typeof TimestampMicrosecondBuilder; + visitTimestampNanosecond(): typeof TimestampNanosecondBuilder; + visitTime(): typeof TimeBuilder; + visitTimeSecond(): typeof TimeSecondBuilder; + visitTimeMillisecond(): typeof TimeMillisecondBuilder; + visitTimeMicrosecond(): typeof TimeMicrosecondBuilder; + visitTimeNanosecond(): typeof TimeNanosecondBuilder; + visitDecimal(): typeof DecimalBuilder; + visitList(): typeof ListBuilder; + visitStruct(): typeof StructBuilder; + visitUnion(): typeof UnionBuilder; + visitDenseUnion(): typeof DenseUnionBuilder; + visitSparseUnion(): typeof SparseUnionBuilder; + visitDictionary(): typeof DictionaryBuilder; + visitInterval(): typeof IntervalBuilder; + visitIntervalDayTime(): typeof IntervalDayTimeBuilder; + visitIntervalYearMonth(): typeof IntervalYearMonthBuilder; + visitFixedSizeList(): typeof FixedSizeListBuilder; + visitMap(): typeof MapBuilder; +} +/** @ignore */ +export declare const instance: GetBuilderCtor; diff --git a/frontend/node_modules/apache-arrow/visitor/builderctor.js b/frontend/node_modules/apache-arrow/visitor/builderctor.js new file mode 100644 index 0000000000000000000000000000000000000000..f2bbcd28dfcdab03bc2ba56cacaf6e177393ac3b --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/builderctor.js @@ -0,0 +1,88 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const visitor_1 = require("../visitor"); +const binary_1 = require("../builder/binary"); +const bool_1 = require("../builder/bool"); +const date_1 = require("../builder/date"); +const decimal_1 = require("../builder/decimal"); +const dictionary_1 = require("../builder/dictionary"); +const fixedsizebinary_1 = require("../builder/fixedsizebinary"); +const fixedsizelist_1 = require("../builder/fixedsizelist"); +const float_1 = require("../builder/float"); +const interval_1 = require("../builder/interval"); +const int_1 = require("../builder/int"); +const list_1 = require("../builder/list"); +const map_1 = require("../builder/map"); +const null_1 = require("../builder/null"); +const struct_1 = require("../builder/struct"); +const timestamp_1 = require("../builder/timestamp"); +const time_1 = require("../builder/time"); +const union_1 = require("../builder/union"); +const utf8_1 = require("../builder/utf8"); +/** @ignore */ +class GetBuilderCtor extends visitor_1.Visitor { + visitNull() { return null_1.NullBuilder; } + visitBool() { return bool_1.BoolBuilder; } + visitInt() { return int_1.IntBuilder; } + visitInt8() { return int_1.Int8Builder; } + visitInt16() { return int_1.Int16Builder; } + visitInt32() { return int_1.Int32Builder; } + visitInt64() { return int_1.Int64Builder; } + visitUint8() { return int_1.Uint8Builder; } + visitUint16() { return int_1.Uint16Builder; } + visitUint32() { return int_1.Uint32Builder; } + visitUint64() { return int_1.Uint64Builder; } + visitFloat() { return float_1.FloatBuilder; } + visitFloat16() { return float_1.Float16Builder; } + visitFloat32() { return float_1.Float32Builder; } + visitFloat64() { return float_1.Float64Builder; } + visitUtf8() { return utf8_1.Utf8Builder; } + visitBinary() { return binary_1.BinaryBuilder; } + visitFixedSizeBinary() { return fixedsizebinary_1.FixedSizeBinaryBuilder; } + visitDate() { return date_1.DateBuilder; } + visitDateDay() { return date_1.DateDayBuilder; } + visitDateMillisecond() { return date_1.DateMillisecondBuilder; } + visitTimestamp() { return timestamp_1.TimestampBuilder; } + visitTimestampSecond() { return timestamp_1.TimestampSecondBuilder; } + visitTimestampMillisecond() { return timestamp_1.TimestampMillisecondBuilder; } + visitTimestampMicrosecond() { return timestamp_1.TimestampMicrosecondBuilder; } + visitTimestampNanosecond() { return timestamp_1.TimestampNanosecondBuilder; } + visitTime() { return time_1.TimeBuilder; } + visitTimeSecond() { return time_1.TimeSecondBuilder; } + visitTimeMillisecond() { return time_1.TimeMillisecondBuilder; } + visitTimeMicrosecond() { return time_1.TimeMicrosecondBuilder; } + visitTimeNanosecond() { return time_1.TimeNanosecondBuilder; } + visitDecimal() { return decimal_1.DecimalBuilder; } + visitList() { return list_1.ListBuilder; } + visitStruct() { return struct_1.StructBuilder; } + visitUnion() { return union_1.UnionBuilder; } + visitDenseUnion() { return union_1.DenseUnionBuilder; } + visitSparseUnion() { return union_1.SparseUnionBuilder; } + visitDictionary() { return dictionary_1.DictionaryBuilder; } + visitInterval() { return interval_1.IntervalBuilder; } + visitIntervalDayTime() { return interval_1.IntervalDayTimeBuilder; } + visitIntervalYearMonth() { return interval_1.IntervalYearMonthBuilder; } + visitFixedSizeList() { return fixedsizelist_1.FixedSizeListBuilder; } + visitMap() { return map_1.MapBuilder; } +} +exports.GetBuilderCtor = GetBuilderCtor; +/** @ignore */ +exports.instance = new GetBuilderCtor(); + +//# sourceMappingURL=builderctor.js.map diff --git a/frontend/node_modules/apache-arrow/visitor/builderctor.js.map b/frontend/node_modules/apache-arrow/visitor/builderctor.js.map new file mode 100644 index 0000000000000000000000000000000000000000..6ab6982fac05473bd4154f9c4c6662216befff13 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/builderctor.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor/builderctor.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAKrB,wCAAqC;AAErC,8CAAkD;AAClD,0CAA8C;AAC9C,0CAAsF;AACtF,gDAAoD;AACpD,sDAA0D;AAC1D,gEAAoE;AACpE,4DAAgE;AAChE,4CAAgG;AAChG,kDAAwG;AACxG,wCAA8J;AAC9J,0CAA8C;AAC9C,wCAA4C;AAC5C,0CAA8C;AAC9C,8CAAkD;AAClD,oDAAsK;AACtK,0CAAwI;AACxI,4CAAuF;AACvF,0CAA8C;AAU9C,cAAc;AACd,MAAa,cAAe,SAAQ,iBAAO;IAChC,SAAS,KAAsB,OAAO,kBAAW,CAAC,CAAiB,CAAC;IACpE,SAAS,KAAsB,OAAO,kBAAW,CAAC,CAAiB,CAAC;IACpE,QAAQ,KAAuB,OAAO,gBAAU,CAAC,CAAkB,CAAC;IACpE,SAAS,KAAsB,OAAO,iBAAW,CAAC,CAAiB,CAAC;IACpE,UAAU,KAAqB,OAAO,kBAAY,CAAC,CAAgB,CAAC;IACpE,UAAU,KAAqB,OAAO,kBAAY,CAAC,CAAgB,CAAC;IACpE,UAAU,KAAqB,OAAO,k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AY,OAAO,4BAAqB,CAAC,CAAO,CAAC;IACpE,YAAY,KAAmB,OAAO,wBAAc,CAAC,CAAc,CAAC;IACpE,SAAS,KAAsB,OAAO,kBAAW,CAAC,CAAiB,CAAC;IACpE,WAAW,KAAoB,OAAO,sBAAa,CAAC,CAAe,CAAC;IACpE,UAAU,KAAqB,OAAO,oBAAY,CAAC,CAAgB,CAAC;IACpE,eAAe,KAAgB,OAAO,yBAAiB,CAAC,CAAW,CAAC;IACpE,gBAAgB,KAAe,OAAO,0BAAkB,CAAC,CAAU,CAAC;IACpE,eAAe,KAAgB,OAAO,8BAAiB,CAAC,CAAW,CAAC;IACpE,aAAa,KAAkB,OAAO,0BAAe,CAAC,CAAa,CAAC;IACpE,oBAAoB,KAAW,OAAO,iCAAsB,CAAC,CAAM,CAAC;IACpE,sBAAsB,KAAS,OAAO,mCAAwB,CAAC,CAAI,CAAC;IACpE,kBAAkB,KAAa,OAAO,oCAAoB,CAAC,CAAQ,CAAC;IACpE,QAAQ,KAAuB,OAAO,gBAAU,CAAC,CAAkB,CAAC;CAC9E;AA5CD,wCA4CC;AAED,cAAc;AACD,QAAA,QAAQ,GAAG,IAAI,cAAc,EAAE,CAAC","file":"builderctor.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Type } from '../enum';\nimport { DataType } from '../type';\nimport { Visitor } from '../visitor';\nimport { VectorType, BuilderCtor } from '../interfaces';\nimport { BinaryBuilder } from '../builder/binary';\nimport { BoolBuilder } from '../builder/bool';\nimport { DateBuilder, DateDayBuilder, DateMillisecondBuilder } from '../builder/date';\nimport { DecimalBuilder } from '../builder/decimal';\nimport { DictionaryBuilder } from '../builder/dictionary';\nimport { FixedSizeBinaryBuilder } from '../builder/fixedsizebinary';\nimport { FixedSizeListBuilder } from '../builder/fixedsizelist';\nimport { FloatBuilder, Float16Builder, Float32Builder, Float64Builder } from '../builder/float';\nimport { IntervalBuilder, IntervalDayTimeBuilder, IntervalYearMonthBuilder } from '../builder/interval';\nimport { IntBuilder, Int8Builder, Int16Builder, Int32Builder, Int64Builder, Uint8Builder, Uint16Builder, Uint32Builder, Uint64Builder } from '../builder/int';\nimport { ListBuilder } from '../builder/list';\nimport { MapBuilder } from '../builder/map';\nimport { NullBuilder } from '../builder/null';\nimport { StructBuilder } from '../builder/struct';\nimport { TimestampBuilder, TimestampSecondBuilder, TimestampMillisecondBuilder, TimestampMicrosecondBuilder, TimestampNanosecondBuilder } from '../builder/timestamp';\nimport { TimeBuilder, TimeSecondBuilder, TimeMillisecondBuilder, TimeMicrosecondBuilder, TimeNanosecondBuilder } from '../builder/time';\nimport { UnionBuilder, DenseUnionBuilder, SparseUnionBuilder } from '../builder/union';\nimport { Utf8Builder } from '../builder/utf8';\n\n/** @ignore */\nexport interface GetBuilderCtor extends Visitor {\n visit(type: T): BuilderCtor;\n visitMany(types: T[]): BuilderCtor[];\n getVisitFn(type: T): () => BuilderCtor;\n getVisitFn(node: VectorType | Data | T): () => BuilderCtor;\n}\n\n/** @ignore */\nexport class GetBuilderCtor extends Visitor {\n public visitNull () { return NullBuilder; }\n public visitBool () { return BoolBuilder; }\n public visitInt () { return IntBuilder; }\n public visitInt8 () { return Int8Builder; }\n public visitInt16 () { return Int16Builder; }\n public visitInt32 () { return Int32Builder; }\n public visitInt64 () { return Int64Builder; }\n public visitUint8 () { return Uint8Builder; }\n public visitUint16 () { return Uint16Builder; }\n public visitUint32 () { return Uint32Builder; }\n public visitUint64 () { return Uint64Builder; }\n public visitFloat () { return FloatBuilder; }\n public visitFloat16 () { return Float16Builder; }\n public visitFloat32 () { return Float32Builder; }\n public visitFloat64 () { return Float64Builder; }\n public visitUtf8 () { return Utf8Builder; }\n public visitBinary () { return BinaryBuilder; }\n public visitFixedSizeBinary () { return FixedSizeBinaryBuilder; }\n public visitDate () { return DateBuilder; }\n public visitDateDay () { return DateDayBuilder; }\n public visitDateMillisecond () { return DateMillisecondBuilder; }\n public visitTimestamp () { return TimestampBuilder; }\n public visitTimestampSecond () { return TimestampSecondBuilder; }\n public visitTimestampMillisecond () { return TimestampMillisecondBuilder; }\n public visitTimestampMicrosecond () { return TimestampMicrosecondBuilder; }\n public visitTimestampNanosecond () { return TimestampNanosecondBuilder; }\n public visitTime () { return TimeBuilder; }\n public visitTimeSecond () { return TimeSecondBuilder; }\n public visitTimeMillisecond () { return TimeMillisecondBuilder; }\n public visitTimeMicrosecond () { return TimeMicrosecondBuilder; }\n public visitTimeNanosecond () { return TimeNanosecondBuilder; }\n public visitDecimal () { return DecimalBuilder; }\n public visitList () { return ListBuilder; }\n public visitStruct () { return StructBuilder; }\n public visitUnion () { return UnionBuilder; }\n public visitDenseUnion () { return DenseUnionBuilder; }\n public visitSparseUnion () { return SparseUnionBuilder; }\n public visitDictionary () { return DictionaryBuilder; }\n public visitInterval () { return IntervalBuilder; }\n public visitIntervalDayTime () { return IntervalDayTimeBuilder; }\n public visitIntervalYearMonth () { return IntervalYearMonthBuilder; }\n public visitFixedSizeList () { return FixedSizeListBuilder; }\n public visitMap () { return MapBuilder; }\n}\n\n/** @ignore */\nexport const instance = new GetBuilderCtor();\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/builderctor.mjs b/frontend/node_modules/apache-arrow/visitor/builderctor.mjs new file mode 100644 index 0000000000000000000000000000000000000000..61462e8bd10db206893d9bc4e073b618d93885cb --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/builderctor.mjs @@ -0,0 +1,85 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { Visitor } from '../visitor'; +import { BinaryBuilder } from '../builder/binary'; +import { BoolBuilder } from '../builder/bool'; +import { DateBuilder, DateDayBuilder, DateMillisecondBuilder } from '../builder/date'; +import { DecimalBuilder } from '../builder/decimal'; +import { DictionaryBuilder } from '../builder/dictionary'; +import { FixedSizeBinaryBuilder } from '../builder/fixedsizebinary'; +import { FixedSizeListBuilder } from '../builder/fixedsizelist'; +import { FloatBuilder, Float16Builder, Float32Builder, Float64Builder } from '../builder/float'; +import { IntervalBuilder, IntervalDayTimeBuilder, IntervalYearMonthBuilder } from '../builder/interval'; +import { IntBuilder, Int8Builder, Int16Builder, Int32Builder, Int64Builder, Uint8Builder, Uint16Builder, Uint32Builder, Uint64Builder } from '../builder/int'; +import { ListBuilder } from '../builder/list'; +import { MapBuilder } from '../builder/map'; +import { NullBuilder } from '../builder/null'; +import { StructBuilder } from '../builder/struct'; +import { TimestampBuilder, TimestampSecondBuilder, TimestampMillisecondBuilder, TimestampMicrosecondBuilder, TimestampNanosecondBuilder } from '../builder/timestamp'; +import { TimeBuilder, TimeSecondBuilder, TimeMillisecondBuilder, TimeMicrosecondBuilder, TimeNanosecondBuilder } from '../builder/time'; +import { UnionBuilder, DenseUnionBuilder, SparseUnionBuilder } from '../builder/union'; +import { Utf8Builder } from '../builder/utf8'; +/** @ignore */ +export class GetBuilderCtor extends Visitor { + visitNull() { return NullBuilder; } + visitBool() { return BoolBuilder; } + visitInt() { return IntBuilder; } + visitInt8() { return Int8Builder; } + visitInt16() { return Int16Builder; } + visitInt32() { return Int32Builder; } + visitInt64() { return Int64Builder; } + visitUint8() { return Uint8Builder; } + visitUint16() { return Uint16Builder; } + visitUint32() { return Uint32Builder; } + visitUint64() { return Uint64Builder; } + visitFloat() { return FloatBuilder; } + visitFloat16() { return Float16Builder; } + visitFloat32() { return Float32Builder; } + visitFloat64() { return Float64Builder; } + visitUtf8() { return Utf8Builder; } + visitBinary() { return BinaryBuilder; } + visitFixedSizeBinary() { return FixedSizeBinaryBuilder; } + visitDate() { return DateBuilder; } + visitDateDay() { return DateDayBuilder; } + visitDateMillisecond() { return DateMillisecondBuilder; } + visitTimestamp() { return TimestampBuilder; } + visitTimestampSecond() { return TimestampSecondBuilder; } + visitTimestampMillisecond() { return TimestampMillisecondBuilder; } + visitTimestampMicrosecond() { return TimestampMicrosecondBuilder; } + visitTimestampNanosecond() { return TimestampNanosecondBuilder; } + visitTime() { return TimeBuilder; } + visitTimeSecond() { return TimeSecondBuilder; } + visitTimeMillisecond() { return TimeMillisecondBuilder; } + visitTimeMicrosecond() { return TimeMicrosecondBuilder; } + visitTimeNanosecond() { return TimeNanosecondBuilder; } + visitDecimal() { return DecimalBuilder; } + visitList() { return ListBuilder; } + visitStruct() { return StructBuilder; } + visitUnion() { return UnionBuilder; } + visitDenseUnion() { return DenseUnionBuilder; } + visitSparseUnion() { return SparseUnionBuilder; } + visitDictionary() { return DictionaryBuilder; } + visitInterval() { return IntervalBuilder; } + visitIntervalDayTime() { return IntervalDayTimeBuilder; } + visitIntervalYearMonth() { return IntervalYearMonthBuilder; } + visitFixedSizeList() { return FixedSizeListBuilder; } + visitMap() { return MapBuilder; } +} +/** @ignore */ +export const instance = new GetBuilderCtor(); + +//# sourceMappingURL=builderctor.mjs.map diff --git a/frontend/node_modules/apache-arrow/visitor/builderctor.mjs.map b/frontend/node_modules/apache-arrow/visitor/builderctor.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..e9960b908d91f76f15de43084bf30026919b32e3 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/builderctor.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor/builderctor.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAKrB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAChG,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AACxG,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC9J,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAA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C,CAAa,CAAC;IACpE,oBAAoB,KAAW,OAAO,sBAAsB,CAAC,CAAM,CAAC;IACpE,sBAAsB,KAAS,OAAO,wBAAwB,CAAC,CAAI,CAAC;IACpE,kBAAkB,KAAa,OAAO,oBAAoB,CAAC,CAAQ,CAAC;IACpE,QAAQ,KAAuB,OAAO,UAAU,CAAC,CAAkB,CAAC;CAC9E;AAED,cAAc;AACd,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,cAAc,EAAE,CAAC","file":"builderctor.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Type } from '../enum';\nimport { DataType } from '../type';\nimport { Visitor } from '../visitor';\nimport { VectorType, BuilderCtor } from '../interfaces';\nimport { BinaryBuilder } from '../builder/binary';\nimport { BoolBuilder } from '../builder/bool';\nimport { DateBuilder, DateDayBuilder, DateMillisecondBuilder } from '../builder/date';\nimport { DecimalBuilder } from '../builder/decimal';\nimport { DictionaryBuilder } from '../builder/dictionary';\nimport { FixedSizeBinaryBuilder } from '../builder/fixedsizebinary';\nimport { FixedSizeListBuilder } from '../builder/fixedsizelist';\nimport { FloatBuilder, Float16Builder, Float32Builder, Float64Builder } from '../builder/float';\nimport { IntervalBuilder, IntervalDayTimeBuilder, IntervalYearMonthBuilder } from '../builder/interval';\nimport { IntBuilder, Int8Builder, Int16Builder, Int32Builder, Int64Builder, Uint8Builder, Uint16Builder, Uint32Builder, Uint64Builder } from '../builder/int';\nimport { ListBuilder } from '../builder/list';\nimport { MapBuilder } from '../builder/map';\nimport { NullBuilder } from '../builder/null';\nimport { StructBuilder } from '../builder/struct';\nimport { TimestampBuilder, TimestampSecondBuilder, TimestampMillisecondBuilder, TimestampMicrosecondBuilder, TimestampNanosecondBuilder } from '../builder/timestamp';\nimport { TimeBuilder, TimeSecondBuilder, TimeMillisecondBuilder, TimeMicrosecondBuilder, TimeNanosecondBuilder } from '../builder/time';\nimport { UnionBuilder, DenseUnionBuilder, SparseUnionBuilder } from '../builder/union';\nimport { Utf8Builder } from '../builder/utf8';\n\n/** @ignore */\nexport interface GetBuilderCtor extends Visitor {\n visit(type: T): BuilderCtor;\n visitMany(types: T[]): BuilderCtor[];\n getVisitFn(type: T): () => BuilderCtor;\n getVisitFn(node: VectorType | Data | T): () => BuilderCtor;\n}\n\n/** @ignore */\nexport class GetBuilderCtor extends Visitor {\n public visitNull () { return NullBuilder; }\n public visitBool () { return BoolBuilder; }\n public visitInt () { return IntBuilder; }\n public visitInt8 () { return Int8Builder; }\n public visitInt16 () { return Int16Builder; }\n public visitInt32 () { return Int32Builder; }\n public visitInt64 () { return Int64Builder; }\n public visitUint8 () { return Uint8Builder; }\n public visitUint16 () { return Uint16Builder; }\n public visitUint32 () { return Uint32Builder; }\n public visitUint64 () { return Uint64Builder; }\n public visitFloat () { return FloatBuilder; }\n public visitFloat16 () { return Float16Builder; }\n public visitFloat32 () { return Float32Builder; }\n public visitFloat64 () { return Float64Builder; }\n public visitUtf8 () { return Utf8Builder; }\n public visitBinary () { return BinaryBuilder; }\n public visitFixedSizeBinary () { return FixedSizeBinaryBuilder; }\n public visitDate () { return DateBuilder; }\n public visitDateDay () { return DateDayBuilder; }\n public visitDateMillisecond () { return DateMillisecondBuilder; }\n public visitTimestamp () { return TimestampBuilder; }\n public visitTimestampSecond () { return TimestampSecondBuilder; }\n public visitTimestampMillisecond () { return TimestampMillisecondBuilder; }\n public visitTimestampMicrosecond () { return TimestampMicrosecondBuilder; }\n public visitTimestampNanosecond () { return TimestampNanosecondBuilder; }\n public visitTime () { return TimeBuilder; }\n public visitTimeSecond () { return TimeSecondBuilder; }\n public visitTimeMillisecond () { return TimeMillisecondBuilder; }\n public visitTimeMicrosecond () { return TimeMicrosecondBuilder; }\n public visitTimeNanosecond () { return TimeNanosecondBuilder; }\n public visitDecimal () { return DecimalBuilder; }\n public visitList () { return ListBuilder; }\n public visitStruct () { return StructBuilder; }\n public visitUnion () { return UnionBuilder; }\n public visitDenseUnion () { return DenseUnionBuilder; }\n public visitSparseUnion () { return SparseUnionBuilder; }\n public visitDictionary () { return DictionaryBuilder; }\n public visitInterval () { return IntervalBuilder; }\n public visitIntervalDayTime () { return IntervalDayTimeBuilder; }\n public visitIntervalYearMonth () { return IntervalYearMonthBuilder; }\n public visitFixedSizeList () { return FixedSizeListBuilder; }\n public visitMap () { return MapBuilder; }\n}\n\n/** @ignore */\nexport const instance = new GetBuilderCtor();\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/bytewidth.d.ts b/frontend/node_modules/apache-arrow/visitor/bytewidth.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d490d867b90885999f8e1d7426b243ab94c8729b --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/bytewidth.d.ts @@ -0,0 +1,38 @@ +import { Data } from '../data'; +import { Visitor } from '../visitor'; +import { VectorType } from '../interfaces'; +import { Type } from '../enum'; +import { Schema, Field } from '../schema'; +import { DataType, Dictionary, Float, Int, Date_, Interval, Time, Timestamp, Bool, Null, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct, Union } from '../type'; +/** @ignore */ +export interface ByteWidthVisitor extends Visitor { + visit(node: T): number; + visitMany(nodes: T[]): number[]; + getVisitFn(node: T): (type: DataType) => number; + getVisitFn(node: VectorType | Data | T): (type: T) => number; +} +/** @ignore */ +export declare class ByteWidthVisitor extends Visitor { + visitNull(____: Null): number; + visitInt(type: Int): number; + visitFloat(type: Float): number; + visitBinary(type: Binary): void; + visitUtf8(type: Utf8): void; + visitBool(____: Bool): number; + visitDecimal(____: Decimal): number; + visitDate(type: Date_): number; + visitTime(type: Time): number; + visitTimestamp(type: Timestamp): 4 | 8; + visitInterval(type: Interval): number; + visitList(type: List): void; + visitStruct(type: Struct): number; + visitUnion(type: Union): number; + visitFixedSizeBinary(type: FixedSizeBinary): number; + visitFixedSizeList(type: FixedSizeList): number; + visitMap(type: Map_): number; + visitDictionary(type: Dictionary): number; + visitFields(fields: Field[]): number[]; + visitSchema(schema: Schema): number; +} +/** @ignore */ +export declare const instance: ByteWidthVisitor; diff --git a/frontend/node_modules/apache-arrow/visitor/bytewidth.js b/frontend/node_modules/apache-arrow/visitor/bytewidth.js new file mode 100644 index 0000000000000000000000000000000000000000..fff153fdab10003cf3876293a497cf7c431fb79d --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/bytewidth.js @@ -0,0 +1,35 @@ +"use strict"; +/* istanbul ignore file */ +Object.defineProperty(exports, "__esModule", { value: true }); +const visitor_1 = require("../visitor"); +const enum_1 = require("../enum"); +/** @ignore */ const sum = (x, y) => x + y; +/** @ignore */ const variableWidthColumnErrorMessage = (type) => `Cannot compute the byte width of variable-width column ${type}`; +/** @ignore */ +class ByteWidthVisitor extends visitor_1.Visitor { + visitNull(____) { return 0; } + visitInt(type) { return type.bitWidth / 8; } + visitFloat(type) { return type.ArrayType.BYTES_PER_ELEMENT; } + visitBinary(type) { throw new Error(variableWidthColumnErrorMessage(type)); } + visitUtf8(type) { throw new Error(variableWidthColumnErrorMessage(type)); } + visitBool(____) { return 1 / 8; } + visitDecimal(____) { return 16; } + visitDate(type) { return (type.unit + 1) * 4; } + visitTime(type) { return type.bitWidth / 8; } + visitTimestamp(type) { return type.unit === enum_1.TimeUnit.SECOND ? 4 : 8; } + visitInterval(type) { return (type.unit + 1) * 4; } + visitList(type) { throw new Error(variableWidthColumnErrorMessage(type)); } + visitStruct(type) { return this.visitFields(type.children).reduce(sum, 0); } + visitUnion(type) { return this.visitFields(type.children).reduce(sum, 0); } + visitFixedSizeBinary(type) { return type.byteWidth; } + visitFixedSizeList(type) { return type.listSize * this.visitFields(type.children).reduce(sum, 0); } + visitMap(type) { return this.visitFields(type.children).reduce(sum, 0); } + visitDictionary(type) { return this.visit(type.indices); } + visitFields(fields) { return (fields || []).map((field) => this.visit(field.type)); } + visitSchema(schema) { return this.visitFields(schema.fields).reduce(sum, 0); } +} +exports.ByteWidthVisitor = ByteWidthVisitor; +/** @ignore */ +exports.instance = new ByteWidthVisitor(); + +//# sourceMappingURL=bytewidth.js.map diff --git a/frontend/node_modules/apache-arrow/visitor/bytewidth.js.map b/frontend/node_modules/apache-arrow/visitor/bytewidth.js.map new file mode 100644 index 0000000000000000000000000000000000000000..035e2cc0c8e7100df375b6d2057d0cc14439214b --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/bytewidth.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor/bytewidth.ts"],"names":[],"mappings":";AAAA,0BAA0B;;AAoB1B,wCAAqC;AAErC,kCAAyC;AASzC,cAAc,CAAC,MAAM,GAAG,GAAG,CAAC,CAAS,EAAE,CAAS,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;AAC3D,cAAc,CAAC,MAAM,+BAA+B,GAAG,CAAC,IAAc,EAAE,EAAE,CAAC,0DAA0D,IAAI,EAAE,CAAC;AAU5I,cAAc;AACd,MAAa,gBAAiB,SAAQ,iBAAO;IAClC,SAAS,CAAa,IAAU,IAAgB,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3D,QAAQ,CAAc,IAAS,IAAiB,OAAO,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC;IAC3E,UAAU,CAAY,IAAW,IAAe,OAAO,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAC1F,WAAW,CAAW,IAAY,IAAc,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,IAAI,CAAC,CAAC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I,CAAC,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACxH,QAAQ,CAAc,IAAU,IAAgB,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACxG,eAAe,CAAO,IAAgB,IAAU,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAClF,WAAW,CAAW,MAAe,IAAW,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/G,WAAW,CAAW,MAAc,IAAY,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;CAClH;AArBD,4CAqBC;AAED,cAAc;AACD,QAAA,QAAQ,GAAG,IAAI,gBAAgB,EAAE,CAAC","file":"bytewidth.js","sourcesContent":["/* istanbul ignore file */\n\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Visitor } from '../visitor';\nimport { VectorType } from '../interfaces';\nimport { Type, TimeUnit } from '../enum';\nimport { Schema, Field } from '../schema';\nimport {\n DataType, Dictionary,\n Float, Int, Date_, Interval, Time, Timestamp,\n Bool, Null, Utf8, Binary, Decimal, FixedSizeBinary,\n List, FixedSizeList, Map_, Struct, Union,\n} from '../type';\n\n/** @ignore */ const sum = (x: number, y: number) => x + y;\n/** @ignore */ const variableWidthColumnErrorMessage = (type: DataType) => `Cannot compute the byte width of variable-width column ${type}`;\n\n/** @ignore */\nexport interface ByteWidthVisitor extends Visitor {\n visit(node: T): number;\n visitMany(nodes: T[]): number[];\n getVisitFn (node: T): (type: DataType) => number;\n getVisitFn(node: VectorType | Data | T): (type: T) => number;\n}\n\n/** @ignore */\nexport class ByteWidthVisitor extends Visitor {\n public visitNull (____: Null ) { return 0; }\n public visitInt (type: Int ) { return type.bitWidth / 8; }\n public visitFloat (type: Float ) { return type.ArrayType.BYTES_PER_ELEMENT; }\n public visitBinary (type: Binary ) { throw new Error(variableWidthColumnErrorMessage(type)); }\n public visitUtf8 (type: Utf8 ) { throw new Error(variableWidthColumnErrorMessage(type)); }\n public visitBool (____: Bool ) { return 1 / 8; }\n public visitDecimal (____: Decimal ) { return 16; }\n public visitDate (type: Date_ ) { return (type.unit + 1) * 4; }\n public visitTime (type: Time ) { return type.bitWidth / 8; }\n public visitTimestamp (type: Timestamp ) { return type.unit === TimeUnit.SECOND ? 4 : 8; }\n public visitInterval (type: Interval ) { return (type.unit + 1) * 4; }\n public visitList (type: List ) { throw new Error(variableWidthColumnErrorMessage(type)); }\n public visitStruct (type: Struct ) { return this.visitFields(type.children).reduce(sum, 0); }\n public visitUnion (type: Union ) { return this.visitFields(type.children).reduce(sum, 0); }\n public visitFixedSizeBinary (type: FixedSizeBinary ) { return type.byteWidth; }\n public visitFixedSizeList (type: FixedSizeList ) { return type.listSize * this.visitFields(type.children).reduce(sum, 0); }\n public visitMap (type: Map_ ) { return this.visitFields(type.children).reduce(sum, 0); }\n public visitDictionary (type: Dictionary ) { return this.visit(type.indices); }\n public visitFields (fields: Field[] ) { return (fields || []).map((field) => this.visit(field.type)); }\n public visitSchema (schema: Schema ) { return this.visitFields(schema.fields).reduce(sum, 0); }\n}\n\n/** @ignore */\nexport const instance = new ByteWidthVisitor();\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/bytewidth.mjs b/frontend/node_modules/apache-arrow/visitor/bytewidth.mjs new file mode 100644 index 0000000000000000000000000000000000000000..a2e43d33559ae6d001b7aed327ddbd6b5bebb08f --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/bytewidth.mjs @@ -0,0 +1,32 @@ +/* istanbul ignore file */ +import { Visitor } from '../visitor'; +import { TimeUnit } from '../enum'; +/** @ignore */ const sum = (x, y) => x + y; +/** @ignore */ const variableWidthColumnErrorMessage = (type) => `Cannot compute the byte width of variable-width column ${type}`; +/** @ignore */ +export class ByteWidthVisitor extends Visitor { + visitNull(____) { return 0; } + visitInt(type) { return type.bitWidth / 8; } + visitFloat(type) { return type.ArrayType.BYTES_PER_ELEMENT; } + visitBinary(type) { throw new Error(variableWidthColumnErrorMessage(type)); } + visitUtf8(type) { throw new Error(variableWidthColumnErrorMessage(type)); } + visitBool(____) { return 1 / 8; } + visitDecimal(____) { return 16; } + visitDate(type) { return (type.unit + 1) * 4; } + visitTime(type) { return type.bitWidth / 8; } + visitTimestamp(type) { return type.unit === TimeUnit.SECOND ? 4 : 8; } + visitInterval(type) { return (type.unit + 1) * 4; } + visitList(type) { throw new Error(variableWidthColumnErrorMessage(type)); } + visitStruct(type) { return this.visitFields(type.children).reduce(sum, 0); } + visitUnion(type) { return this.visitFields(type.children).reduce(sum, 0); } + visitFixedSizeBinary(type) { return type.byteWidth; } + visitFixedSizeList(type) { return type.listSize * this.visitFields(type.children).reduce(sum, 0); } + visitMap(type) { return this.visitFields(type.children).reduce(sum, 0); } + visitDictionary(type) { return this.visit(type.indices); } + visitFields(fields) { return (fields || []).map((field) => this.visit(field.type)); } + visitSchema(schema) { return this.visitFields(schema.fields).reduce(sum, 0); } +} +/** @ignore */ +export const instance = new ByteWidthVisitor(); + +//# sourceMappingURL=bytewidth.mjs.map diff --git a/frontend/node_modules/apache-arrow/visitor/bytewidth.mjs.map b/frontend/node_modules/apache-arrow/visitor/bytewidth.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..300543b152de5936f068028f95f7f4d65ec4d511 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/bytewidth.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor/bytewidth.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAoB1B,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAQ,QAAQ,EAAE,MAAM,SAAS,CAAC;AASzC,cAAc,CAAC,MAAM,GAAG,GAAG,CAAC,CAAS,EAAE,CAAS,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;AAC3D,cAAc,CAAC,MAAM,+BAA+B,GAAG,CAAC,IAAc,EAAE,EAAE,CAAC,0DAA0D,IAAI,EAAE,CAAC;AAU5I,cAAc;AACd,MAAM,OAAO,gBAAiB,SAAQ,OAAO;IAClC,SAAS,CAAa,IAAU,IAAgB,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3D,QAAQ,CAAc,IAAS,IAAiB,OAAO,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC;IAC3E,UAAU,CAAY,IAAW,IAAe,OAAO,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAC1F,WAAW,CAAW,IAAY,IAAc,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACzG,SAAS,CAAa,IAAU,IAAgB,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACzG,SAAS,CAAa,IAAU,IAAgB,OAAO,CAAC,GAAG,CAAC,C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WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACxG,eAAe,CAAO,IAAgB,IAAU,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAClF,WAAW,CAAW,MAAe,IAAW,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/G,WAAW,CAAW,MAAc,IAAY,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;CAClH;AAED,cAAc;AACd,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,gBAAgB,EAAE,CAAC","file":"bytewidth.js","sourcesContent":["/* istanbul ignore file */\n\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Visitor } from '../visitor';\nimport { VectorType } from '../interfaces';\nimport { Type, TimeUnit } from '../enum';\nimport { Schema, Field } from '../schema';\nimport {\n DataType, Dictionary,\n Float, Int, Date_, Interval, Time, Timestamp,\n Bool, Null, Utf8, Binary, Decimal, FixedSizeBinary,\n List, FixedSizeList, Map_, Struct, Union,\n} from '../type';\n\n/** @ignore */ const sum = (x: number, y: number) => x + y;\n/** @ignore */ const variableWidthColumnErrorMessage = (type: DataType) => `Cannot compute the byte width of variable-width column ${type}`;\n\n/** @ignore */\nexport interface ByteWidthVisitor extends Visitor {\n visit(node: T): number;\n visitMany(nodes: T[]): number[];\n getVisitFn (node: T): (type: DataType) => number;\n getVisitFn(node: VectorType | Data | T): (type: T) => number;\n}\n\n/** @ignore */\nexport class ByteWidthVisitor extends Visitor {\n public visitNull (____: Null ) { return 0; }\n public visitInt (type: Int ) { return type.bitWidth / 8; }\n public visitFloat (type: Float ) { return type.ArrayType.BYTES_PER_ELEMENT; }\n public visitBinary (type: Binary ) { throw new Error(variableWidthColumnErrorMessage(type)); }\n public visitUtf8 (type: Utf8 ) { throw new Error(variableWidthColumnErrorMessage(type)); }\n public visitBool (____: Bool ) { return 1 / 8; }\n public visitDecimal (____: Decimal ) { return 16; }\n public visitDate (type: Date_ ) { return (type.unit + 1) * 4; }\n public visitTime (type: Time ) { return type.bitWidth / 8; }\n public visitTimestamp (type: Timestamp ) { return type.unit === TimeUnit.SECOND ? 4 : 8; }\n public visitInterval (type: Interval ) { return (type.unit + 1) * 4; }\n public visitList (type: List ) { throw new Error(variableWidthColumnErrorMessage(type)); }\n public visitStruct (type: Struct ) { return this.visitFields(type.children).reduce(sum, 0); }\n public visitUnion (type: Union ) { return this.visitFields(type.children).reduce(sum, 0); }\n public visitFixedSizeBinary (type: FixedSizeBinary ) { return type.byteWidth; }\n public visitFixedSizeList (type: FixedSizeList ) { return type.listSize * this.visitFields(type.children).reduce(sum, 0); }\n public visitMap (type: Map_ ) { return this.visitFields(type.children).reduce(sum, 0); }\n public visitDictionary (type: Dictionary ) { return this.visit(type.indices); }\n public visitFields (fields: Field[] ) { return (fields || []).map((field) => this.visit(field.type)); }\n public visitSchema (schema: Schema ) { return this.visitFields(schema.fields).reduce(sum, 0); }\n}\n\n/** @ignore */\nexport const instance = new ByteWidthVisitor();\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/get.d.ts b/frontend/node_modules/apache-arrow/visitor/get.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0442994d69a81732d932a6d7518e7c19f88a1faa --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/get.d.ts @@ -0,0 +1,60 @@ +import { Data } from '../data'; +import { Visitor } from '../visitor'; +import { VectorType } from '../interfaces'; +import { Type } from '../enum'; +import { DataType, Dictionary, Bool, Null, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct, Float, Float16, Float32, Float64, Int, Uint8, Uint16, Uint32, Uint64, Int8, Int16, Int32, Int64, Date_, DateDay, DateMillisecond, Interval, IntervalDayTime, IntervalYearMonth, Time, TimeSecond, TimeMillisecond, TimeMicrosecond, TimeNanosecond, Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond, Union, DenseUnion, SparseUnion } from '../type'; +/** @ignore */ +export interface GetVisitor extends Visitor { + visit(node: T, index: number): T['TValue']; + visitMany(nodes: T[], indices: number[]): T['TValue'][]; + getVisitFn(node: T): (vector: VectorType, index: number) => VectorType['TValue']; + getVisitFn(node: VectorType | Data | T): (vector: VectorType, index: number) => VectorType['TValue']; + visitNull(vector: VectorType, index: number): T['TValue']; + visitBool(vector: VectorType, index: number): T['TValue']; + visitInt(vector: VectorType, index: number): T['TValue']; + visitInt8(vector: VectorType, index: number): T['TValue']; + visitInt16(vector: VectorType, index: number): T['TValue']; + visitInt32(vector: VectorType, index: number): T['TValue']; + visitInt64(vector: VectorType, index: number): T['TValue']; + visitUint8(vector: VectorType, index: number): T['TValue']; + visitUint16(vector: VectorType, index: number): T['TValue']; + visitUint32(vector: VectorType, index: number): T['TValue']; + visitUint64(vector: VectorType, index: number): T['TValue']; + visitFloat(vector: VectorType, index: number): T['TValue']; + visitFloat16(vector: VectorType, index: number): T['TValue']; + visitFloat32(vector: VectorType, index: number): T['TValue']; + visitFloat64(vector: VectorType, index: number): T['TValue']; + visitUtf8(vector: VectorType, index: number): T['TValue']; + visitBinary(vector: VectorType, index: number): T['TValue']; + visitFixedSizeBinary(vector: VectorType, index: number): T['TValue']; + visitDate(vector: VectorType, index: number): T['TValue']; + visitDateDay(vector: VectorType, index: number): T['TValue']; + visitDateMillisecond(vector: VectorType, index: number): T['TValue']; + visitTimestamp(vector: VectorType, index: number): T['TValue']; + visitTimestampSecond(vector: VectorType, index: number): T['TValue']; + visitTimestampMillisecond(vector: VectorType, index: number): T['TValue']; + visitTimestampMicrosecond(vector: VectorType, index: number): T['TValue']; + visitTimestampNanosecond(vector: VectorType, index: number): T['TValue']; + visitTime(vector: VectorType, index: number): T['TValue']; + visitTimeSecond(vector: VectorType, index: number): T['TValue']; + visitTimeMillisecond(vector: VectorType, index: number): T['TValue']; + visitTimeMicrosecond(vector: VectorType, index: number): T['TValue']; + visitTimeNanosecond(vector: VectorType, index: number): T['TValue']; + visitDecimal(vector: VectorType, index: number): T['TValue']; + visitList(vector: VectorType, index: number): T['TValue']; + visitStruct(vector: VectorType, index: number): T['TValue']; + visitUnion(vector: VectorType, index: number): T['TValue']; + visitDenseUnion(vector: VectorType, index: number): T['TValue']; + visitSparseUnion(vector: VectorType, index: number): T['TValue']; + visitDictionary(vector: VectorType, index: number): T['TValue']; + visitInterval(vector: VectorType, index: number): T['TValue']; + visitIntervalDayTime(vector: VectorType, index: number): T['TValue']; + visitIntervalYearMonth(vector: VectorType, index: number): T['TValue']; + visitFixedSizeList(vector: VectorType, index: number): T['TValue']; + visitMap(vector: VectorType, index: number): T['TValue']; +} +/** @ignore */ +export declare class GetVisitor extends Visitor { +} +/** @ignore */ +export declare const instance: GetVisitor; diff --git a/frontend/node_modules/apache-arrow/visitor/get.js b/frontend/node_modules/apache-arrow/visitor/get.js new file mode 100644 index 0000000000000000000000000000000000000000..2df19b11859ea6d054bf5fb0e644e0826d2096f3 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/get.js @@ -0,0 +1,222 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const bn_1 = require("../util/bn"); +const visitor_1 = require("../visitor"); +const utf8_1 = require("../util/utf8"); +const math_1 = require("../util/math"); +const enum_1 = require("../enum"); +/** @ignore */ +class GetVisitor extends visitor_1.Visitor { +} +exports.GetVisitor = GetVisitor; +/** @ignore */ const epochDaysToMs = (data, index) => 86400000 * data[index]; +/** @ignore */ const epochMillisecondsLongToMs = (data, index) => 4294967296 * (data[index + 1]) + (data[index] >>> 0); +/** @ignore */ const epochMicrosecondsLongToMs = (data, index) => 4294967296 * (data[index + 1] / 1000) + ((data[index] >>> 0) / 1000); +/** @ignore */ const epochNanosecondsLongToMs = (data, index) => 4294967296 * (data[index + 1] / 1000000) + ((data[index] >>> 0) / 1000000); +/** @ignore */ const epochMillisecondsToDate = (epochMs) => new Date(epochMs); +/** @ignore */ const epochDaysToDate = (data, index) => epochMillisecondsToDate(epochDaysToMs(data, index)); +/** @ignore */ const epochMillisecondsLongToDate = (data, index) => epochMillisecondsToDate(epochMillisecondsLongToMs(data, index)); +/** @ignore */ +const getNull = (_vector, _index) => null; +/** @ignore */ +const getVariableWidthBytes = (values, valueOffsets, index) => { + const { [index]: x, [index + 1]: y } = valueOffsets; + return x != null && y != null ? values.subarray(x, y) : null; +}; +/** @ignore */ +const getBool = ({ offset, values }, index) => { + const idx = offset + index; + const byte = values[idx >> 3]; + return (byte & 1 << (idx % 8)) !== 0; +}; +/** @ignore */ +const getDateDay = ({ values }, index) => epochDaysToDate(values, index); +/** @ignore */ +const getDateMillisecond = ({ values }, index) => epochMillisecondsLongToDate(values, index * 2); +/** @ignore */ +const getNumeric = ({ stride, values }, index) => values[stride * index]; +/** @ignore */ +const getFloat16 = ({ stride, values }, index) => math_1.uint16ToFloat64(values[stride * index]); +/** @ignore */ +const getBigInts = ({ stride, values, type }, index) => bn_1.BN.new(values.subarray(stride * index, stride * (index + 1)), type.isSigned); +/** @ignore */ +const getFixedSizeBinary = ({ stride, values }, index) => values.subarray(stride * index, stride * (index + 1)); +/** @ignore */ +const getBinary = ({ values, valueOffsets }, index) => getVariableWidthBytes(values, valueOffsets, index); +/** @ignore */ +const getUtf8 = ({ values, valueOffsets }, index) => { + const bytes = getVariableWidthBytes(values, valueOffsets, index); + return bytes !== null ? utf8_1.decodeUtf8(bytes) : null; +}; +/* istanbul ignore next */ +/** @ignore */ +const getInt = (vector, index) => (vector.type.bitWidth < 64 + ? getNumeric(vector, index) + : getBigInts(vector, index)); +/* istanbul ignore next */ +/** @ignore */ +const getFloat = (vector, index) => (vector.type.precision !== enum_1.Precision.HALF + ? getNumeric(vector, index) + : getFloat16(vector, index)); +/* istanbul ignore next */ +/** @ignore */ +const getDate = (vector, index) => (vector.type.unit === enum_1.DateUnit.DAY + ? getDateDay(vector, index) + : getDateMillisecond(vector, index)); +/** @ignore */ +const getTimestampSecond = ({ values }, index) => 1000 * epochMillisecondsLongToMs(values, index * 2); +/** @ignore */ +const getTimestampMillisecond = ({ values }, index) => epochMillisecondsLongToMs(values, index * 2); +/** @ignore */ +const getTimestampMicrosecond = ({ values }, index) => epochMicrosecondsLongToMs(values, index * 2); +/** @ignore */ +const getTimestampNanosecond = ({ values }, index) => epochNanosecondsLongToMs(values, index * 2); +/* istanbul ignore next */ +/** @ignore */ +const getTimestamp = (vector, index) => { + switch (vector.type.unit) { + case enum_1.TimeUnit.SECOND: return getTimestampSecond(vector, index); + case enum_1.TimeUnit.MILLISECOND: return getTimestampMillisecond(vector, index); + case enum_1.TimeUnit.MICROSECOND: return getTimestampMicrosecond(vector, index); + case enum_1.TimeUnit.NANOSECOND: return getTimestampNanosecond(vector, index); + } +}; +/** @ignore */ +const getTimeSecond = ({ values, stride }, index) => values[stride * index]; +/** @ignore */ +const getTimeMillisecond = ({ values, stride }, index) => values[stride * index]; +/** @ignore */ +const getTimeMicrosecond = ({ values }, index) => bn_1.BN.signed(values.subarray(2 * index, 2 * (index + 1))); +/** @ignore */ +const getTimeNanosecond = ({ values }, index) => bn_1.BN.signed(values.subarray(2 * index, 2 * (index + 1))); +/* istanbul ignore next */ +/** @ignore */ +const getTime = (vector, index) => { + switch (vector.type.unit) { + case enum_1.TimeUnit.SECOND: return getTimeSecond(vector, index); + case enum_1.TimeUnit.MILLISECOND: return getTimeMillisecond(vector, index); + case enum_1.TimeUnit.MICROSECOND: return getTimeMicrosecond(vector, index); + case enum_1.TimeUnit.NANOSECOND: return getTimeNanosecond(vector, index); + } +}; +/** @ignore */ +const getDecimal = ({ values }, index) => bn_1.BN.decimal(values.subarray(4 * index, 4 * (index + 1))); +/** @ignore */ +const getList = (vector, index) => { + const child = vector.getChildAt(0), { valueOffsets, stride } = vector; + return child.slice(valueOffsets[index * stride], valueOffsets[(index * stride) + 1]); +}; +/** @ignore */ +const getMap = (vector, index) => { + return vector.bind(index); +}; +/** @ignore */ +const getStruct = (vector, index) => { + return vector.bind(index); +}; +/* istanbul ignore next */ +/** @ignore */ +const getUnion = (vector, index) => { + return vector.type.mode === enum_1.UnionMode.Dense ? + getDenseUnion(vector, index) : + getSparseUnion(vector, index); +}; +/** @ignore */ +const getDenseUnion = (vector, index) => { + const childIndex = vector.typeIdToChildIndex[vector.typeIds[index]]; + const child = vector.getChildAt(childIndex); + return child ? child.get(vector.valueOffsets[index]) : null; +}; +/** @ignore */ +const getSparseUnion = (vector, index) => { + const childIndex = vector.typeIdToChildIndex[vector.typeIds[index]]; + const child = vector.getChildAt(childIndex); + return child ? child.get(index) : null; +}; +/** @ignore */ +const getDictionary = (vector, index) => { + return vector.getValue(vector.getKey(index)); +}; +/* istanbul ignore next */ +/** @ignore */ +const getInterval = (vector, index) => (vector.type.unit === enum_1.IntervalUnit.DAY_TIME) + ? getIntervalDayTime(vector, index) + : getIntervalYearMonth(vector, index); +/** @ignore */ +const getIntervalDayTime = ({ values }, index) => values.subarray(2 * index, 2 * (index + 1)); +/** @ignore */ +const getIntervalYearMonth = ({ values }, index) => { + const interval = values[index]; + const int32s = new Int32Array(2); + int32s[0] = interval / 12 | 0; /* years */ + int32s[1] = interval % 12 | 0; /* months */ + return int32s; +}; +/** @ignore */ +const getFixedSizeList = (vector, index) => { + const child = vector.getChildAt(0), { stride } = vector; + return child.slice(index * stride, (index + 1) * stride); +}; +GetVisitor.prototype.visitNull = getNull; +GetVisitor.prototype.visitBool = getBool; +GetVisitor.prototype.visitInt = getInt; +GetVisitor.prototype.visitInt8 = getNumeric; +GetVisitor.prototype.visitInt16 = getNumeric; +GetVisitor.prototype.visitInt32 = getNumeric; +GetVisitor.prototype.visitInt64 = getBigInts; +GetVisitor.prototype.visitUint8 = getNumeric; +GetVisitor.prototype.visitUint16 = getNumeric; +GetVisitor.prototype.visitUint32 = getNumeric; +GetVisitor.prototype.visitUint64 = getBigInts; +GetVisitor.prototype.visitFloat = getFloat; +GetVisitor.prototype.visitFloat16 = getFloat16; +GetVisitor.prototype.visitFloat32 = getNumeric; +GetVisitor.prototype.visitFloat64 = getNumeric; +GetVisitor.prototype.visitUtf8 = getUtf8; +GetVisitor.prototype.visitBinary = getBinary; +GetVisitor.prototype.visitFixedSizeBinary = getFixedSizeBinary; +GetVisitor.prototype.visitDate = getDate; +GetVisitor.prototype.visitDateDay = getDateDay; +GetVisitor.prototype.visitDateMillisecond = getDateMillisecond; +GetVisitor.prototype.visitTimestamp = getTimestamp; +GetVisitor.prototype.visitTimestampSecond = getTimestampSecond; +GetVisitor.prototype.visitTimestampMillisecond = getTimestampMillisecond; +GetVisitor.prototype.visitTimestampMicrosecond = getTimestampMicrosecond; +GetVisitor.prototype.visitTimestampNanosecond = getTimestampNanosecond; +GetVisitor.prototype.visitTime = getTime; +GetVisitor.prototype.visitTimeSecond = getTimeSecond; +GetVisitor.prototype.visitTimeMillisecond = getTimeMillisecond; +GetVisitor.prototype.visitTimeMicrosecond = getTimeMicrosecond; +GetVisitor.prototype.visitTimeNanosecond = getTimeNanosecond; +GetVisitor.prototype.visitDecimal = getDecimal; +GetVisitor.prototype.visitList = getList; +GetVisitor.prototype.visitStruct = getStruct; +GetVisitor.prototype.visitUnion = getUnion; +GetVisitor.prototype.visitDenseUnion = getDenseUnion; +GetVisitor.prototype.visitSparseUnion = getSparseUnion; +GetVisitor.prototype.visitDictionary = getDictionary; +GetVisitor.prototype.visitInterval = getInterval; +GetVisitor.prototype.visitIntervalDayTime = getIntervalDayTime; +GetVisitor.prototype.visitIntervalYearMonth = getIntervalYearMonth; +GetVisitor.prototype.visitFixedSizeList = getFixedSizeList; +GetVisitor.prototype.visitMap = getMap; +/** @ignore */ +exports.instance = new GetVisitor(); + +//# sourceMappingURL=get.js.map diff --git a/frontend/node_modules/apache-arrow/visitor/get.js.map b/frontend/node_modules/apache-arrow/visitor/get.js.map new file mode 100644 index 0000000000000000000000000000000000000000..7c1e254bfce78fd86952cc664f1dc10846fdf96e --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/get.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor/get.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAGrB,mCAAgC;AAChC,wCAAqC;AACrC,uCAA0C;AAE1C,uCAA+C;AAC/C,kCAAuF;AAgEvF,cAAc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CAAC,eAAe,GAAuB,aAAa,CAAC;AACzE,UAAU,CAAC,SAAS,CAAC,aAAa,GAA2B,WAAW,CAAC;AACzE,UAAU,CAAC,SAAS,CAAC,oBAAoB,GAAa,kBAAkB,CAAC;AACzE,UAAU,CAAC,SAAS,CAAC,sBAAsB,GAAS,oBAAoB,CAAC;AACzE,UAAU,CAAC,SAAS,CAAC,kBAAkB,GAAiB,gBAAgB,CAAC;AACzE,UAAU,CAAC,SAAS,CAAC,QAAQ,GAAqC,MAAM,CAAC;AAEzE,cAAc;AACD,QAAA,QAAQ,GAAG,IAAI,UAAU,EAAE,CAAC","file":"get.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { BN } from '../util/bn';\nimport { Visitor } from '../visitor';\nimport { decodeUtf8 } from '../util/utf8';\nimport { VectorType } from '../interfaces';\nimport { uint16ToFloat64 } from '../util/math';\nimport { Type, UnionMode, Precision, DateUnit, TimeUnit, IntervalUnit } from '../enum';\nimport {\n DataType, Dictionary,\n Bool, Null, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct,\n Float, Float16, Float32, Float64,\n Int, Uint8, Uint16, Uint32, Uint64, Int8, Int16, Int32, Int64,\n Date_, DateDay, DateMillisecond,\n Interval, IntervalDayTime, IntervalYearMonth,\n Time, TimeSecond, TimeMillisecond, TimeMicrosecond, TimeNanosecond,\n Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond,\n Union, DenseUnion, SparseUnion,\n} from '../type';\n\n/** @ignore */\nexport interface GetVisitor extends Visitor {\n visit (node: T, index: number): T['TValue'];\n visitMany (nodes: T[], indices: number[]): T['TValue'][];\n getVisitFn (node: T): (vector: VectorType, index: number) => VectorType['TValue'];\n getVisitFn(node: VectorType | Data | T): (vector: VectorType, index: number) => VectorType['TValue'];\n visitNull (vector: VectorType, index: number): T['TValue'];\n visitBool (vector: VectorType, index: number): T['TValue'];\n visitInt (vector: VectorType, index: number): T['TValue'];\n visitInt8 (vector: VectorType, index: number): T['TValue'];\n visitInt16 (vector: VectorType, index: number): T['TValue'];\n visitInt32 (vector: VectorType, index: number): T['TValue'];\n visitInt64 (vector: VectorType, index: number): T['TValue'];\n visitUint8 (vector: VectorType, index: number): T['TValue'];\n visitUint16 (vector: VectorType, index: number): T['TValue'];\n visitUint32 (vector: VectorType, index: number): T['TValue'];\n visitUint64 (vector: VectorType, index: number): T['TValue'];\n visitFloat (vector: VectorType, index: number): T['TValue'];\n visitFloat16 (vector: VectorType, index: number): T['TValue'];\n visitFloat32 (vector: VectorType, index: number): T['TValue'];\n visitFloat64 (vector: VectorType, index: number): T['TValue'];\n visitUtf8 (vector: VectorType, index: number): T['TValue'];\n visitBinary (vector: VectorType, index: number): T['TValue'];\n visitFixedSizeBinary (vector: VectorType, index: number): T['TValue'];\n visitDate (vector: VectorType, index: number): T['TValue'];\n visitDateDay (vector: VectorType, index: number): T['TValue'];\n visitDateMillisecond (vector: VectorType, index: number): T['TValue'];\n visitTimestamp (vector: VectorType, index: number): T['TValue'];\n visitTimestampSecond (vector: VectorType, index: number): T['TValue'];\n visitTimestampMillisecond (vector: VectorType, index: number): T['TValue'];\n visitTimestampMicrosecond (vector: VectorType, index: number): T['TValue'];\n visitTimestampNanosecond (vector: VectorType, index: number): T['TValue'];\n visitTime (vector: VectorType, index: number): T['TValue'];\n visitTimeSecond (vector: VectorType, index: number): T['TValue'];\n visitTimeMillisecond (vector: VectorType, index: number): T['TValue'];\n visitTimeMicrosecond (vector: VectorType, index: number): T['TValue'];\n visitTimeNanosecond (vector: VectorType, index: number): T['TValue'];\n visitDecimal (vector: VectorType, index: number): T['TValue'];\n visitList (vector: VectorType, index: number): T['TValue'];\n visitStruct (vector: VectorType, index: number): T['TValue'];\n visitUnion (vector: VectorType, index: number): T['TValue'];\n visitDenseUnion (vector: VectorType, index: number): T['TValue'];\n visitSparseUnion (vector: VectorType, index: number): T['TValue'];\n visitDictionary (vector: VectorType, index: number): T['TValue'];\n visitInterval (vector: VectorType, index: number): T['TValue'];\n visitIntervalDayTime (vector: VectorType, index: number): T['TValue'];\n visitIntervalYearMonth (vector: VectorType, index: number): T['TValue'];\n visitFixedSizeList (vector: VectorType, index: number): T['TValue'];\n visitMap (vector: VectorType, index: number): T['TValue'];\n}\n\n/** @ignore */\nexport class GetVisitor extends Visitor {}\n\n/** @ignore */const epochDaysToMs = (data: Int32Array, index: number) => 86400000 * data[index];\n/** @ignore */const epochMillisecondsLongToMs = (data: Int32Array, index: number) => 4294967296 * (data[index + 1]) + (data[index] >>> 0);\n/** @ignore */const epochMicrosecondsLongToMs = (data: Int32Array, index: number) => 4294967296 * (data[index + 1] / 1000) + ((data[index] >>> 0) / 1000);\n/** @ignore */const epochNanosecondsLongToMs = (data: Int32Array, index: number) => 4294967296 * (data[index + 1] / 1000000) + ((data[index] >>> 0) / 1000000);\n\n/** @ignore */const epochMillisecondsToDate = (epochMs: number) => new Date(epochMs);\n/** @ignore */const epochDaysToDate = (data: Int32Array, index: number) => epochMillisecondsToDate(epochDaysToMs(data, index));\n/** @ignore */const epochMillisecondsLongToDate = (data: Int32Array, index: number) => epochMillisecondsToDate(epochMillisecondsLongToMs(data, index));\n\n/** @ignore */\nconst getNull = (_vector: VectorType, _index: number): T['TValue'] => null;\n/** @ignore */\nconst getVariableWidthBytes = (values: Uint8Array, valueOffsets: Int32Array, index: number) => {\n const { [index]: x, [index + 1]: y } = valueOffsets;\n return x != null && y != null ? values.subarray(x, y) : null as any;\n};\n\n/** @ignore */\nconst getBool = ({ offset, values }: VectorType, index: number): T['TValue'] => {\n const idx = offset + index;\n const byte = values[idx >> 3];\n return (byte & 1 << (idx % 8)) !== 0;\n};\n\n/** @ignore */\ntype Numeric1X = Int8 | Int16 | Int32 | Uint8 | Uint16 | Uint32 | Float32 | Float64;\n/** @ignore */\ntype Numeric2X = Int64 | Uint64;\n\n/** @ignore */\nconst getDateDay = ({ values }: VectorType, index: number): T['TValue'] => epochDaysToDate(values, index);\n/** @ignore */\nconst getDateMillisecond = ({ values }: VectorType, index: number): T['TValue'] => epochMillisecondsLongToDate(values, index * 2);\n/** @ignore */\nconst getNumeric = ({ stride, values }: VectorType, index: number): T['TValue'] => values[stride * index];\n/** @ignore */\nconst getFloat16 = ({ stride, values }: VectorType, index: number): T['TValue'] => uint16ToFloat64(values[stride * index]);\n/** @ignore */\nconst getBigInts = ({ stride, values, type }: VectorType, index: number): T['TValue'] => BN.new(values.subarray(stride * index, stride * (index + 1)), type.isSigned);\n/** @ignore */\nconst getFixedSizeBinary = ({ stride, values }: VectorType, index: number): T['TValue'] => values.subarray(stride * index, stride * (index + 1));\n\n/** @ignore */\nconst getBinary = ({ values, valueOffsets }: VectorType, index: number): T['TValue'] => getVariableWidthBytes(values, valueOffsets, index);\n/** @ignore */\nconst getUtf8 = ({ values, valueOffsets }: VectorType, index: number): T['TValue'] => {\n const bytes = getVariableWidthBytes(values, valueOffsets, index);\n return bytes !== null ? decodeUtf8(bytes) : null as any;\n};\n\n/* istanbul ignore next */\n/** @ignore */\nconst getInt = (vector: VectorType, index: number): T['TValue'] => (\n vector.type.bitWidth < 64\n ? getNumeric(vector as VectorType, index)\n : getBigInts(vector as VectorType, index)\n);\n\n/* istanbul ignore next */\n/** @ignore */\nconst getFloat = (vector: VectorType, index: number): T['TValue'] => (\n vector.type.precision !== Precision.HALF\n ? getNumeric(vector as VectorType, index)\n : getFloat16(vector as VectorType, index)\n);\n\n/* istanbul ignore next */\n/** @ignore */\nconst getDate = (vector: VectorType, index: number): T['TValue'] => (\n vector.type.unit === DateUnit.DAY\n ? getDateDay(vector as VectorType, index)\n : getDateMillisecond(vector as VectorType, index)\n);\n\n/** @ignore */\nconst getTimestampSecond = ({ values }: VectorType, index: number): T['TValue'] => 1000 * epochMillisecondsLongToMs(values, index * 2);\n/** @ignore */\nconst getTimestampMillisecond = ({ values }: VectorType, index: number): T['TValue'] => epochMillisecondsLongToMs(values, index * 2);\n/** @ignore */\nconst getTimestampMicrosecond = ({ values }: VectorType, index: number): T['TValue'] => epochMicrosecondsLongToMs(values, index * 2);\n/** @ignore */\nconst getTimestampNanosecond = ({ values }: VectorType, index: number): T['TValue'] => epochNanosecondsLongToMs(values, index * 2);\n/* istanbul ignore next */\n/** @ignore */\nconst getTimestamp = (vector: VectorType, index: number): T['TValue'] => {\n switch (vector.type.unit) {\n case TimeUnit.SECOND: return getTimestampSecond(vector as VectorType, index);\n case TimeUnit.MILLISECOND: return getTimestampMillisecond(vector as VectorType, index);\n case TimeUnit.MICROSECOND: return getTimestampMicrosecond(vector as VectorType, index);\n case TimeUnit.NANOSECOND: return getTimestampNanosecond(vector as VectorType, index);\n }\n};\n\n/** @ignore */\nconst getTimeSecond = ({ values, stride }: VectorType, index: number): T['TValue'] => values[stride * index];\n/** @ignore */\nconst getTimeMillisecond = ({ values, stride }: VectorType, index: number): T['TValue'] => values[stride * index];\n/** @ignore */\nconst getTimeMicrosecond = ({ values }: VectorType, index: number): T['TValue'] => BN.signed(values.subarray(2 * index, 2 * (index + 1)));\n/** @ignore */\nconst getTimeNanosecond = ({ values }: VectorType, index: number): T['TValue'] => BN.signed(values.subarray(2 * index, 2 * (index + 1)));\n/* istanbul ignore next */\n/** @ignore */\nconst getTime = (vector: VectorType, index: number): T['TValue'] => {\n switch (vector.type.unit) {\n case TimeUnit.SECOND: return getTimeSecond(vector as VectorType, index);\n case TimeUnit.MILLISECOND: return getTimeMillisecond(vector as VectorType, index);\n case TimeUnit.MICROSECOND: return getTimeMicrosecond(vector as VectorType, index);\n case TimeUnit.NANOSECOND: return getTimeNanosecond(vector as VectorType, index);\n }\n};\n\n/** @ignore */\nconst getDecimal = ({ values }: VectorType, index: number): T['TValue'] => BN.decimal(values.subarray(4 * index, 4 * (index + 1)));\n\n/** @ignore */\nconst getList = (vector: VectorType, index: number): T['TValue'] => {\n const child = vector.getChildAt(0)!, { valueOffsets, stride } = vector;\n return child.slice(valueOffsets[index * stride], valueOffsets[(index * stride) + 1]) as T['TValue'];\n};\n\n/** @ignore */\nconst getMap = (vector: VectorType, index: number): T['TValue'] => {\n return vector.bind(index) as T['TValue'];\n};\n\n/** @ignore */\nconst getStruct = (vector: VectorType, index: number): T['TValue'] => {\n return vector.bind(index) as T['TValue'];\n};\n\n/* istanbul ignore next */\n/** @ignore */\nconst getUnion = <\n V extends VectorType | VectorType | VectorType\n>(vector: V, index: number): V['TValue'] => {\n return vector.type.mode === UnionMode.Dense ?\n getDenseUnion(vector as VectorType, index) :\n getSparseUnion(vector as VectorType, index);\n};\n\n/** @ignore */\nconst getDenseUnion = (vector: VectorType, index: number): T['TValue'] => {\n const childIndex = vector.typeIdToChildIndex[vector.typeIds[index]];\n const child = vector.getChildAt(childIndex);\n return child ? child.get(vector.valueOffsets[index]) : null;\n};\n\n/** @ignore */\nconst getSparseUnion = (vector: VectorType, index: number): T['TValue'] => {\n const childIndex = vector.typeIdToChildIndex[vector.typeIds[index]];\n const child = vector.getChildAt(childIndex);\n return child ? child.get(index) : null;\n};\n\n/** @ignore */\nconst getDictionary = (vector: VectorType, index: number): T['TValue'] => {\n return vector.getValue(vector.getKey(index)!);\n};\n\n/* istanbul ignore next */\n/** @ignore */\nconst getInterval = (vector: VectorType, index: number): T['TValue'] =>\n (vector.type.unit === IntervalUnit.DAY_TIME)\n ? getIntervalDayTime(vector as VectorType, index)\n : getIntervalYearMonth(vector as VectorType, index);\n\n/** @ignore */\nconst getIntervalDayTime = ({ values }: VectorType, index: number): T['TValue'] => values.subarray(2 * index, 2 * (index + 1));\n\n/** @ignore */\nconst getIntervalYearMonth = ({ values }: VectorType, index: number): T['TValue'] => {\n const interval = values[index];\n const int32s = new Int32Array(2);\n int32s[0] = interval / 12 | 0; /* years */\n int32s[1] = interval % 12 | 0; /* months */\n return int32s;\n};\n\n/** @ignore */\nconst getFixedSizeList = (vector: VectorType, index: number): T['TValue'] => {\n const child = vector.getChildAt(0)!, { stride } = vector;\n return child.slice(index * stride, (index + 1) * stride) as T['TValue'];\n};\n\nGetVisitor.prototype.visitNull = getNull;\nGetVisitor.prototype.visitBool = getBool;\nGetVisitor.prototype.visitInt = getInt;\nGetVisitor.prototype.visitInt8 = getNumeric;\nGetVisitor.prototype.visitInt16 = getNumeric;\nGetVisitor.prototype.visitInt32 = getNumeric;\nGetVisitor.prototype.visitInt64 = getBigInts;\nGetVisitor.prototype.visitUint8 = getNumeric;\nGetVisitor.prototype.visitUint16 = getNumeric;\nGetVisitor.prototype.visitUint32 = getNumeric;\nGetVisitor.prototype.visitUint64 = getBigInts;\nGetVisitor.prototype.visitFloat = getFloat;\nGetVisitor.prototype.visitFloat16 = getFloat16;\nGetVisitor.prototype.visitFloat32 = getNumeric;\nGetVisitor.prototype.visitFloat64 = getNumeric;\nGetVisitor.prototype.visitUtf8 = getUtf8;\nGetVisitor.prototype.visitBinary = getBinary;\nGetVisitor.prototype.visitFixedSizeBinary = getFixedSizeBinary;\nGetVisitor.prototype.visitDate = getDate;\nGetVisitor.prototype.visitDateDay = getDateDay;\nGetVisitor.prototype.visitDateMillisecond = getDateMillisecond;\nGetVisitor.prototype.visitTimestamp = getTimestamp;\nGetVisitor.prototype.visitTimestampSecond = getTimestampSecond;\nGetVisitor.prototype.visitTimestampMillisecond = getTimestampMillisecond;\nGetVisitor.prototype.visitTimestampMicrosecond = getTimestampMicrosecond;\nGetVisitor.prototype.visitTimestampNanosecond = getTimestampNanosecond;\nGetVisitor.prototype.visitTime = getTime;\nGetVisitor.prototype.visitTimeSecond = getTimeSecond;\nGetVisitor.prototype.visitTimeMillisecond = getTimeMillisecond;\nGetVisitor.prototype.visitTimeMicrosecond = getTimeMicrosecond;\nGetVisitor.prototype.visitTimeNanosecond = getTimeNanosecond;\nGetVisitor.prototype.visitDecimal = getDecimal;\nGetVisitor.prototype.visitList = getList;\nGetVisitor.prototype.visitStruct = getStruct;\nGetVisitor.prototype.visitUnion = getUnion;\nGetVisitor.prototype.visitDenseUnion = getDenseUnion;\nGetVisitor.prototype.visitSparseUnion = getSparseUnion;\nGetVisitor.prototype.visitDictionary = getDictionary;\nGetVisitor.prototype.visitInterval = getInterval;\nGetVisitor.prototype.visitIntervalDayTime = getIntervalDayTime;\nGetVisitor.prototype.visitIntervalYearMonth = getIntervalYearMonth;\nGetVisitor.prototype.visitFixedSizeList = getFixedSizeList;\nGetVisitor.prototype.visitMap = getMap;\n\n/** @ignore */\nexport const instance = new GetVisitor();\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/get.mjs b/frontend/node_modules/apache-arrow/visitor/get.mjs new file mode 100644 index 0000000000000000000000000000000000000000..bd575a24d99e6d14899d78228410bd779787affa --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/get.mjs @@ -0,0 +1,219 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { BN } from '../util/bn'; +import { Visitor } from '../visitor'; +import { decodeUtf8 } from '../util/utf8'; +import { uint16ToFloat64 } from '../util/math'; +import { UnionMode, Precision, DateUnit, TimeUnit, IntervalUnit } from '../enum'; +/** @ignore */ +export class GetVisitor extends Visitor { +} +/** @ignore */ const epochDaysToMs = (data, index) => 86400000 * data[index]; +/** @ignore */ const epochMillisecondsLongToMs = (data, index) => 4294967296 * (data[index + 1]) + (data[index] >>> 0); +/** @ignore */ const epochMicrosecondsLongToMs = (data, index) => 4294967296 * (data[index + 1] / 1000) + ((data[index] >>> 0) / 1000); +/** @ignore */ const epochNanosecondsLongToMs = (data, index) => 4294967296 * (data[index + 1] / 1000000) + ((data[index] >>> 0) / 1000000); +/** @ignore */ const epochMillisecondsToDate = (epochMs) => new Date(epochMs); +/** @ignore */ const epochDaysToDate = (data, index) => epochMillisecondsToDate(epochDaysToMs(data, index)); +/** @ignore */ const epochMillisecondsLongToDate = (data, index) => epochMillisecondsToDate(epochMillisecondsLongToMs(data, index)); +/** @ignore */ +const getNull = (_vector, _index) => null; +/** @ignore */ +const getVariableWidthBytes = (values, valueOffsets, index) => { + const { [index]: x, [index + 1]: y } = valueOffsets; + return x != null && y != null ? values.subarray(x, y) : null; +}; +/** @ignore */ +const getBool = ({ offset, values }, index) => { + const idx = offset + index; + const byte = values[idx >> 3]; + return (byte & 1 << (idx % 8)) !== 0; +}; +/** @ignore */ +const getDateDay = ({ values }, index) => epochDaysToDate(values, index); +/** @ignore */ +const getDateMillisecond = ({ values }, index) => epochMillisecondsLongToDate(values, index * 2); +/** @ignore */ +const getNumeric = ({ stride, values }, index) => values[stride * index]; +/** @ignore */ +const getFloat16 = ({ stride, values }, index) => uint16ToFloat64(values[stride * index]); +/** @ignore */ +const getBigInts = ({ stride, values, type }, index) => BN.new(values.subarray(stride * index, stride * (index + 1)), type.isSigned); +/** @ignore */ +const getFixedSizeBinary = ({ stride, values }, index) => values.subarray(stride * index, stride * (index + 1)); +/** @ignore */ +const getBinary = ({ values, valueOffsets }, index) => getVariableWidthBytes(values, valueOffsets, index); +/** @ignore */ +const getUtf8 = ({ values, valueOffsets }, index) => { + const bytes = getVariableWidthBytes(values, valueOffsets, index); + return bytes !== null ? decodeUtf8(bytes) : null; +}; +/* istanbul ignore next */ +/** @ignore */ +const getInt = (vector, index) => (vector.type.bitWidth < 64 + ? getNumeric(vector, index) + : getBigInts(vector, index)); +/* istanbul ignore next */ +/** @ignore */ +const getFloat = (vector, index) => (vector.type.precision !== Precision.HALF + ? getNumeric(vector, index) + : getFloat16(vector, index)); +/* istanbul ignore next */ +/** @ignore */ +const getDate = (vector, index) => (vector.type.unit === DateUnit.DAY + ? getDateDay(vector, index) + : getDateMillisecond(vector, index)); +/** @ignore */ +const getTimestampSecond = ({ values }, index) => 1000 * epochMillisecondsLongToMs(values, index * 2); +/** @ignore */ +const getTimestampMillisecond = ({ values }, index) => epochMillisecondsLongToMs(values, index * 2); +/** @ignore */ +const getTimestampMicrosecond = ({ values }, index) => epochMicrosecondsLongToMs(values, index * 2); +/** @ignore */ +const getTimestampNanosecond = ({ values }, index) => epochNanosecondsLongToMs(values, index * 2); +/* istanbul ignore next */ +/** @ignore */ +const getTimestamp = (vector, index) => { + switch (vector.type.unit) { + case TimeUnit.SECOND: return getTimestampSecond(vector, index); + case TimeUnit.MILLISECOND: return getTimestampMillisecond(vector, index); + case TimeUnit.MICROSECOND: return getTimestampMicrosecond(vector, index); + case TimeUnit.NANOSECOND: return getTimestampNanosecond(vector, index); + } +}; +/** @ignore */ +const getTimeSecond = ({ values, stride }, index) => values[stride * index]; +/** @ignore */ +const getTimeMillisecond = ({ values, stride }, index) => values[stride * index]; +/** @ignore */ +const getTimeMicrosecond = ({ values }, index) => BN.signed(values.subarray(2 * index, 2 * (index + 1))); +/** @ignore */ +const getTimeNanosecond = ({ values }, index) => BN.signed(values.subarray(2 * index, 2 * (index + 1))); +/* istanbul ignore next */ +/** @ignore */ +const getTime = (vector, index) => { + switch (vector.type.unit) { + case TimeUnit.SECOND: return getTimeSecond(vector, index); + case TimeUnit.MILLISECOND: return getTimeMillisecond(vector, index); + case TimeUnit.MICROSECOND: return getTimeMicrosecond(vector, index); + case TimeUnit.NANOSECOND: return getTimeNanosecond(vector, index); + } +}; +/** @ignore */ +const getDecimal = ({ values }, index) => BN.decimal(values.subarray(4 * index, 4 * (index + 1))); +/** @ignore */ +const getList = (vector, index) => { + const child = vector.getChildAt(0), { valueOffsets, stride } = vector; + return child.slice(valueOffsets[index * stride], valueOffsets[(index * stride) + 1]); +}; +/** @ignore */ +const getMap = (vector, index) => { + return vector.bind(index); +}; +/** @ignore */ +const getStruct = (vector, index) => { + return vector.bind(index); +}; +/* istanbul ignore next */ +/** @ignore */ +const getUnion = (vector, index) => { + return vector.type.mode === UnionMode.Dense ? + getDenseUnion(vector, index) : + getSparseUnion(vector, index); +}; +/** @ignore */ +const getDenseUnion = (vector, index) => { + const childIndex = vector.typeIdToChildIndex[vector.typeIds[index]]; + const child = vector.getChildAt(childIndex); + return child ? child.get(vector.valueOffsets[index]) : null; +}; +/** @ignore */ +const getSparseUnion = (vector, index) => { + const childIndex = vector.typeIdToChildIndex[vector.typeIds[index]]; + const child = vector.getChildAt(childIndex); + return child ? child.get(index) : null; +}; +/** @ignore */ +const getDictionary = (vector, index) => { + return vector.getValue(vector.getKey(index)); +}; +/* istanbul ignore next */ +/** @ignore */ +const getInterval = (vector, index) => (vector.type.unit === IntervalUnit.DAY_TIME) + ? getIntervalDayTime(vector, index) + : getIntervalYearMonth(vector, index); +/** @ignore */ +const getIntervalDayTime = ({ values }, index) => values.subarray(2 * index, 2 * (index + 1)); +/** @ignore */ +const getIntervalYearMonth = ({ values }, index) => { + const interval = values[index]; + const int32s = new Int32Array(2); + int32s[0] = interval / 12 | 0; /* years */ + int32s[1] = interval % 12 | 0; /* months */ + return int32s; +}; +/** @ignore */ +const getFixedSizeList = (vector, index) => { + const child = vector.getChildAt(0), { stride } = vector; + return child.slice(index * stride, (index + 1) * stride); +}; +GetVisitor.prototype.visitNull = getNull; +GetVisitor.prototype.visitBool = getBool; +GetVisitor.prototype.visitInt = getInt; +GetVisitor.prototype.visitInt8 = getNumeric; +GetVisitor.prototype.visitInt16 = getNumeric; +GetVisitor.prototype.visitInt32 = getNumeric; +GetVisitor.prototype.visitInt64 = getBigInts; +GetVisitor.prototype.visitUint8 = getNumeric; +GetVisitor.prototype.visitUint16 = getNumeric; +GetVisitor.prototype.visitUint32 = getNumeric; +GetVisitor.prototype.visitUint64 = getBigInts; +GetVisitor.prototype.visitFloat = getFloat; +GetVisitor.prototype.visitFloat16 = getFloat16; +GetVisitor.prototype.visitFloat32 = getNumeric; +GetVisitor.prototype.visitFloat64 = getNumeric; +GetVisitor.prototype.visitUtf8 = getUtf8; +GetVisitor.prototype.visitBinary = getBinary; +GetVisitor.prototype.visitFixedSizeBinary = getFixedSizeBinary; +GetVisitor.prototype.visitDate = getDate; +GetVisitor.prototype.visitDateDay = getDateDay; +GetVisitor.prototype.visitDateMillisecond = getDateMillisecond; +GetVisitor.prototype.visitTimestamp = getTimestamp; +GetVisitor.prototype.visitTimestampSecond = getTimestampSecond; +GetVisitor.prototype.visitTimestampMillisecond = getTimestampMillisecond; +GetVisitor.prototype.visitTimestampMicrosecond = getTimestampMicrosecond; +GetVisitor.prototype.visitTimestampNanosecond = getTimestampNanosecond; +GetVisitor.prototype.visitTime = getTime; +GetVisitor.prototype.visitTimeSecond = getTimeSecond; +GetVisitor.prototype.visitTimeMillisecond = getTimeMillisecond; +GetVisitor.prototype.visitTimeMicrosecond = getTimeMicrosecond; +GetVisitor.prototype.visitTimeNanosecond = getTimeNanosecond; +GetVisitor.prototype.visitDecimal = getDecimal; +GetVisitor.prototype.visitList = getList; +GetVisitor.prototype.visitStruct = getStruct; +GetVisitor.prototype.visitUnion = getUnion; +GetVisitor.prototype.visitDenseUnion = getDenseUnion; +GetVisitor.prototype.visitSparseUnion = getSparseUnion; +GetVisitor.prototype.visitDictionary = getDictionary; +GetVisitor.prototype.visitInterval = getInterval; +GetVisitor.prototype.visitIntervalDayTime = getIntervalDayTime; +GetVisitor.prototype.visitIntervalYearMonth = getIntervalYearMonth; +GetVisitor.prototype.visitFixedSizeList = getFixedSizeList; +GetVisitor.prototype.visitMap = getMap; +/** @ignore */ +export const instance = new GetVisitor(); + +//# sourceMappingURL=get.mjs.map diff --git a/frontend/node_modules/apache-arrow/visitor/get.mjs.map b/frontend/node_modules/apache-arrow/visitor/get.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..f7fe2a4ceda72a8f10e41c0f23845a712df28325 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/get.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor/get.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAGrB,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAQ,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAgEvF,cAAc;AACd,MAAM,OAAO,UAAW,SAAQ,OAAO;CAAG;AAE1C,cAAc,CAAA,MAAM,aAAa,GAAG,CAAC,IAAgB,EAAE,KAAa,EAAE,EAAE,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;AAChG,cAAc,CAAA,MAAM,yBAAyB,GAAG,CAAC,IAAgB,EAAE,KAAa,EAAE,EAAE,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC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AU,EAAE,CAAC","file":"get.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { BN } from '../util/bn';\nimport { Visitor } from '../visitor';\nimport { decodeUtf8 } from '../util/utf8';\nimport { VectorType } from '../interfaces';\nimport { uint16ToFloat64 } from '../util/math';\nimport { Type, UnionMode, Precision, DateUnit, TimeUnit, IntervalUnit } from '../enum';\nimport {\n DataType, Dictionary,\n Bool, Null, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct,\n Float, Float16, Float32, Float64,\n Int, Uint8, Uint16, Uint32, Uint64, Int8, Int16, Int32, Int64,\n Date_, DateDay, DateMillisecond,\n Interval, IntervalDayTime, IntervalYearMonth,\n Time, TimeSecond, TimeMillisecond, TimeMicrosecond, TimeNanosecond,\n Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond,\n Union, DenseUnion, SparseUnion,\n} from '../type';\n\n/** @ignore */\nexport interface GetVisitor extends Visitor {\n visit (node: T, index: number): T['TValue'];\n visitMany (nodes: T[], indices: number[]): T['TValue'][];\n getVisitFn (node: T): (vector: VectorType, index: number) => VectorType['TValue'];\n getVisitFn(node: VectorType | Data | T): (vector: VectorType, index: number) => VectorType['TValue'];\n visitNull (vector: VectorType, index: number): T['TValue'];\n visitBool (vector: VectorType, index: number): T['TValue'];\n visitInt (vector: VectorType, index: number): T['TValue'];\n visitInt8 (vector: VectorType, index: number): T['TValue'];\n visitInt16 (vector: VectorType, index: number): T['TValue'];\n visitInt32 (vector: VectorType, index: number): T['TValue'];\n visitInt64 (vector: VectorType, index: number): T['TValue'];\n visitUint8 (vector: VectorType, index: number): T['TValue'];\n visitUint16 (vector: VectorType, index: number): T['TValue'];\n visitUint32 (vector: VectorType, index: number): T['TValue'];\n visitUint64 (vector: VectorType, index: number): T['TValue'];\n visitFloat (vector: VectorType, index: number): T['TValue'];\n visitFloat16 (vector: VectorType, index: number): T['TValue'];\n visitFloat32 (vector: VectorType, index: number): T['TValue'];\n visitFloat64 (vector: VectorType, index: number): T['TValue'];\n visitUtf8 (vector: VectorType, index: number): T['TValue'];\n visitBinary (vector: VectorType, index: number): T['TValue'];\n visitFixedSizeBinary (vector: VectorType, index: number): T['TValue'];\n visitDate (vector: VectorType, index: number): T['TValue'];\n visitDateDay (vector: VectorType, index: number): T['TValue'];\n visitDateMillisecond (vector: VectorType, index: number): T['TValue'];\n visitTimestamp (vector: VectorType, index: number): T['TValue'];\n visitTimestampSecond (vector: VectorType, index: number): T['TValue'];\n visitTimestampMillisecond (vector: VectorType, index: number): T['TValue'];\n visitTimestampMicrosecond (vector: VectorType, index: number): T['TValue'];\n visitTimestampNanosecond (vector: VectorType, index: number): T['TValue'];\n visitTime (vector: VectorType, index: number): T['TValue'];\n visitTimeSecond (vector: VectorType, index: number): T['TValue'];\n visitTimeMillisecond (vector: VectorType, index: number): T['TValue'];\n visitTimeMicrosecond (vector: VectorType, index: number): T['TValue'];\n visitTimeNanosecond (vector: VectorType, index: number): T['TValue'];\n visitDecimal (vector: VectorType, index: number): T['TValue'];\n visitList (vector: VectorType, index: number): T['TValue'];\n visitStruct (vector: VectorType, index: number): T['TValue'];\n visitUnion (vector: VectorType, index: number): T['TValue'];\n visitDenseUnion (vector: VectorType, index: number): T['TValue'];\n visitSparseUnion (vector: VectorType, index: number): T['TValue'];\n visitDictionary (vector: VectorType, index: number): T['TValue'];\n visitInterval (vector: VectorType, index: number): T['TValue'];\n visitIntervalDayTime (vector: VectorType, index: number): T['TValue'];\n visitIntervalYearMonth (vector: VectorType, index: number): T['TValue'];\n visitFixedSizeList (vector: VectorType, index: number): T['TValue'];\n visitMap (vector: VectorType, index: number): T['TValue'];\n}\n\n/** @ignore */\nexport class GetVisitor extends Visitor {}\n\n/** @ignore */const epochDaysToMs = (data: Int32Array, index: number) => 86400000 * data[index];\n/** @ignore */const epochMillisecondsLongToMs = (data: Int32Array, index: number) => 4294967296 * (data[index + 1]) + (data[index] >>> 0);\n/** @ignore */const epochMicrosecondsLongToMs = (data: Int32Array, index: number) => 4294967296 * (data[index + 1] / 1000) + ((data[index] >>> 0) / 1000);\n/** @ignore */const epochNanosecondsLongToMs = (data: Int32Array, index: number) => 4294967296 * (data[index + 1] / 1000000) + ((data[index] >>> 0) / 1000000);\n\n/** @ignore */const epochMillisecondsToDate = (epochMs: number) => new Date(epochMs);\n/** @ignore */const epochDaysToDate = (data: Int32Array, index: number) => epochMillisecondsToDate(epochDaysToMs(data, index));\n/** @ignore */const epochMillisecondsLongToDate = (data: Int32Array, index: number) => epochMillisecondsToDate(epochMillisecondsLongToMs(data, index));\n\n/** @ignore */\nconst getNull = (_vector: VectorType, _index: number): T['TValue'] => null;\n/** @ignore */\nconst getVariableWidthBytes = (values: Uint8Array, valueOffsets: Int32Array, index: number) => {\n const { [index]: x, [index + 1]: y } = valueOffsets;\n return x != null && y != null ? values.subarray(x, y) : null as any;\n};\n\n/** @ignore */\nconst getBool = ({ offset, values }: VectorType, index: number): T['TValue'] => {\n const idx = offset + index;\n const byte = values[idx >> 3];\n return (byte & 1 << (idx % 8)) !== 0;\n};\n\n/** @ignore */\ntype Numeric1X = Int8 | Int16 | Int32 | Uint8 | Uint16 | Uint32 | Float32 | Float64;\n/** @ignore */\ntype Numeric2X = Int64 | Uint64;\n\n/** @ignore */\nconst getDateDay = ({ values }: VectorType, index: number): T['TValue'] => epochDaysToDate(values, index);\n/** @ignore */\nconst getDateMillisecond = ({ values }: VectorType, index: number): T['TValue'] => epochMillisecondsLongToDate(values, index * 2);\n/** @ignore */\nconst getNumeric = ({ stride, values }: VectorType, index: number): T['TValue'] => values[stride * index];\n/** @ignore */\nconst getFloat16 = ({ stride, values }: VectorType, index: number): T['TValue'] => uint16ToFloat64(values[stride * index]);\n/** @ignore */\nconst getBigInts = ({ stride, values, type }: VectorType, index: number): T['TValue'] => BN.new(values.subarray(stride * index, stride * (index + 1)), type.isSigned);\n/** @ignore */\nconst getFixedSizeBinary = ({ stride, values }: VectorType, index: number): T['TValue'] => values.subarray(stride * index, stride * (index + 1));\n\n/** @ignore */\nconst getBinary = ({ values, valueOffsets }: VectorType, index: number): T['TValue'] => getVariableWidthBytes(values, valueOffsets, index);\n/** @ignore */\nconst getUtf8 = ({ values, valueOffsets }: VectorType, index: number): T['TValue'] => {\n const bytes = getVariableWidthBytes(values, valueOffsets, index);\n return bytes !== null ? decodeUtf8(bytes) : null as any;\n};\n\n/* istanbul ignore next */\n/** @ignore */\nconst getInt = (vector: VectorType, index: number): T['TValue'] => (\n vector.type.bitWidth < 64\n ? getNumeric(vector as VectorType, index)\n : getBigInts(vector as VectorType, index)\n);\n\n/* istanbul ignore next */\n/** @ignore */\nconst getFloat = (vector: VectorType, index: number): T['TValue'] => (\n vector.type.precision !== Precision.HALF\n ? getNumeric(vector as VectorType, index)\n : getFloat16(vector as VectorType, index)\n);\n\n/* istanbul ignore next */\n/** @ignore */\nconst getDate = (vector: VectorType, index: number): T['TValue'] => (\n vector.type.unit === DateUnit.DAY\n ? getDateDay(vector as VectorType, index)\n : getDateMillisecond(vector as VectorType, index)\n);\n\n/** @ignore */\nconst getTimestampSecond = ({ values }: VectorType, index: number): T['TValue'] => 1000 * epochMillisecondsLongToMs(values, index * 2);\n/** @ignore */\nconst getTimestampMillisecond = ({ values }: VectorType, index: number): T['TValue'] => epochMillisecondsLongToMs(values, index * 2);\n/** @ignore */\nconst getTimestampMicrosecond = ({ values }: VectorType, index: number): T['TValue'] => epochMicrosecondsLongToMs(values, index * 2);\n/** @ignore */\nconst getTimestampNanosecond = ({ values }: VectorType, index: number): T['TValue'] => epochNanosecondsLongToMs(values, index * 2);\n/* istanbul ignore next */\n/** @ignore */\nconst getTimestamp = (vector: VectorType, index: number): T['TValue'] => {\n switch (vector.type.unit) {\n case TimeUnit.SECOND: return getTimestampSecond(vector as VectorType, index);\n case TimeUnit.MILLISECOND: return getTimestampMillisecond(vector as VectorType, index);\n case TimeUnit.MICROSECOND: return getTimestampMicrosecond(vector as VectorType, index);\n case TimeUnit.NANOSECOND: return getTimestampNanosecond(vector as VectorType, index);\n }\n};\n\n/** @ignore */\nconst getTimeSecond = ({ values, stride }: VectorType, index: number): T['TValue'] => values[stride * index];\n/** @ignore */\nconst getTimeMillisecond = ({ values, stride }: VectorType, index: number): T['TValue'] => values[stride * index];\n/** @ignore */\nconst getTimeMicrosecond = ({ values }: VectorType, index: number): T['TValue'] => BN.signed(values.subarray(2 * index, 2 * (index + 1)));\n/** @ignore */\nconst getTimeNanosecond = ({ values }: VectorType, index: number): T['TValue'] => BN.signed(values.subarray(2 * index, 2 * (index + 1)));\n/* istanbul ignore next */\n/** @ignore */\nconst getTime = (vector: VectorType, index: number): T['TValue'] => {\n switch (vector.type.unit) {\n case TimeUnit.SECOND: return getTimeSecond(vector as VectorType, index);\n case TimeUnit.MILLISECOND: return getTimeMillisecond(vector as VectorType, index);\n case TimeUnit.MICROSECOND: return getTimeMicrosecond(vector as VectorType, index);\n case TimeUnit.NANOSECOND: return getTimeNanosecond(vector as VectorType, index);\n }\n};\n\n/** @ignore */\nconst getDecimal = ({ values }: VectorType, index: number): T['TValue'] => BN.decimal(values.subarray(4 * index, 4 * (index + 1)));\n\n/** @ignore */\nconst getList = (vector: VectorType, index: number): T['TValue'] => {\n const child = vector.getChildAt(0)!, { valueOffsets, stride } = vector;\n return child.slice(valueOffsets[index * stride], valueOffsets[(index * stride) + 1]) as T['TValue'];\n};\n\n/** @ignore */\nconst getMap = (vector: VectorType, index: number): T['TValue'] => {\n return vector.bind(index) as T['TValue'];\n};\n\n/** @ignore */\nconst getStruct = (vector: VectorType, index: number): T['TValue'] => {\n return vector.bind(index) as T['TValue'];\n};\n\n/* istanbul ignore next */\n/** @ignore */\nconst getUnion = <\n V extends VectorType | VectorType | VectorType\n>(vector: V, index: number): V['TValue'] => {\n return vector.type.mode === UnionMode.Dense ?\n getDenseUnion(vector as VectorType, index) :\n getSparseUnion(vector as VectorType, index);\n};\n\n/** @ignore */\nconst getDenseUnion = (vector: VectorType, index: number): T['TValue'] => {\n const childIndex = vector.typeIdToChildIndex[vector.typeIds[index]];\n const child = vector.getChildAt(childIndex);\n return child ? child.get(vector.valueOffsets[index]) : null;\n};\n\n/** @ignore */\nconst getSparseUnion = (vector: VectorType, index: number): T['TValue'] => {\n const childIndex = vector.typeIdToChildIndex[vector.typeIds[index]];\n const child = vector.getChildAt(childIndex);\n return child ? child.get(index) : null;\n};\n\n/** @ignore */\nconst getDictionary = (vector: VectorType, index: number): T['TValue'] => {\n return vector.getValue(vector.getKey(index)!);\n};\n\n/* istanbul ignore next */\n/** @ignore */\nconst getInterval = (vector: VectorType, index: number): T['TValue'] =>\n (vector.type.unit === IntervalUnit.DAY_TIME)\n ? getIntervalDayTime(vector as VectorType, index)\n : getIntervalYearMonth(vector as VectorType, index);\n\n/** @ignore */\nconst getIntervalDayTime = ({ values }: VectorType, index: number): T['TValue'] => values.subarray(2 * index, 2 * (index + 1));\n\n/** @ignore */\nconst getIntervalYearMonth = ({ values }: VectorType, index: number): T['TValue'] => {\n const interval = values[index];\n const int32s = new Int32Array(2);\n int32s[0] = interval / 12 | 0; /* years */\n int32s[1] = interval % 12 | 0; /* months */\n return int32s;\n};\n\n/** @ignore */\nconst getFixedSizeList = (vector: VectorType, index: number): T['TValue'] => {\n const child = vector.getChildAt(0)!, { stride } = vector;\n return child.slice(index * stride, (index + 1) * stride) as T['TValue'];\n};\n\nGetVisitor.prototype.visitNull = getNull;\nGetVisitor.prototype.visitBool = getBool;\nGetVisitor.prototype.visitInt = getInt;\nGetVisitor.prototype.visitInt8 = getNumeric;\nGetVisitor.prototype.visitInt16 = getNumeric;\nGetVisitor.prototype.visitInt32 = getNumeric;\nGetVisitor.prototype.visitInt64 = getBigInts;\nGetVisitor.prototype.visitUint8 = getNumeric;\nGetVisitor.prototype.visitUint16 = getNumeric;\nGetVisitor.prototype.visitUint32 = getNumeric;\nGetVisitor.prototype.visitUint64 = getBigInts;\nGetVisitor.prototype.visitFloat = getFloat;\nGetVisitor.prototype.visitFloat16 = getFloat16;\nGetVisitor.prototype.visitFloat32 = getNumeric;\nGetVisitor.prototype.visitFloat64 = getNumeric;\nGetVisitor.prototype.visitUtf8 = getUtf8;\nGetVisitor.prototype.visitBinary = getBinary;\nGetVisitor.prototype.visitFixedSizeBinary = getFixedSizeBinary;\nGetVisitor.prototype.visitDate = getDate;\nGetVisitor.prototype.visitDateDay = getDateDay;\nGetVisitor.prototype.visitDateMillisecond = getDateMillisecond;\nGetVisitor.prototype.visitTimestamp = getTimestamp;\nGetVisitor.prototype.visitTimestampSecond = getTimestampSecond;\nGetVisitor.prototype.visitTimestampMillisecond = getTimestampMillisecond;\nGetVisitor.prototype.visitTimestampMicrosecond = getTimestampMicrosecond;\nGetVisitor.prototype.visitTimestampNanosecond = getTimestampNanosecond;\nGetVisitor.prototype.visitTime = getTime;\nGetVisitor.prototype.visitTimeSecond = getTimeSecond;\nGetVisitor.prototype.visitTimeMillisecond = getTimeMillisecond;\nGetVisitor.prototype.visitTimeMicrosecond = getTimeMicrosecond;\nGetVisitor.prototype.visitTimeNanosecond = getTimeNanosecond;\nGetVisitor.prototype.visitDecimal = getDecimal;\nGetVisitor.prototype.visitList = getList;\nGetVisitor.prototype.visitStruct = getStruct;\nGetVisitor.prototype.visitUnion = getUnion;\nGetVisitor.prototype.visitDenseUnion = getDenseUnion;\nGetVisitor.prototype.visitSparseUnion = getSparseUnion;\nGetVisitor.prototype.visitDictionary = getDictionary;\nGetVisitor.prototype.visitInterval = getInterval;\nGetVisitor.prototype.visitIntervalDayTime = getIntervalDayTime;\nGetVisitor.prototype.visitIntervalYearMonth = getIntervalYearMonth;\nGetVisitor.prototype.visitFixedSizeList = getFixedSizeList;\nGetVisitor.prototype.visitMap = getMap;\n\n/** @ignore */\nexport const instance = new GetVisitor();\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/indexof.d.ts b/frontend/node_modules/apache-arrow/visitor/indexof.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8e606f5ec7aaeba84cc2eedc43f49678169831e8 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/indexof.d.ts @@ -0,0 +1,60 @@ +import { Data } from '../data'; +import { Type } from '../enum'; +import { Visitor } from '../visitor'; +import { VectorType } from '../interfaces'; +import { DataType, Dictionary, Bool, Null, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct, Float, Float16, Float32, Float64, Int, Uint8, Uint16, Uint32, Uint64, Int8, Int16, Int32, Int64, Date_, DateDay, DateMillisecond, Interval, IntervalDayTime, IntervalYearMonth, Time, TimeSecond, TimeMillisecond, TimeMicrosecond, TimeNanosecond, Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond, Union, DenseUnion, SparseUnion } from '../type'; +/** @ignore */ +export interface IndexOfVisitor extends Visitor { + visit(node: T, value: T['TValue'] | null, index?: number): number; + visitMany(nodes: T[], values: (T['TValue'] | null)[], indices: (number | undefined)[]): number[]; + getVisitFn(node: T): (vector: VectorType, value: VectorType['TValue'] | null, index?: number) => number; + getVisitFn(node: VectorType | Data | T): (vector: VectorType, value: T['TValue'] | null, index?: number) => number; + visitNull(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitBool(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitInt(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitInt8(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitInt16(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitInt32(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitInt64(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitUint8(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitUint16(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitUint32(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitUint64(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitFloat(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitFloat16(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitFloat32(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitFloat64(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitUtf8(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitBinary(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitFixedSizeBinary(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitDate(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitDateDay(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitDateMillisecond(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitTimestamp(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitTimestampSecond(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitTimestampMillisecond(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitTimestampMicrosecond(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitTimestampNanosecond(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitTime(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitTimeSecond(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitTimeMillisecond(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitTimeMicrosecond(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitTimeNanosecond(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitDecimal(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitList(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitStruct(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitUnion(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitDenseUnion(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitSparseUnion(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitDictionary(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitInterval(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitIntervalDayTime(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitIntervalYearMonth(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitFixedSizeList(vector: VectorType, value: T['TValue'] | null, index?: number): number; + visitMap(vector: VectorType, value: T['TValue'] | null, index?: number): number; +} +/** @ignore */ +export declare class IndexOfVisitor extends Visitor { +} +/** @ignore */ +export declare const instance: IndexOfVisitor; diff --git a/frontend/node_modules/apache-arrow/visitor/indexof.js b/frontend/node_modules/apache-arrow/visitor/indexof.js new file mode 100644 index 0000000000000000000000000000000000000000..881de5ae8b696c8d7a7aca12b530b1ede3afdcc2 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/indexof.js @@ -0,0 +1,122 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const visitor_1 = require("../visitor"); +const bit_1 = require("../util/bit"); +const vector_1 = require("../util/vector"); +/** @ignore */ +class IndexOfVisitor extends visitor_1.Visitor { +} +exports.IndexOfVisitor = IndexOfVisitor; +/** @ignore */ +function nullIndexOf(vector, searchElement) { + // if you're looking for nulls and the vector isn't empty, we've got 'em! + return searchElement === null && vector.length > 0 ? 0 : -1; +} +/** @ignore */ +function indexOfNull(vector, fromIndex) { + const { nullBitmap } = vector; + if (!nullBitmap || vector.nullCount <= 0) { + return -1; + } + let i = 0; + for (const isValid of bit_1.iterateBits(nullBitmap, vector.data.offset + (fromIndex || 0), vector.length, nullBitmap, bit_1.getBool)) { + if (!isValid) { + return i; + } + ++i; + } + return -1; +} +/** @ignore */ +function indexOfValue(vector, searchElement, fromIndex) { + if (searchElement === undefined) { + return -1; + } + if (searchElement === null) { + return indexOfNull(vector, fromIndex); + } + const compare = vector_1.createElementComparator(searchElement); + for (let i = (fromIndex || 0) - 1, n = vector.length; ++i < n;) { + if (compare(vector.get(i))) { + return i; + } + } + return -1; +} +/** @ignore */ +function indexOfUnion(vector, searchElement, fromIndex) { + // Unions are special -- they do have a nullBitmap, but so can their children. + // If the searchElement is null, we don't know whether it came from the Union's + // bitmap or one of its childrens'. So we don't interrogate the Union's bitmap, + // since that will report the wrong index if a child has a null before the Union. + const compare = vector_1.createElementComparator(searchElement); + for (let i = (fromIndex || 0) - 1, n = vector.length; ++i < n;) { + if (compare(vector.get(i))) { + return i; + } + } + return -1; +} +IndexOfVisitor.prototype.visitNull = nullIndexOf; +IndexOfVisitor.prototype.visitBool = indexOfValue; +IndexOfVisitor.prototype.visitInt = indexOfValue; +IndexOfVisitor.prototype.visitInt8 = indexOfValue; +IndexOfVisitor.prototype.visitInt16 = indexOfValue; +IndexOfVisitor.prototype.visitInt32 = indexOfValue; +IndexOfVisitor.prototype.visitInt64 = indexOfValue; +IndexOfVisitor.prototype.visitUint8 = indexOfValue; +IndexOfVisitor.prototype.visitUint16 = indexOfValue; +IndexOfVisitor.prototype.visitUint32 = indexOfValue; +IndexOfVisitor.prototype.visitUint64 = indexOfValue; +IndexOfVisitor.prototype.visitFloat = indexOfValue; +IndexOfVisitor.prototype.visitFloat16 = indexOfValue; +IndexOfVisitor.prototype.visitFloat32 = indexOfValue; +IndexOfVisitor.prototype.visitFloat64 = indexOfValue; +IndexOfVisitor.prototype.visitUtf8 = indexOfValue; +IndexOfVisitor.prototype.visitBinary = indexOfValue; +IndexOfVisitor.prototype.visitFixedSizeBinary = indexOfValue; +IndexOfVisitor.prototype.visitDate = indexOfValue; +IndexOfVisitor.prototype.visitDateDay = indexOfValue; +IndexOfVisitor.prototype.visitDateMillisecond = indexOfValue; +IndexOfVisitor.prototype.visitTimestamp = indexOfValue; +IndexOfVisitor.prototype.visitTimestampSecond = indexOfValue; +IndexOfVisitor.prototype.visitTimestampMillisecond = indexOfValue; +IndexOfVisitor.prototype.visitTimestampMicrosecond = indexOfValue; +IndexOfVisitor.prototype.visitTimestampNanosecond = indexOfValue; +IndexOfVisitor.prototype.visitTime = indexOfValue; +IndexOfVisitor.prototype.visitTimeSecond = indexOfValue; +IndexOfVisitor.prototype.visitTimeMillisecond = indexOfValue; +IndexOfVisitor.prototype.visitTimeMicrosecond = indexOfValue; +IndexOfVisitor.prototype.visitTimeNanosecond = indexOfValue; +IndexOfVisitor.prototype.visitDecimal = indexOfValue; +IndexOfVisitor.prototype.visitList = indexOfValue; +IndexOfVisitor.prototype.visitStruct = indexOfValue; +IndexOfVisitor.prototype.visitUnion = indexOfValue; +IndexOfVisitor.prototype.visitDenseUnion = indexOfUnion; +IndexOfVisitor.prototype.visitSparseUnion = indexOfUnion; +IndexOfVisitor.prototype.visitDictionary = indexOfValue; +IndexOfVisitor.prototype.visitInterval = indexOfValue; +IndexOfVisitor.prototype.visitIntervalDayTime = indexOfValue; +IndexOfVisitor.prototype.visitIntervalYearMonth = indexOfValue; +IndexOfVisitor.prototype.visitFixedSizeList = indexOfValue; +IndexOfVisitor.prototype.visitMap = indexOfValue; +/** @ignore */ +exports.instance = new IndexOfVisitor(); + +//# sourceMappingURL=indexof.js.map diff --git a/frontend/node_modules/apache-arrow/visitor/indexof.js.map b/frontend/node_modules/apache-arrow/visitor/indexof.js.map new file mode 100644 index 0000000000000000000000000000000000000000..8c0694dccaa83240fa89f5ce95a5cbe8371b44b2 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/indexof.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor/indexof.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAIrB,wCAAqC;AAErC,qCAAmD;AACnD,2CAAyD;AAgEzD,cAAc;AACd,MAAa,cAAe,SAAQ,iBAAO;CAAG;AAA9C,wCAA8C;AAE9C,cAAc;AACd,SAAS,WAAW,CAAC,MAAwB,EAAE,aAAoB;IAC/D,yEAAyE;IACzE,OAAO,aAAa,KAAK,IAAI,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAChE,CAAC;AAED,cAAc;AACd,SAAS,WAAW,CAAqB,MAAqB,EAAE,SAAkB;IAC9E,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;IAC9B,IAAI,CAAC,UAAU,IAAI,MAAM,CAAC,SAAS,IAAI,CAAC,EAAE;QACtC,OAAO,CAAC,CAAC,CAAC;KACb;IACD,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,KAAK,MAAM,OAAO,IAAI,iBAAW,CAAC,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,SAAS,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,aAAO,CAAC,EAAE;QACtH,IAAI,CAAC,OAAO,EAAE;YAAE,OAAO,CAAC,CAAC;SAAE;QAC3B,EAAE,CAAC,CAAC;KACP;IACD,OAAO,CA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AyB,GAAG,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,wBAAwB,GAAI,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,SAAS,GAAmB,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,eAAe,GAAa,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,oBAAoB,GAAQ,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,oBAAoB,GAAQ,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,mBAAmB,GAAS,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,YAAY,GAAgB,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,SAAS,GAAmB,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,WAAW,GAAiB,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,UAAU,GAAkB,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,eAAe,GAAa,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,gBAAgB,GAAY,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,eAAe,GAAa,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,aAAa,GAAe,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,oBAAoB,GAAQ,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,sBAAsB,GAAM,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,kBAAkB,GAAU,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,QAAQ,GAAoB,YAAY,CAAC;AAElE,cAAc;AACD,QAAA,QAAQ,GAAG,IAAI,cAAc,EAAE,CAAC","file":"indexof.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Type } from '../enum';\nimport { Visitor } from '../visitor';\nimport { VectorType } from '../interfaces';\nimport { getBool, iterateBits } from '../util/bit';\nimport { createElementComparator } from '../util/vector';\nimport {\n DataType, Dictionary,\n Bool, Null, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct,\n Float, Float16, Float32, Float64,\n Int, Uint8, Uint16, Uint32, Uint64, Int8, Int16, Int32, Int64,\n Date_, DateDay, DateMillisecond,\n Interval, IntervalDayTime, IntervalYearMonth,\n Time, TimeSecond, TimeMillisecond, TimeMicrosecond, TimeNanosecond,\n Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond,\n Union, DenseUnion, SparseUnion,\n} from '../type';\n\n/** @ignore */\nexport interface IndexOfVisitor extends Visitor {\n visit (node: T, value: T['TValue'] | null, index?: number): number;\n visitMany (nodes: T[], values: (T['TValue'] | null)[], indices: (number | undefined)[]): number[];\n getVisitFn (node: T): (vector: VectorType, value: VectorType['TValue'] | null, index?: number) => number;\n getVisitFn(node: VectorType | Data | T): (vector: VectorType, value: T['TValue'] | null, index?: number) => number;\n visitNull (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitBool (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitInt (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitInt8 (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitInt16 (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitInt32 (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitInt64 (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitUint8 (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitUint16 (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitUint32 (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitUint64 (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitFloat (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitFloat16 (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitFloat32 (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitFloat64 (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitUtf8 (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitBinary (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitFixedSizeBinary (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitDate (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitDateDay (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitDateMillisecond (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitTimestamp (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitTimestampSecond (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitTimestampMillisecond (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitTimestampMicrosecond (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitTimestampNanosecond (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitTime (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitTimeSecond (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitTimeMillisecond (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitTimeMicrosecond (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitTimeNanosecond (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitDecimal (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitList (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitStruct (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitUnion (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitDenseUnion (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitSparseUnion (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitDictionary (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitInterval (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitIntervalDayTime (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitIntervalYearMonth (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitFixedSizeList (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitMap (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n}\n\n/** @ignore */\nexport class IndexOfVisitor extends Visitor {}\n\n/** @ignore */\nfunction nullIndexOf(vector: VectorType, searchElement?: null) {\n // if you're looking for nulls and the vector isn't empty, we've got 'em!\n return searchElement === null && vector.length > 0 ? 0 : -1;\n}\n\n/** @ignore */\nfunction indexOfNull(vector: VectorType, fromIndex?: number): number {\n const { nullBitmap } = vector;\n if (!nullBitmap || vector.nullCount <= 0) {\n return -1;\n }\n let i = 0;\n for (const isValid of iterateBits(nullBitmap, vector.data.offset + (fromIndex || 0), vector.length, nullBitmap, getBool)) {\n if (!isValid) { return i; }\n ++i;\n }\n return -1;\n}\n\n/** @ignore */\nfunction indexOfValue(vector: VectorType, searchElement?: T['TValue'] | null, fromIndex?: number): number {\n if (searchElement === undefined) { return -1; }\n if (searchElement === null) { return indexOfNull(vector, fromIndex); }\n const compare = createElementComparator(searchElement);\n for (let i = (fromIndex || 0) - 1, n = vector.length; ++i < n;) {\n if (compare(vector.get(i))) {\n return i;\n }\n }\n return -1;\n}\n\n/** @ignore */\nfunction indexOfUnion(vector: VectorType, searchElement?: T['TValue'] | null, fromIndex?: number): number {\n // Unions are special -- they do have a nullBitmap, but so can their children.\n // If the searchElement is null, we don't know whether it came from the Union's\n // bitmap or one of its childrens'. So we don't interrogate the Union's bitmap,\n // since that will report the wrong index if a child has a null before the Union.\n const compare = createElementComparator(searchElement);\n for (let i = (fromIndex || 0) - 1, n = vector.length; ++i < n;) {\n if (compare(vector.get(i))) {\n return i;\n }\n }\n return -1;\n}\n\nIndexOfVisitor.prototype.visitNull = nullIndexOf;\nIndexOfVisitor.prototype.visitBool = indexOfValue;\nIndexOfVisitor.prototype.visitInt = indexOfValue;\nIndexOfVisitor.prototype.visitInt8 = indexOfValue;\nIndexOfVisitor.prototype.visitInt16 = indexOfValue;\nIndexOfVisitor.prototype.visitInt32 = indexOfValue;\nIndexOfVisitor.prototype.visitInt64 = indexOfValue;\nIndexOfVisitor.prototype.visitUint8 = indexOfValue;\nIndexOfVisitor.prototype.visitUint16 = indexOfValue;\nIndexOfVisitor.prototype.visitUint32 = indexOfValue;\nIndexOfVisitor.prototype.visitUint64 = indexOfValue;\nIndexOfVisitor.prototype.visitFloat = indexOfValue;\nIndexOfVisitor.prototype.visitFloat16 = indexOfValue;\nIndexOfVisitor.prototype.visitFloat32 = indexOfValue;\nIndexOfVisitor.prototype.visitFloat64 = indexOfValue;\nIndexOfVisitor.prototype.visitUtf8 = indexOfValue;\nIndexOfVisitor.prototype.visitBinary = indexOfValue;\nIndexOfVisitor.prototype.visitFixedSizeBinary = indexOfValue;\nIndexOfVisitor.prototype.visitDate = indexOfValue;\nIndexOfVisitor.prototype.visitDateDay = indexOfValue;\nIndexOfVisitor.prototype.visitDateMillisecond = indexOfValue;\nIndexOfVisitor.prototype.visitTimestamp = indexOfValue;\nIndexOfVisitor.prototype.visitTimestampSecond = indexOfValue;\nIndexOfVisitor.prototype.visitTimestampMillisecond = indexOfValue;\nIndexOfVisitor.prototype.visitTimestampMicrosecond = indexOfValue;\nIndexOfVisitor.prototype.visitTimestampNanosecond = indexOfValue;\nIndexOfVisitor.prototype.visitTime = indexOfValue;\nIndexOfVisitor.prototype.visitTimeSecond = indexOfValue;\nIndexOfVisitor.prototype.visitTimeMillisecond = indexOfValue;\nIndexOfVisitor.prototype.visitTimeMicrosecond = indexOfValue;\nIndexOfVisitor.prototype.visitTimeNanosecond = indexOfValue;\nIndexOfVisitor.prototype.visitDecimal = indexOfValue;\nIndexOfVisitor.prototype.visitList = indexOfValue;\nIndexOfVisitor.prototype.visitStruct = indexOfValue;\nIndexOfVisitor.prototype.visitUnion = indexOfValue;\nIndexOfVisitor.prototype.visitDenseUnion = indexOfUnion;\nIndexOfVisitor.prototype.visitSparseUnion = indexOfUnion;\nIndexOfVisitor.prototype.visitDictionary = indexOfValue;\nIndexOfVisitor.prototype.visitInterval = indexOfValue;\nIndexOfVisitor.prototype.visitIntervalDayTime = indexOfValue;\nIndexOfVisitor.prototype.visitIntervalYearMonth = indexOfValue;\nIndexOfVisitor.prototype.visitFixedSizeList = indexOfValue;\nIndexOfVisitor.prototype.visitMap = indexOfValue;\n\n/** @ignore */\nexport const instance = new IndexOfVisitor();\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/indexof.mjs b/frontend/node_modules/apache-arrow/visitor/indexof.mjs new file mode 100644 index 0000000000000000000000000000000000000000..836468d4b68412c32386ce08e3b5549f2dd2d98b --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/indexof.mjs @@ -0,0 +1,119 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { Visitor } from '../visitor'; +import { getBool, iterateBits } from '../util/bit'; +import { createElementComparator } from '../util/vector'; +/** @ignore */ +export class IndexOfVisitor extends Visitor { +} +/** @ignore */ +function nullIndexOf(vector, searchElement) { + // if you're looking for nulls and the vector isn't empty, we've got 'em! + return searchElement === null && vector.length > 0 ? 0 : -1; +} +/** @ignore */ +function indexOfNull(vector, fromIndex) { + const { nullBitmap } = vector; + if (!nullBitmap || vector.nullCount <= 0) { + return -1; + } + let i = 0; + for (const isValid of iterateBits(nullBitmap, vector.data.offset + (fromIndex || 0), vector.length, nullBitmap, getBool)) { + if (!isValid) { + return i; + } + ++i; + } + return -1; +} +/** @ignore */ +function indexOfValue(vector, searchElement, fromIndex) { + if (searchElement === undefined) { + return -1; + } + if (searchElement === null) { + return indexOfNull(vector, fromIndex); + } + const compare = createElementComparator(searchElement); + for (let i = (fromIndex || 0) - 1, n = vector.length; ++i < n;) { + if (compare(vector.get(i))) { + return i; + } + } + return -1; +} +/** @ignore */ +function indexOfUnion(vector, searchElement, fromIndex) { + // Unions are special -- they do have a nullBitmap, but so can their children. + // If the searchElement is null, we don't know whether it came from the Union's + // bitmap or one of its childrens'. So we don't interrogate the Union's bitmap, + // since that will report the wrong index if a child has a null before the Union. + const compare = createElementComparator(searchElement); + for (let i = (fromIndex || 0) - 1, n = vector.length; ++i < n;) { + if (compare(vector.get(i))) { + return i; + } + } + return -1; +} +IndexOfVisitor.prototype.visitNull = nullIndexOf; +IndexOfVisitor.prototype.visitBool = indexOfValue; +IndexOfVisitor.prototype.visitInt = indexOfValue; +IndexOfVisitor.prototype.visitInt8 = indexOfValue; +IndexOfVisitor.prototype.visitInt16 = indexOfValue; +IndexOfVisitor.prototype.visitInt32 = indexOfValue; +IndexOfVisitor.prototype.visitInt64 = indexOfValue; +IndexOfVisitor.prototype.visitUint8 = indexOfValue; +IndexOfVisitor.prototype.visitUint16 = indexOfValue; +IndexOfVisitor.prototype.visitUint32 = indexOfValue; +IndexOfVisitor.prototype.visitUint64 = indexOfValue; +IndexOfVisitor.prototype.visitFloat = indexOfValue; +IndexOfVisitor.prototype.visitFloat16 = indexOfValue; +IndexOfVisitor.prototype.visitFloat32 = indexOfValue; +IndexOfVisitor.prototype.visitFloat64 = indexOfValue; +IndexOfVisitor.prototype.visitUtf8 = indexOfValue; +IndexOfVisitor.prototype.visitBinary = indexOfValue; +IndexOfVisitor.prototype.visitFixedSizeBinary = indexOfValue; +IndexOfVisitor.prototype.visitDate = indexOfValue; +IndexOfVisitor.prototype.visitDateDay = indexOfValue; +IndexOfVisitor.prototype.visitDateMillisecond = indexOfValue; +IndexOfVisitor.prototype.visitTimestamp = indexOfValue; +IndexOfVisitor.prototype.visitTimestampSecond = indexOfValue; +IndexOfVisitor.prototype.visitTimestampMillisecond = indexOfValue; +IndexOfVisitor.prototype.visitTimestampMicrosecond = indexOfValue; +IndexOfVisitor.prototype.visitTimestampNanosecond = indexOfValue; +IndexOfVisitor.prototype.visitTime = indexOfValue; +IndexOfVisitor.prototype.visitTimeSecond = indexOfValue; +IndexOfVisitor.prototype.visitTimeMillisecond = indexOfValue; +IndexOfVisitor.prototype.visitTimeMicrosecond = indexOfValue; +IndexOfVisitor.prototype.visitTimeNanosecond = indexOfValue; +IndexOfVisitor.prototype.visitDecimal = indexOfValue; +IndexOfVisitor.prototype.visitList = indexOfValue; +IndexOfVisitor.prototype.visitStruct = indexOfValue; +IndexOfVisitor.prototype.visitUnion = indexOfValue; +IndexOfVisitor.prototype.visitDenseUnion = indexOfUnion; +IndexOfVisitor.prototype.visitSparseUnion = indexOfUnion; +IndexOfVisitor.prototype.visitDictionary = indexOfValue; +IndexOfVisitor.prototype.visitInterval = indexOfValue; +IndexOfVisitor.prototype.visitIntervalDayTime = indexOfValue; +IndexOfVisitor.prototype.visitIntervalYearMonth = indexOfValue; +IndexOfVisitor.prototype.visitFixedSizeList = indexOfValue; +IndexOfVisitor.prototype.visitMap = indexOfValue; +/** @ignore */ +export const instance = new IndexOfVisitor(); + +//# sourceMappingURL=indexof.mjs.map diff --git a/frontend/node_modules/apache-arrow/visitor/indexof.mjs.map b/frontend/node_modules/apache-arrow/visitor/indexof.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..a7a03524030db984f04235e5301452a6b2f5e92d --- /dev/null +++ b/frontend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G,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,yBAAyB,GAAG,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,wBAAwB,GAAI,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,SAAS,GAAmB,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,eAAe,GAAa,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,oBAAoB,GAAQ,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,oBAAoB,GAAQ,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,mBAAmB,GAAS,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,YAAY,GAAgB,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,SAAS,GAAmB,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,WAAW,GAAiB,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,UAAU,GAAkB,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,eAAe,GAAa,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,gBAAgB,GAAY,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,eAAe,GAAa,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,aAAa,GAAe,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,oBAAoB,GAAQ,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,sBAAsB,GAAM,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,kBAAkB,GAAU,YAAY,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,QAAQ,GAAoB,YAAY,CAAC;AAElE,cAAc;AACd,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,cAAc,EAAE,CAAC","file":"indexof.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Type } from '../enum';\nimport { Visitor } from '../visitor';\nimport { VectorType } from '../interfaces';\nimport { getBool, iterateBits } from '../util/bit';\nimport { createElementComparator } from '../util/vector';\nimport {\n DataType, Dictionary,\n Bool, Null, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct,\n Float, Float16, Float32, Float64,\n Int, Uint8, Uint16, Uint32, Uint64, Int8, Int16, Int32, Int64,\n Date_, DateDay, DateMillisecond,\n Interval, IntervalDayTime, IntervalYearMonth,\n Time, TimeSecond, TimeMillisecond, TimeMicrosecond, TimeNanosecond,\n Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond,\n Union, DenseUnion, SparseUnion,\n} from '../type';\n\n/** @ignore */\nexport interface IndexOfVisitor extends Visitor {\n visit (node: T, value: T['TValue'] | null, index?: number): number;\n visitMany (nodes: T[], values: (T['TValue'] | null)[], indices: (number | undefined)[]): number[];\n getVisitFn (node: T): (vector: VectorType, value: VectorType['TValue'] | null, index?: number) => number;\n getVisitFn(node: VectorType | Data | T): (vector: VectorType, value: T['TValue'] | null, index?: number) => number;\n visitNull (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitBool (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitInt (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitInt8 (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitInt16 (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitInt32 (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitInt64 (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitUint8 (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitUint16 (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitUint32 (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitUint64 (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitFloat (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitFloat16 (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitFloat32 (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitFloat64 (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitUtf8 (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitBinary (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitFixedSizeBinary (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitDate (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitDateDay (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitDateMillisecond (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitTimestamp (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitTimestampSecond (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitTimestampMillisecond (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitTimestampMicrosecond (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitTimestampNanosecond (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitTime (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitTimeSecond (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitTimeMillisecond (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitTimeMicrosecond (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitTimeNanosecond (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitDecimal (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitList (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitStruct (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitUnion (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitDenseUnion (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitSparseUnion (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitDictionary (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitInterval (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitIntervalDayTime (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitIntervalYearMonth (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitFixedSizeList (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n visitMap (vector: VectorType, value: T['TValue'] | null, index?: number): number;\n}\n\n/** @ignore */\nexport class IndexOfVisitor extends Visitor {}\n\n/** @ignore */\nfunction nullIndexOf(vector: VectorType, searchElement?: null) {\n // if you're looking for nulls and the vector isn't empty, we've got 'em!\n return searchElement === null && vector.length > 0 ? 0 : -1;\n}\n\n/** @ignore */\nfunction indexOfNull(vector: VectorType, fromIndex?: number): number {\n const { nullBitmap } = vector;\n if (!nullBitmap || vector.nullCount <= 0) {\n return -1;\n }\n let i = 0;\n for (const isValid of iterateBits(nullBitmap, vector.data.offset + (fromIndex || 0), vector.length, nullBitmap, getBool)) {\n if (!isValid) { return i; }\n ++i;\n }\n return -1;\n}\n\n/** @ignore */\nfunction indexOfValue(vector: VectorType, searchElement?: T['TValue'] | null, fromIndex?: number): number {\n if (searchElement === undefined) { return -1; }\n if (searchElement === null) { return indexOfNull(vector, fromIndex); }\n const compare = createElementComparator(searchElement);\n for (let i = (fromIndex || 0) - 1, n = vector.length; ++i < n;) {\n if (compare(vector.get(i))) {\n return i;\n }\n }\n return -1;\n}\n\n/** @ignore */\nfunction indexOfUnion(vector: VectorType, searchElement?: T['TValue'] | null, fromIndex?: number): number {\n // Unions are special -- they do have a nullBitmap, but so can their children.\n // If the searchElement is null, we don't know whether it came from the Union's\n // bitmap or one of its childrens'. So we don't interrogate the Union's bitmap,\n // since that will report the wrong index if a child has a null before the Union.\n const compare = createElementComparator(searchElement);\n for (let i = (fromIndex || 0) - 1, n = vector.length; ++i < n;) {\n if (compare(vector.get(i))) {\n return i;\n }\n }\n return -1;\n}\n\nIndexOfVisitor.prototype.visitNull = nullIndexOf;\nIndexOfVisitor.prototype.visitBool = indexOfValue;\nIndexOfVisitor.prototype.visitInt = indexOfValue;\nIndexOfVisitor.prototype.visitInt8 = indexOfValue;\nIndexOfVisitor.prototype.visitInt16 = indexOfValue;\nIndexOfVisitor.prototype.visitInt32 = indexOfValue;\nIndexOfVisitor.prototype.visitInt64 = indexOfValue;\nIndexOfVisitor.prototype.visitUint8 = indexOfValue;\nIndexOfVisitor.prototype.visitUint16 = indexOfValue;\nIndexOfVisitor.prototype.visitUint32 = indexOfValue;\nIndexOfVisitor.prototype.visitUint64 = indexOfValue;\nIndexOfVisitor.prototype.visitFloat = indexOfValue;\nIndexOfVisitor.prototype.visitFloat16 = indexOfValue;\nIndexOfVisitor.prototype.visitFloat32 = indexOfValue;\nIndexOfVisitor.prototype.visitFloat64 = indexOfValue;\nIndexOfVisitor.prototype.visitUtf8 = indexOfValue;\nIndexOfVisitor.prototype.visitBinary = indexOfValue;\nIndexOfVisitor.prototype.visitFixedSizeBinary = indexOfValue;\nIndexOfVisitor.prototype.visitDate = indexOfValue;\nIndexOfVisitor.prototype.visitDateDay = indexOfValue;\nIndexOfVisitor.prototype.visitDateMillisecond = indexOfValue;\nIndexOfVisitor.prototype.visitTimestamp = indexOfValue;\nIndexOfVisitor.prototype.visitTimestampSecond = indexOfValue;\nIndexOfVisitor.prototype.visitTimestampMillisecond = indexOfValue;\nIndexOfVisitor.prototype.visitTimestampMicrosecond = indexOfValue;\nIndexOfVisitor.prototype.visitTimestampNanosecond = indexOfValue;\nIndexOfVisitor.prototype.visitTime = indexOfValue;\nIndexOfVisitor.prototype.visitTimeSecond = indexOfValue;\nIndexOfVisitor.prototype.visitTimeMillisecond = indexOfValue;\nIndexOfVisitor.prototype.visitTimeMicrosecond = indexOfValue;\nIndexOfVisitor.prototype.visitTimeNanosecond = indexOfValue;\nIndexOfVisitor.prototype.visitDecimal = indexOfValue;\nIndexOfVisitor.prototype.visitList = indexOfValue;\nIndexOfVisitor.prototype.visitStruct = indexOfValue;\nIndexOfVisitor.prototype.visitUnion = indexOfValue;\nIndexOfVisitor.prototype.visitDenseUnion = indexOfUnion;\nIndexOfVisitor.prototype.visitSparseUnion = indexOfUnion;\nIndexOfVisitor.prototype.visitDictionary = indexOfValue;\nIndexOfVisitor.prototype.visitInterval = indexOfValue;\nIndexOfVisitor.prototype.visitIntervalDayTime = indexOfValue;\nIndexOfVisitor.prototype.visitIntervalYearMonth = indexOfValue;\nIndexOfVisitor.prototype.visitFixedSizeList = indexOfValue;\nIndexOfVisitor.prototype.visitMap = indexOfValue;\n\n/** @ignore */\nexport const instance = new IndexOfVisitor();\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/iterator.d.ts b/frontend/node_modules/apache-arrow/visitor/iterator.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e562e867c538c45578e4061df8ffb47e658f7869 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/iterator.d.ts @@ -0,0 +1,60 @@ +import { Data } from '../data'; +import { Type } from '../enum'; +import { Visitor } from '../visitor'; +import { VectorType } from '../interfaces'; +import { DataType, Dictionary, Bool, Null, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct, Float, Float16, Float32, Float64, Int, Uint8, Uint16, Uint32, Uint64, Int8, Int16, Int32, Int64, Date_, DateDay, DateMillisecond, Interval, IntervalDayTime, IntervalYearMonth, Time, TimeSecond, TimeMillisecond, TimeMicrosecond, TimeNanosecond, Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond, Union, DenseUnion, SparseUnion } from '../type'; +/** @ignore */ +export interface IteratorVisitor extends Visitor { + visit(node: T): IterableIterator; + visitMany(nodes: T[]): IterableIterator[]; + getVisitFn(node: T): (vector: VectorType) => IterableIterator['TValue'] | null>; + getVisitFn(node: VectorType | Data | T): (vector: VectorType) => IterableIterator['TValue'] | null>; + visitNull(vector: VectorType): IterableIterator; + visitBool(vector: VectorType): IterableIterator; + visitInt(vector: VectorType): IterableIterator; + visitInt8(vector: VectorType): IterableIterator; + visitInt16(vector: VectorType): IterableIterator; + visitInt32(vector: VectorType): IterableIterator; + visitInt64(vector: VectorType): IterableIterator; + visitUint8(vector: VectorType): IterableIterator; + visitUint16(vector: VectorType): IterableIterator; + visitUint32(vector: VectorType): IterableIterator; + visitUint64(vector: VectorType): IterableIterator; + visitFloat(vector: VectorType): IterableIterator; + visitFloat16(vector: VectorType): IterableIterator; + visitFloat32(vector: VectorType): IterableIterator; + visitFloat64(vector: VectorType): IterableIterator; + visitUtf8(vector: VectorType): IterableIterator; + visitBinary(vector: VectorType): IterableIterator; + visitFixedSizeBinary(vector: VectorType): IterableIterator; + visitDate(vector: VectorType): IterableIterator; + visitDateDay(vector: VectorType): IterableIterator; + visitDateMillisecond(vector: VectorType): IterableIterator; + visitTimestamp(vector: VectorType): IterableIterator; + visitTimestampSecond(vector: VectorType): IterableIterator; + visitTimestampMillisecond(vector: VectorType): IterableIterator; + visitTimestampMicrosecond(vector: VectorType): IterableIterator; + visitTimestampNanosecond(vector: VectorType): IterableIterator; + visitTime(vector: VectorType): IterableIterator; + visitTimeSecond(vector: VectorType): IterableIterator; + visitTimeMillisecond(vector: VectorType): IterableIterator; + visitTimeMicrosecond(vector: VectorType): IterableIterator; + visitTimeNanosecond(vector: VectorType): IterableIterator; + visitDecimal(vector: VectorType): IterableIterator; + visitList(vector: VectorType): IterableIterator; + visitStruct(vector: VectorType): IterableIterator; + visitUnion(vector: VectorType): IterableIterator; + visitDenseUnion(vector: VectorType): IterableIterator; + visitSparseUnion(vector: VectorType): IterableIterator; + visitDictionary(vector: VectorType): IterableIterator; + visitInterval(vector: VectorType): IterableIterator; + visitIntervalDayTime(vector: VectorType): IterableIterator; + visitIntervalYearMonth(vector: VectorType): IterableIterator; + visitFixedSizeList(vector: VectorType): IterableIterator; + visitMap(vector: VectorType): IterableIterator; +} +/** @ignore */ +export declare class IteratorVisitor extends Visitor { +} +/** @ignore */ +export declare const instance: IteratorVisitor; diff --git a/frontend/node_modules/apache-arrow/visitor/iterator.js b/frontend/node_modules/apache-arrow/visitor/iterator.js new file mode 100644 index 0000000000000000000000000000000000000000..1c3884b98f1ba7d62548e499bf8741ee400673e8 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/iterator.js @@ -0,0 +1,99 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const enum_1 = require("../enum"); +const visitor_1 = require("../visitor"); +const bit_1 = require("../util/bit"); +const get_1 = require("./get"); +/** @ignore */ +class IteratorVisitor extends visitor_1.Visitor { +} +exports.IteratorVisitor = IteratorVisitor; +/** @ignore */ +function nullableIterator(vector) { + const getFn = get_1.instance.getVisitFn(vector); + return bit_1.iterateBits(vector.nullBitmap, vector.offset, vector.length, vector, (vec, idx, nullByte, nullBit) => ((nullByte & 1 << nullBit) !== 0) ? getFn(vec, idx) : null); +} +/** @ignore */ +function vectorIterator(vector) { + // If nullable, iterate manually + if (vector.nullCount > 0) { + return nullableIterator(vector); + } + const { type, typeId, length } = vector; + // Fast case, defer to native iterators if possible + if (vector.stride === 1 && ((typeId === enum_1.Type.Timestamp) || + (typeId === enum_1.Type.Int && type.bitWidth !== 64) || + (typeId === enum_1.Type.Time && type.bitWidth !== 64) || + (typeId === enum_1.Type.Float && type.precision > 0 /* Precision.HALF */))) { + return vector.values.subarray(0, length)[Symbol.iterator](); + } + // Otherwise, iterate manually + return (function* (getFn) { + for (let index = -1; ++index < length;) { + yield getFn(vector, index); + } + })(get_1.instance.getVisitFn(vector)); +} +IteratorVisitor.prototype.visitNull = vectorIterator; +IteratorVisitor.prototype.visitBool = vectorIterator; +IteratorVisitor.prototype.visitInt = vectorIterator; +IteratorVisitor.prototype.visitInt8 = vectorIterator; +IteratorVisitor.prototype.visitInt16 = vectorIterator; +IteratorVisitor.prototype.visitInt32 = vectorIterator; +IteratorVisitor.prototype.visitInt64 = vectorIterator; +IteratorVisitor.prototype.visitUint8 = vectorIterator; +IteratorVisitor.prototype.visitUint16 = vectorIterator; +IteratorVisitor.prototype.visitUint32 = vectorIterator; +IteratorVisitor.prototype.visitUint64 = vectorIterator; +IteratorVisitor.prototype.visitFloat = vectorIterator; +IteratorVisitor.prototype.visitFloat16 = vectorIterator; +IteratorVisitor.prototype.visitFloat32 = vectorIterator; +IteratorVisitor.prototype.visitFloat64 = vectorIterator; +IteratorVisitor.prototype.visitUtf8 = vectorIterator; +IteratorVisitor.prototype.visitBinary = vectorIterator; +IteratorVisitor.prototype.visitFixedSizeBinary = vectorIterator; +IteratorVisitor.prototype.visitDate = vectorIterator; +IteratorVisitor.prototype.visitDateDay = vectorIterator; +IteratorVisitor.prototype.visitDateMillisecond = vectorIterator; +IteratorVisitor.prototype.visitTimestamp = vectorIterator; +IteratorVisitor.prototype.visitTimestampSecond = vectorIterator; +IteratorVisitor.prototype.visitTimestampMillisecond = vectorIterator; +IteratorVisitor.prototype.visitTimestampMicrosecond = vectorIterator; +IteratorVisitor.prototype.visitTimestampNanosecond = vectorIterator; +IteratorVisitor.prototype.visitTime = vectorIterator; +IteratorVisitor.prototype.visitTimeSecond = vectorIterator; +IteratorVisitor.prototype.visitTimeMillisecond = vectorIterator; +IteratorVisitor.prototype.visitTimeMicrosecond = vectorIterator; +IteratorVisitor.prototype.visitTimeNanosecond = vectorIterator; +IteratorVisitor.prototype.visitDecimal = vectorIterator; +IteratorVisitor.prototype.visitList = vectorIterator; +IteratorVisitor.prototype.visitStruct = vectorIterator; +IteratorVisitor.prototype.visitUnion = vectorIterator; +IteratorVisitor.prototype.visitDenseUnion = vectorIterator; +IteratorVisitor.prototype.visitSparseUnion = vectorIterator; +IteratorVisitor.prototype.visitDictionary = vectorIterator; +IteratorVisitor.prototype.visitInterval = vectorIterator; +IteratorVisitor.prototype.visitIntervalDayTime = vectorIterator; +IteratorVisitor.prototype.visitIntervalYearMonth = vectorIterator; +IteratorVisitor.prototype.visitFixedSizeList = vectorIterator; +IteratorVisitor.prototype.visitMap = vectorIterator; +/** @ignore */ +exports.instance = new IteratorVisitor(); + +//# sourceMappingURL=iterator.js.map diff --git a/frontend/node_modules/apache-arrow/visitor/iterator.js.map b/frontend/node_modules/apache-arrow/visitor/iterator.js.map new file mode 100644 index 0000000000000000000000000000000000000000..0bd99b9cbf41ee6b4015448a9cf928f52d3fd047 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/iterator.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor/iterator.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAGrB,kCAA+B;AAC/B,wCAAqC;AAErC,qCAA0C;AAC1C,+BAA+C;AAgE/C,cAAc;AACd,MAAa,eAAgB,SAAQ,iBAAO;CAAG;AAA/C,0CAA+C;AAE/C,cAAc;AACd,SAAS,gBAAgB,CAAqB,MAAqB;IAC/D,MAAM,KAAK,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,CAAC;AACrE,eAAe,CAAC,SAAS,CAAC,kBAAkB,GAAU,cAAc,CAAC;AACrE,eAAe,CAAC,SAAS,CAAC,QAAQ,GAAoB,cAAc,CAAC;AAErE,cAAc;AACD,QAAA,QAAQ,GAAG,IAAI,eAAe,EAAE,CAAC","file":"iterator.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Type } from '../enum';\nimport { Visitor } from '../visitor';\nimport { VectorType } from '../interfaces';\nimport { iterateBits } from '../util/bit';\nimport { instance as getVisitor } from './get';\nimport {\n DataType, Dictionary,\n Bool, Null, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct,\n Float, Float16, Float32, Float64,\n Int, Uint8, Uint16, Uint32, Uint64, Int8, Int16, Int32, Int64,\n Date_, DateDay, DateMillisecond,\n Interval, IntervalDayTime, IntervalYearMonth,\n Time, TimeSecond, TimeMillisecond, TimeMicrosecond, TimeNanosecond,\n Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond,\n Union, DenseUnion, SparseUnion,\n} from '../type';\n\n/** @ignore */\nexport interface IteratorVisitor extends Visitor {\n visit(node: T): IterableIterator;\n visitMany (nodes: T[]): IterableIterator[];\n getVisitFn(node: T): (vector: VectorType) => IterableIterator['TValue'] | null>;\n getVisitFn(node: VectorType | Data | T): (vector: VectorType) => IterableIterator['TValue'] | null>;\n visitNull (vector: VectorType): IterableIterator;\n visitBool (vector: VectorType): IterableIterator;\n visitInt (vector: VectorType): IterableIterator;\n visitInt8 (vector: VectorType): IterableIterator;\n visitInt16 (vector: VectorType): IterableIterator;\n visitInt32 (vector: VectorType): IterableIterator;\n visitInt64 (vector: VectorType): IterableIterator;\n visitUint8 (vector: VectorType): IterableIterator;\n visitUint16 (vector: VectorType): IterableIterator;\n visitUint32 (vector: VectorType): IterableIterator;\n visitUint64 (vector: VectorType): IterableIterator;\n visitFloat (vector: VectorType): IterableIterator;\n visitFloat16 (vector: VectorType): IterableIterator;\n visitFloat32 (vector: VectorType): IterableIterator;\n visitFloat64 (vector: VectorType): IterableIterator;\n visitUtf8 (vector: VectorType): IterableIterator;\n visitBinary (vector: VectorType): IterableIterator;\n visitFixedSizeBinary (vector: VectorType): IterableIterator;\n visitDate (vector: VectorType): IterableIterator;\n visitDateDay (vector: VectorType): IterableIterator;\n visitDateMillisecond (vector: VectorType): IterableIterator;\n visitTimestamp (vector: VectorType): IterableIterator;\n visitTimestampSecond (vector: VectorType): IterableIterator;\n visitTimestampMillisecond (vector: VectorType): IterableIterator;\n visitTimestampMicrosecond (vector: VectorType): IterableIterator;\n visitTimestampNanosecond (vector: VectorType): IterableIterator;\n visitTime (vector: VectorType): IterableIterator;\n visitTimeSecond (vector: VectorType): IterableIterator;\n visitTimeMillisecond (vector: VectorType): IterableIterator;\n visitTimeMicrosecond (vector: VectorType): IterableIterator;\n visitTimeNanosecond (vector: VectorType): IterableIterator;\n visitDecimal (vector: VectorType): IterableIterator;\n visitList (vector: VectorType): IterableIterator;\n visitStruct (vector: VectorType): IterableIterator;\n visitUnion (vector: VectorType): IterableIterator;\n visitDenseUnion (vector: VectorType): IterableIterator;\n visitSparseUnion (vector: VectorType): IterableIterator;\n visitDictionary (vector: VectorType): IterableIterator;\n visitInterval (vector: VectorType): IterableIterator;\n visitIntervalDayTime (vector: VectorType): IterableIterator;\n visitIntervalYearMonth (vector: VectorType): IterableIterator;\n visitFixedSizeList (vector: VectorType): IterableIterator;\n visitMap (vector: VectorType): IterableIterator;\n}\n\n/** @ignore */\nexport class IteratorVisitor extends Visitor {}\n\n/** @ignore */\nfunction nullableIterator(vector: VectorType): IterableIterator {\n const getFn = getVisitor.getVisitFn(vector);\n return iterateBits(\n vector.nullBitmap, vector.offset, vector.length, vector,\n (vec: VectorType, idx: number, nullByte: number, nullBit: number) =>\n ((nullByte & 1 << nullBit) !== 0) ? getFn(vec, idx) : null\n );\n}\n\n/** @ignore */\nfunction vectorIterator(vector: VectorType): IterableIterator {\n\n // If nullable, iterate manually\n if (vector.nullCount > 0) {\n return nullableIterator(vector);\n }\n\n const { type, typeId, length } = vector;\n\n // Fast case, defer to native iterators if possible\n if (vector.stride === 1 && (\n (typeId === Type.Timestamp) ||\n (typeId === Type.Int && (type as Int).bitWidth !== 64) ||\n (typeId === Type.Time && (type as Time).bitWidth !== 64) ||\n (typeId === Type.Float && (type as Float).precision > 0 /* Precision.HALF */)\n )) {\n return vector.values.subarray(0, length)[Symbol.iterator]();\n }\n\n // Otherwise, iterate manually\n return (function* (getFn) {\n for (let index = -1; ++index < length;) {\n yield getFn(vector, index);\n }\n })(getVisitor.getVisitFn(vector));\n}\n\nIteratorVisitor.prototype.visitNull = vectorIterator;\nIteratorVisitor.prototype.visitBool = vectorIterator;\nIteratorVisitor.prototype.visitInt = vectorIterator;\nIteratorVisitor.prototype.visitInt8 = vectorIterator;\nIteratorVisitor.prototype.visitInt16 = vectorIterator;\nIteratorVisitor.prototype.visitInt32 = vectorIterator;\nIteratorVisitor.prototype.visitInt64 = vectorIterator;\nIteratorVisitor.prototype.visitUint8 = vectorIterator;\nIteratorVisitor.prototype.visitUint16 = vectorIterator;\nIteratorVisitor.prototype.visitUint32 = vectorIterator;\nIteratorVisitor.prototype.visitUint64 = vectorIterator;\nIteratorVisitor.prototype.visitFloat = vectorIterator;\nIteratorVisitor.prototype.visitFloat16 = vectorIterator;\nIteratorVisitor.prototype.visitFloat32 = vectorIterator;\nIteratorVisitor.prototype.visitFloat64 = vectorIterator;\nIteratorVisitor.prototype.visitUtf8 = vectorIterator;\nIteratorVisitor.prototype.visitBinary = vectorIterator;\nIteratorVisitor.prototype.visitFixedSizeBinary = vectorIterator;\nIteratorVisitor.prototype.visitDate = vectorIterator;\nIteratorVisitor.prototype.visitDateDay = vectorIterator;\nIteratorVisitor.prototype.visitDateMillisecond = vectorIterator;\nIteratorVisitor.prototype.visitTimestamp = vectorIterator;\nIteratorVisitor.prototype.visitTimestampSecond = vectorIterator;\nIteratorVisitor.prototype.visitTimestampMillisecond = vectorIterator;\nIteratorVisitor.prototype.visitTimestampMicrosecond = vectorIterator;\nIteratorVisitor.prototype.visitTimestampNanosecond = vectorIterator;\nIteratorVisitor.prototype.visitTime = vectorIterator;\nIteratorVisitor.prototype.visitTimeSecond = vectorIterator;\nIteratorVisitor.prototype.visitTimeMillisecond = vectorIterator;\nIteratorVisitor.prototype.visitTimeMicrosecond = vectorIterator;\nIteratorVisitor.prototype.visitTimeNanosecond = vectorIterator;\nIteratorVisitor.prototype.visitDecimal = vectorIterator;\nIteratorVisitor.prototype.visitList = vectorIterator;\nIteratorVisitor.prototype.visitStruct = vectorIterator;\nIteratorVisitor.prototype.visitUnion = vectorIterator;\nIteratorVisitor.prototype.visitDenseUnion = vectorIterator;\nIteratorVisitor.prototype.visitSparseUnion = vectorIterator;\nIteratorVisitor.prototype.visitDictionary = vectorIterator;\nIteratorVisitor.prototype.visitInterval = vectorIterator;\nIteratorVisitor.prototype.visitIntervalDayTime = vectorIterator;\nIteratorVisitor.prototype.visitIntervalYearMonth = vectorIterator;\nIteratorVisitor.prototype.visitFixedSizeList = vectorIterator;\nIteratorVisitor.prototype.visitMap = vectorIterator;\n\n/** @ignore */\nexport const instance = new IteratorVisitor();\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/iterator.mjs b/frontend/node_modules/apache-arrow/visitor/iterator.mjs new file mode 100644 index 0000000000000000000000000000000000000000..7227daefbf52f5cd09960ea168b85ddae2e43dac --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/iterator.mjs @@ -0,0 +1,96 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { Type } from '../enum'; +import { Visitor } from '../visitor'; +import { iterateBits } from '../util/bit'; +import { instance as getVisitor } from './get'; +/** @ignore */ +export class IteratorVisitor extends Visitor { +} +/** @ignore */ +function nullableIterator(vector) { + const getFn = getVisitor.getVisitFn(vector); + return iterateBits(vector.nullBitmap, vector.offset, vector.length, vector, (vec, idx, nullByte, nullBit) => ((nullByte & 1 << nullBit) !== 0) ? getFn(vec, idx) : null); +} +/** @ignore */ +function vectorIterator(vector) { + // If nullable, iterate manually + if (vector.nullCount > 0) { + return nullableIterator(vector); + } + const { type, typeId, length } = vector; + // Fast case, defer to native iterators if possible + if (vector.stride === 1 && ((typeId === Type.Timestamp) || + (typeId === Type.Int && type.bitWidth !== 64) || + (typeId === Type.Time && type.bitWidth !== 64) || + (typeId === Type.Float && type.precision > 0 /* Precision.HALF */))) { + return vector.values.subarray(0, length)[Symbol.iterator](); + } + // Otherwise, iterate manually + return (function* (getFn) { + for (let index = -1; ++index < length;) { + yield getFn(vector, index); + } + })(getVisitor.getVisitFn(vector)); +} +IteratorVisitor.prototype.visitNull = vectorIterator; +IteratorVisitor.prototype.visitBool = vectorIterator; +IteratorVisitor.prototype.visitInt = vectorIterator; +IteratorVisitor.prototype.visitInt8 = vectorIterator; +IteratorVisitor.prototype.visitInt16 = vectorIterator; +IteratorVisitor.prototype.visitInt32 = vectorIterator; +IteratorVisitor.prototype.visitInt64 = vectorIterator; +IteratorVisitor.prototype.visitUint8 = vectorIterator; +IteratorVisitor.prototype.visitUint16 = vectorIterator; +IteratorVisitor.prototype.visitUint32 = vectorIterator; +IteratorVisitor.prototype.visitUint64 = vectorIterator; +IteratorVisitor.prototype.visitFloat = vectorIterator; +IteratorVisitor.prototype.visitFloat16 = vectorIterator; +IteratorVisitor.prototype.visitFloat32 = vectorIterator; +IteratorVisitor.prototype.visitFloat64 = vectorIterator; +IteratorVisitor.prototype.visitUtf8 = vectorIterator; +IteratorVisitor.prototype.visitBinary = vectorIterator; +IteratorVisitor.prototype.visitFixedSizeBinary = vectorIterator; +IteratorVisitor.prototype.visitDate = vectorIterator; +IteratorVisitor.prototype.visitDateDay = vectorIterator; +IteratorVisitor.prototype.visitDateMillisecond = vectorIterator; +IteratorVisitor.prototype.visitTimestamp = vectorIterator; +IteratorVisitor.prototype.visitTimestampSecond = vectorIterator; +IteratorVisitor.prototype.visitTimestampMillisecond = vectorIterator; +IteratorVisitor.prototype.visitTimestampMicrosecond = vectorIterator; +IteratorVisitor.prototype.visitTimestampNanosecond = vectorIterator; +IteratorVisitor.prototype.visitTime = vectorIterator; +IteratorVisitor.prototype.visitTimeSecond = vectorIterator; +IteratorVisitor.prototype.visitTimeMillisecond = vectorIterator; +IteratorVisitor.prototype.visitTimeMicrosecond = vectorIterator; +IteratorVisitor.prototype.visitTimeNanosecond = vectorIterator; +IteratorVisitor.prototype.visitDecimal = vectorIterator; +IteratorVisitor.prototype.visitList = vectorIterator; +IteratorVisitor.prototype.visitStruct = vectorIterator; +IteratorVisitor.prototype.visitUnion = vectorIterator; +IteratorVisitor.prototype.visitDenseUnion = vectorIterator; +IteratorVisitor.prototype.visitSparseUnion = vectorIterator; +IteratorVisitor.prototype.visitDictionary = vectorIterator; +IteratorVisitor.prototype.visitInterval = vectorIterator; +IteratorVisitor.prototype.visitIntervalDayTime = vectorIterator; +IteratorVisitor.prototype.visitIntervalYearMonth = vectorIterator; +IteratorVisitor.prototype.visitFixedSizeList = vectorIterator; +IteratorVisitor.prototype.visitMap = vectorIterator; +/** @ignore */ +export const instance = new IteratorVisitor(); + +//# sourceMappingURL=iterator.mjs.map diff --git a/frontend/node_modules/apache-arrow/visitor/iterator.mjs.map b/frontend/node_modules/apache-arrow/visitor/iterator.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..3216542195eda9f987acb3c08cad49f581127d94 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/iterator.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor/iterator.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAGrB,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,QAAQ,IAAI,UAAU,EAAE,MAAM,OAAO,CAAC;AAgE/C,cAAc;AACd,MAAM,OAAO,eAAgB,SAAQ,OAAO;CAAG;AAE/C,cAAc;AACd,SAAS,gBAAgB,CAAqB,MAAqB;IAC/D,MAAM,KAAK,GAAG,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAC5C,OAAO,WAAW,CACd,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EACvD,CAAC,GAAkB,EAAE,GAAW,EAAE,QAAgB,EAAE,OAAe,EAAE,EAAE,CACnE,CAAC,CAAC,QAAQ,GAAG,CAAC,IAAI,OAAO,CAAC,K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,cAAc,CAAC;AACrE,eAAe,CAAC,SAAS,CAAC,yBAAyB,GAAG,cAAc,CAAC;AACrE,eAAe,CAAC,SAAS,CAAC,wBAAwB,GAAI,cAAc,CAAC;AACrE,eAAe,CAAC,SAAS,CAAC,SAAS,GAAmB,cAAc,CAAC;AACrE,eAAe,CAAC,SAAS,CAAC,eAAe,GAAa,cAAc,CAAC;AACrE,eAAe,CAAC,SAAS,CAAC,oBAAoB,GAAQ,cAAc,CAAC;AACrE,eAAe,CAAC,SAAS,CAAC,oBAAoB,GAAQ,cAAc,CAAC;AACrE,eAAe,CAAC,SAAS,CAAC,mBAAmB,GAAS,cAAc,CAAC;AACrE,eAAe,CAAC,SAAS,CAAC,YAAY,GAAgB,cAAc,CAAC;AACrE,eAAe,CAAC,SAAS,CAAC,SAAS,GAAmB,cAAc,CAAC;AACrE,eAAe,CAAC,SAAS,CAAC,WAAW,GAAiB,cAAc,CAAC;AACrE,eAAe,CAAC,SAAS,CAAC,UAAU,GAAkB,cAAc,CAAC;AACrE,eAAe,CAAC,SAAS,CAAC,eAAe,GAAa,cAAc,CAAC;AACrE,eAAe,CAAC,SAAS,CAAC,gBAAgB,GAAY,cAAc,CAAC;AACrE,eAAe,CAAC,SAAS,CAAC,eAAe,GAAa,cAAc,CAAC;AACrE,eAAe,CAAC,SAAS,CAAC,aAAa,GAAe,cAAc,CAAC;AACrE,eAAe,CAAC,SAAS,CAAC,oBAAoB,GAAQ,cAAc,CAAC;AACrE,eAAe,CAAC,SAAS,CAAC,sBAAsB,GAAM,cAAc,CAAC;AACrE,eAAe,CAAC,SAAS,CAAC,kBAAkB,GAAU,cAAc,CAAC;AACrE,eAAe,CAAC,SAAS,CAAC,QAAQ,GAAoB,cAAc,CAAC;AAErE,cAAc;AACd,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,eAAe,EAAE,CAAC","file":"iterator.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Type } from '../enum';\nimport { Visitor } from '../visitor';\nimport { VectorType } from '../interfaces';\nimport { iterateBits } from '../util/bit';\nimport { instance as getVisitor } from './get';\nimport {\n DataType, Dictionary,\n Bool, Null, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct,\n Float, Float16, Float32, Float64,\n Int, Uint8, Uint16, Uint32, Uint64, Int8, Int16, Int32, Int64,\n Date_, DateDay, DateMillisecond,\n Interval, IntervalDayTime, IntervalYearMonth,\n Time, TimeSecond, TimeMillisecond, TimeMicrosecond, TimeNanosecond,\n Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond,\n Union, DenseUnion, SparseUnion,\n} from '../type';\n\n/** @ignore */\nexport interface IteratorVisitor extends Visitor {\n visit(node: T): IterableIterator;\n visitMany (nodes: T[]): IterableIterator[];\n getVisitFn(node: T): (vector: VectorType) => IterableIterator['TValue'] | null>;\n getVisitFn(node: VectorType | Data | T): (vector: VectorType) => IterableIterator['TValue'] | null>;\n visitNull (vector: VectorType): IterableIterator;\n visitBool (vector: VectorType): IterableIterator;\n visitInt (vector: VectorType): IterableIterator;\n visitInt8 (vector: VectorType): IterableIterator;\n visitInt16 (vector: VectorType): IterableIterator;\n visitInt32 (vector: VectorType): IterableIterator;\n visitInt64 (vector: VectorType): IterableIterator;\n visitUint8 (vector: VectorType): IterableIterator;\n visitUint16 (vector: VectorType): IterableIterator;\n visitUint32 (vector: VectorType): IterableIterator;\n visitUint64 (vector: VectorType): IterableIterator;\n visitFloat (vector: VectorType): IterableIterator;\n visitFloat16 (vector: VectorType): IterableIterator;\n visitFloat32 (vector: VectorType): IterableIterator;\n visitFloat64 (vector: VectorType): IterableIterator;\n visitUtf8 (vector: VectorType): IterableIterator;\n visitBinary (vector: VectorType): IterableIterator;\n visitFixedSizeBinary (vector: VectorType): IterableIterator;\n visitDate (vector: VectorType): IterableIterator;\n visitDateDay (vector: VectorType): IterableIterator;\n visitDateMillisecond (vector: VectorType): IterableIterator;\n visitTimestamp (vector: VectorType): IterableIterator;\n visitTimestampSecond (vector: VectorType): IterableIterator;\n visitTimestampMillisecond (vector: VectorType): IterableIterator;\n visitTimestampMicrosecond (vector: VectorType): IterableIterator;\n visitTimestampNanosecond (vector: VectorType): IterableIterator;\n visitTime (vector: VectorType): IterableIterator;\n visitTimeSecond (vector: VectorType): IterableIterator;\n visitTimeMillisecond (vector: VectorType): IterableIterator;\n visitTimeMicrosecond (vector: VectorType): IterableIterator;\n visitTimeNanosecond (vector: VectorType): IterableIterator;\n visitDecimal (vector: VectorType): IterableIterator;\n visitList (vector: VectorType): IterableIterator;\n visitStruct (vector: VectorType): IterableIterator;\n visitUnion (vector: VectorType): IterableIterator;\n visitDenseUnion (vector: VectorType): IterableIterator;\n visitSparseUnion (vector: VectorType): IterableIterator;\n visitDictionary (vector: VectorType): IterableIterator;\n visitInterval (vector: VectorType): IterableIterator;\n visitIntervalDayTime (vector: VectorType): IterableIterator;\n visitIntervalYearMonth (vector: VectorType): IterableIterator;\n visitFixedSizeList (vector: VectorType): IterableIterator;\n visitMap (vector: VectorType): IterableIterator;\n}\n\n/** @ignore */\nexport class IteratorVisitor extends Visitor {}\n\n/** @ignore */\nfunction nullableIterator(vector: VectorType): IterableIterator {\n const getFn = getVisitor.getVisitFn(vector);\n return iterateBits(\n vector.nullBitmap, vector.offset, vector.length, vector,\n (vec: VectorType, idx: number, nullByte: number, nullBit: number) =>\n ((nullByte & 1 << nullBit) !== 0) ? getFn(vec, idx) : null\n );\n}\n\n/** @ignore */\nfunction vectorIterator(vector: VectorType): IterableIterator {\n\n // If nullable, iterate manually\n if (vector.nullCount > 0) {\n return nullableIterator(vector);\n }\n\n const { type, typeId, length } = vector;\n\n // Fast case, defer to native iterators if possible\n if (vector.stride === 1 && (\n (typeId === Type.Timestamp) ||\n (typeId === Type.Int && (type as Int).bitWidth !== 64) ||\n (typeId === Type.Time && (type as Time).bitWidth !== 64) ||\n (typeId === Type.Float && (type as Float).precision > 0 /* Precision.HALF */)\n )) {\n return vector.values.subarray(0, length)[Symbol.iterator]();\n }\n\n // Otherwise, iterate manually\n return (function* (getFn) {\n for (let index = -1; ++index < length;) {\n yield getFn(vector, index);\n }\n })(getVisitor.getVisitFn(vector));\n}\n\nIteratorVisitor.prototype.visitNull = vectorIterator;\nIteratorVisitor.prototype.visitBool = vectorIterator;\nIteratorVisitor.prototype.visitInt = vectorIterator;\nIteratorVisitor.prototype.visitInt8 = vectorIterator;\nIteratorVisitor.prototype.visitInt16 = vectorIterator;\nIteratorVisitor.prototype.visitInt32 = vectorIterator;\nIteratorVisitor.prototype.visitInt64 = vectorIterator;\nIteratorVisitor.prototype.visitUint8 = vectorIterator;\nIteratorVisitor.prototype.visitUint16 = vectorIterator;\nIteratorVisitor.prototype.visitUint32 = vectorIterator;\nIteratorVisitor.prototype.visitUint64 = vectorIterator;\nIteratorVisitor.prototype.visitFloat = vectorIterator;\nIteratorVisitor.prototype.visitFloat16 = vectorIterator;\nIteratorVisitor.prototype.visitFloat32 = vectorIterator;\nIteratorVisitor.prototype.visitFloat64 = vectorIterator;\nIteratorVisitor.prototype.visitUtf8 = vectorIterator;\nIteratorVisitor.prototype.visitBinary = vectorIterator;\nIteratorVisitor.prototype.visitFixedSizeBinary = vectorIterator;\nIteratorVisitor.prototype.visitDate = vectorIterator;\nIteratorVisitor.prototype.visitDateDay = vectorIterator;\nIteratorVisitor.prototype.visitDateMillisecond = vectorIterator;\nIteratorVisitor.prototype.visitTimestamp = vectorIterator;\nIteratorVisitor.prototype.visitTimestampSecond = vectorIterator;\nIteratorVisitor.prototype.visitTimestampMillisecond = vectorIterator;\nIteratorVisitor.prototype.visitTimestampMicrosecond = vectorIterator;\nIteratorVisitor.prototype.visitTimestampNanosecond = vectorIterator;\nIteratorVisitor.prototype.visitTime = vectorIterator;\nIteratorVisitor.prototype.visitTimeSecond = vectorIterator;\nIteratorVisitor.prototype.visitTimeMillisecond = vectorIterator;\nIteratorVisitor.prototype.visitTimeMicrosecond = vectorIterator;\nIteratorVisitor.prototype.visitTimeNanosecond = vectorIterator;\nIteratorVisitor.prototype.visitDecimal = vectorIterator;\nIteratorVisitor.prototype.visitList = vectorIterator;\nIteratorVisitor.prototype.visitStruct = vectorIterator;\nIteratorVisitor.prototype.visitUnion = vectorIterator;\nIteratorVisitor.prototype.visitDenseUnion = vectorIterator;\nIteratorVisitor.prototype.visitSparseUnion = vectorIterator;\nIteratorVisitor.prototype.visitDictionary = vectorIterator;\nIteratorVisitor.prototype.visitInterval = vectorIterator;\nIteratorVisitor.prototype.visitIntervalDayTime = vectorIterator;\nIteratorVisitor.prototype.visitIntervalYearMonth = vectorIterator;\nIteratorVisitor.prototype.visitFixedSizeList = vectorIterator;\nIteratorVisitor.prototype.visitMap = vectorIterator;\n\n/** @ignore */\nexport const instance = new IteratorVisitor();\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/jsontypeassembler.d.ts b/frontend/node_modules/apache-arrow/visitor/jsontypeassembler.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9319bffa0501ee3750462380447b038690b11ac2 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/jsontypeassembler.d.ts @@ -0,0 +1,77 @@ +import * as type from '../type'; +import { Visitor } from '../visitor'; +/** @ignore */ +export interface JSONTypeAssembler extends Visitor { + visit(node: T): object | undefined; +} +/** @ignore */ +export declare class JSONTypeAssembler extends Visitor { + visitNull({ typeId }: T): { + 'name': string; + }; + visitInt({ typeId, bitWidth, isSigned }: T): { + 'name': string; + 'bitWidth': type.IntBitWidth; + 'isSigned': boolean; + }; + visitFloat({ typeId, precision }: T): { + 'name': string; + 'precision': string; + }; + visitBinary({ typeId }: T): { + 'name': string; + }; + visitBool({ typeId }: T): { + 'name': string; + }; + visitUtf8({ typeId }: T): { + 'name': string; + }; + visitDecimal({ typeId, scale, precision }: T): { + 'name': string; + 'scale': number; + 'precision': number; + }; + visitDate({ typeId, unit }: T): { + 'name': string; + 'unit': string; + }; + visitTime({ typeId, unit, bitWidth }: T): { + 'name': string; + 'unit': string; + bitWidth: type.TimeBitWidth; + }; + visitTimestamp({ typeId, timezone, unit }: T): { + 'name': string; + 'unit': string; + timezone: string | null | undefined; + }; + visitInterval({ typeId, unit }: T): { + 'name': string; + 'unit': string; + }; + visitList({ typeId }: T): { + 'name': string; + }; + visitStruct({ typeId }: T): { + 'name': string; + }; + visitUnion({ typeId, mode, typeIds }: T): { + 'name': string; + 'mode': string; + 'typeIds': number[]; + }; + visitDictionary(node: T): object | undefined; + visitFixedSizeBinary({ typeId, byteWidth }: T): { + 'name': string; + 'byteWidth': number; + }; + visitFixedSizeList({ typeId, listSize }: T): { + 'name': string; + 'listSize': number; + }; + visitMap({ typeId, keysSorted }: T): { + 'name': string; + 'keysSorted': boolean; + }; +} diff --git a/frontend/node_modules/apache-arrow/visitor/jsontypeassembler.js b/frontend/node_modules/apache-arrow/visitor/jsontypeassembler.js new file mode 100644 index 0000000000000000000000000000000000000000..c5672c8e115bb8be0ecc69b925219d4ed7f89b96 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/jsontypeassembler.js @@ -0,0 +1,87 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const visitor_1 = require("../visitor"); +const enum_1 = require("../enum"); +/** @ignore */ +class JSONTypeAssembler extends visitor_1.Visitor { + visit(node) { + return node == null ? undefined : super.visit(node); + } + visitNull({ typeId }) { + return { 'name': enum_1.ArrowType[typeId].toLowerCase() }; + } + visitInt({ typeId, bitWidth, isSigned }) { + return { 'name': enum_1.ArrowType[typeId].toLowerCase(), 'bitWidth': bitWidth, 'isSigned': isSigned }; + } + visitFloat({ typeId, precision }) { + return { 'name': enum_1.ArrowType[typeId].toLowerCase(), 'precision': enum_1.Precision[precision] }; + } + visitBinary({ typeId }) { + return { 'name': enum_1.ArrowType[typeId].toLowerCase() }; + } + visitBool({ typeId }) { + return { 'name': enum_1.ArrowType[typeId].toLowerCase() }; + } + visitUtf8({ typeId }) { + return { 'name': enum_1.ArrowType[typeId].toLowerCase() }; + } + visitDecimal({ typeId, scale, precision }) { + return { 'name': enum_1.ArrowType[typeId].toLowerCase(), 'scale': scale, 'precision': precision }; + } + visitDate({ typeId, unit }) { + return { 'name': enum_1.ArrowType[typeId].toLowerCase(), 'unit': enum_1.DateUnit[unit] }; + } + visitTime({ typeId, unit, bitWidth }) { + return { 'name': enum_1.ArrowType[typeId].toLowerCase(), 'unit': enum_1.TimeUnit[unit], bitWidth }; + } + visitTimestamp({ typeId, timezone, unit }) { + return { 'name': enum_1.ArrowType[typeId].toLowerCase(), 'unit': enum_1.TimeUnit[unit], timezone }; + } + visitInterval({ typeId, unit }) { + return { 'name': enum_1.ArrowType[typeId].toLowerCase(), 'unit': enum_1.IntervalUnit[unit] }; + } + visitList({ typeId }) { + return { 'name': enum_1.ArrowType[typeId].toLowerCase() }; + } + visitStruct({ typeId }) { + return { 'name': enum_1.ArrowType[typeId].toLowerCase() }; + } + visitUnion({ typeId, mode, typeIds }) { + return { + 'name': enum_1.ArrowType[typeId].toLowerCase(), + 'mode': enum_1.UnionMode[mode], + 'typeIds': [...typeIds] + }; + } + visitDictionary(node) { + return this.visit(node.dictionary); + } + visitFixedSizeBinary({ typeId, byteWidth }) { + return { 'name': enum_1.ArrowType[typeId].toLowerCase(), 'byteWidth': byteWidth }; + } + visitFixedSizeList({ typeId, listSize }) { + return { 'name': enum_1.ArrowType[typeId].toLowerCase(), 'listSize': listSize }; + } + visitMap({ typeId, keysSorted }) { + return { 'name': enum_1.ArrowType[typeId].toLowerCase(), 'keysSorted': keysSorted }; + } +} +exports.JSONTypeAssembler = JSONTypeAssembler; + +//# sourceMappingURL=jsontypeassembler.js.map diff --git a/frontend/node_modules/apache-arrow/visitor/jsontypeassembler.js.map b/frontend/node_modules/apache-arrow/visitor/jsontypeassembler.js.map new file mode 100644 index 0000000000000000000000000000000000000000..e527e35ed5dbd3d4a94c00799d74d06a93f52750 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/jsontypeassembler.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor/jsontypeassembler.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAGrB,wCAAqC;AACrC,kCAA4F;AAO5F,cAAc;AACd,MAAa,iBAAkB,SAAQ,iBAAO;IACnC,KAAK,CAA0B,IAAO;QACzC,OAAO,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACxD,CAAC;IACM,SAAS,CAAsB,EAAE,MAAM,EAAK;QAC/C,OAAO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CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC;IACM,oBAAoB,CAAiC,EAAE,MAAM,EAAE,SAAS,EAAK;QAChF,OAAO,EAAE,MAAM,EAAE,gBAAS,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC;IAC/E,CAAC;IACM,kBAAkB,CAA+B,EAAE,MAAM,EAAE,QAAQ,EAAK;QAC3E,OAAO,EAAE,MAAM,EAAE,gBAAS,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC;IAC7E,CAAC;IACM,QAAQ,CAAsB,EAAE,MAAM,EAAE,UAAU,EAAK;QAC1D,OAAO,EAAE,MAAM,EAAE,gBAAS,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC;IACjF,CAAC;CACJ;AA9DD,8CA8DC","file":"jsontypeassembler.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport * as type from '../type';\nimport { Visitor } from '../visitor';\nimport { ArrowType, Precision, DateUnit, TimeUnit, IntervalUnit, UnionMode } from '../enum';\n\n/** @ignore */\nexport interface JSONTypeAssembler extends Visitor {\n visit(node: T): object | undefined;\n}\n\n/** @ignore */\nexport class JSONTypeAssembler extends Visitor {\n public visit(node: T): object | undefined {\n return node == null ? undefined : super.visit(node);\n }\n public visitNull({ typeId }: T) {\n return { 'name': ArrowType[typeId].toLowerCase() };\n }\n public visitInt({ typeId, bitWidth, isSigned }: T) {\n return { 'name': ArrowType[typeId].toLowerCase(), 'bitWidth': bitWidth, 'isSigned': isSigned };\n }\n public visitFloat({ typeId, precision }: T) {\n return { 'name': ArrowType[typeId].toLowerCase(), 'precision': Precision[precision] };\n }\n public visitBinary({ typeId }: T) {\n return { 'name': ArrowType[typeId].toLowerCase() };\n }\n public visitBool({ typeId }: T) {\n return { 'name': ArrowType[typeId].toLowerCase() };\n }\n public visitUtf8({ typeId }: T) {\n return { 'name': ArrowType[typeId].toLowerCase() };\n }\n public visitDecimal({ typeId, scale, precision }: T) {\n return { 'name': ArrowType[typeId].toLowerCase(), 'scale': scale, 'precision': precision };\n }\n public visitDate({ typeId, unit }: T) {\n return { 'name': ArrowType[typeId].toLowerCase(), 'unit': DateUnit[unit] };\n }\n public visitTime({ typeId, unit, bitWidth }: T) {\n return { 'name': ArrowType[typeId].toLowerCase(), 'unit': TimeUnit[unit], bitWidth };\n }\n public visitTimestamp({ typeId, timezone, unit }: T) {\n return { 'name': ArrowType[typeId].toLowerCase(), 'unit': TimeUnit[unit], timezone };\n }\n public visitInterval({ typeId, unit }: T) {\n return { 'name': ArrowType[typeId].toLowerCase(), 'unit': IntervalUnit[unit] };\n }\n public visitList({ typeId }: T) {\n return { 'name': ArrowType[typeId].toLowerCase() };\n }\n public visitStruct({ typeId }: T) {\n return { 'name': ArrowType[typeId].toLowerCase() };\n }\n public visitUnion({ typeId, mode, typeIds }: T) {\n return {\n 'name': ArrowType[typeId].toLowerCase(),\n 'mode': UnionMode[mode],\n 'typeIds': [...typeIds]\n };\n }\n public visitDictionary(node: T) {\n return this.visit(node.dictionary);\n }\n public visitFixedSizeBinary({ typeId, byteWidth }: T) {\n return { 'name': ArrowType[typeId].toLowerCase(), 'byteWidth': byteWidth };\n }\n public visitFixedSizeList({ typeId, listSize }: T) {\n return { 'name': ArrowType[typeId].toLowerCase(), 'listSize': listSize };\n }\n public visitMap({ typeId, keysSorted }: T) {\n return { 'name': ArrowType[typeId].toLowerCase(), 'keysSorted': keysSorted };\n }\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/jsontypeassembler.mjs b/frontend/node_modules/apache-arrow/visitor/jsontypeassembler.mjs new file mode 100644 index 0000000000000000000000000000000000000000..ec4dbbe3db164bf6163c3e0c958c9076ec02c99c --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/jsontypeassembler.mjs @@ -0,0 +1,84 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { Visitor } from '../visitor'; +import { ArrowType, Precision, DateUnit, TimeUnit, IntervalUnit, UnionMode } from '../enum'; +/** @ignore */ +export class JSONTypeAssembler extends Visitor { + visit(node) { + return node == null ? undefined : super.visit(node); + } + visitNull({ typeId }) { + return { 'name': ArrowType[typeId].toLowerCase() }; + } + visitInt({ typeId, bitWidth, isSigned }) { + return { 'name': ArrowType[typeId].toLowerCase(), 'bitWidth': bitWidth, 'isSigned': isSigned }; + } + visitFloat({ typeId, precision }) { + return { 'name': ArrowType[typeId].toLowerCase(), 'precision': Precision[precision] }; + } + visitBinary({ typeId }) { + return { 'name': ArrowType[typeId].toLowerCase() }; + } + visitBool({ typeId }) { + return { 'name': ArrowType[typeId].toLowerCase() }; + } + visitUtf8({ typeId }) { + return { 'name': ArrowType[typeId].toLowerCase() }; + } + visitDecimal({ typeId, scale, precision }) { + return { 'name': ArrowType[typeId].toLowerCase(), 'scale': scale, 'precision': precision }; + } + visitDate({ typeId, unit }) { + return { 'name': ArrowType[typeId].toLowerCase(), 'unit': DateUnit[unit] }; + } + visitTime({ typeId, unit, bitWidth }) { + return { 'name': ArrowType[typeId].toLowerCase(), 'unit': TimeUnit[unit], bitWidth }; + } + visitTimestamp({ typeId, timezone, unit }) { + return { 'name': ArrowType[typeId].toLowerCase(), 'unit': TimeUnit[unit], timezone }; + } + visitInterval({ typeId, unit }) { + return { 'name': ArrowType[typeId].toLowerCase(), 'unit': IntervalUnit[unit] }; + } + visitList({ typeId }) { + return { 'name': ArrowType[typeId].toLowerCase() }; + } + visitStruct({ typeId }) { + return { 'name': ArrowType[typeId].toLowerCase() }; + } + visitUnion({ typeId, mode, typeIds }) { + return { + 'name': ArrowType[typeId].toLowerCase(), + 'mode': UnionMode[mode], + 'typeIds': [...typeIds] + }; + } + visitDictionary(node) { + return this.visit(node.dictionary); + } + visitFixedSizeBinary({ typeId, byteWidth }) { + return { 'name': ArrowType[typeId].toLowerCase(), 'byteWidth': byteWidth }; + } + visitFixedSizeList({ typeId, listSize }) { + return { 'name': ArrowType[typeId].toLowerCase(), 'listSize': listSize }; + } + visitMap({ typeId, keysSorted }) { + return { 'name': ArrowType[typeId].toLowerCase(), 'keysSorted': keysSorted }; + } +} + +//# sourceMappingURL=jsontypeassembler.mjs.map diff --git a/frontend/node_modules/apache-arrow/visitor/jsontypeassembler.mjs.map b/frontend/node_modules/apache-arrow/visitor/jsontypeassembler.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..d3f88eabb54c1893eab4b59b480c9577fd125575 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/jsontypeassembler.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor/jsontypeassembler.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AA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MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;IACvD,CAAC;IACM,WAAW,CAAwB,EAAE,MAAM,EAAK;QACnD,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;IACvD,CAAC;IACM,UAAU,CAAuB,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAK;QAChE,OAAO;YACH,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE;YACvC,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC;YACvB,SAAS,EAAE,CAAC,GAAG,OAAO,CAAC;SAC1B,CAAC;IACN,CAAC;IACM,eAAe,CAA4B,IAAO;QACrD,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC;IACM,oBAAoB,CAAiC,EAAE,MAAM,EAAE,SAAS,EAAK;QAChF,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC;IAC/E,CAAC;IACM,kBAAkB,CAA+B,EAAE,MAAM,EAAE,QAAQ,EAAK;QAC3E,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC;IAC7E,CAAC;IACM,QAAQ,CAAsB,EAAE,MAAM,EAAE,UAAU,EAAK;QAC1D,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC;IACjF,CAAC;CACJ","file":"jsontypeassembler.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport * as type from '../type';\nimport { Visitor } from '../visitor';\nimport { ArrowType, Precision, DateUnit, TimeUnit, IntervalUnit, UnionMode } from '../enum';\n\n/** @ignore */\nexport interface JSONTypeAssembler extends Visitor {\n visit(node: T): object | undefined;\n}\n\n/** @ignore */\nexport class JSONTypeAssembler extends Visitor {\n public visit(node: T): object | undefined {\n return node == null ? undefined : super.visit(node);\n }\n public visitNull({ typeId }: T) {\n return { 'name': ArrowType[typeId].toLowerCase() };\n }\n public visitInt({ typeId, bitWidth, isSigned }: T) {\n return { 'name': ArrowType[typeId].toLowerCase(), 'bitWidth': bitWidth, 'isSigned': isSigned };\n }\n public visitFloat({ typeId, precision }: T) {\n return { 'name': ArrowType[typeId].toLowerCase(), 'precision': Precision[precision] };\n }\n public visitBinary({ typeId }: T) {\n return { 'name': ArrowType[typeId].toLowerCase() };\n }\n public visitBool({ typeId }: T) {\n return { 'name': ArrowType[typeId].toLowerCase() };\n }\n public visitUtf8({ typeId }: T) {\n return { 'name': ArrowType[typeId].toLowerCase() };\n }\n public visitDecimal({ typeId, scale, precision }: T) {\n return { 'name': ArrowType[typeId].toLowerCase(), 'scale': scale, 'precision': precision };\n }\n public visitDate({ typeId, unit }: T) {\n return { 'name': ArrowType[typeId].toLowerCase(), 'unit': DateUnit[unit] };\n }\n public visitTime({ typeId, unit, bitWidth }: T) {\n return { 'name': ArrowType[typeId].toLowerCase(), 'unit': TimeUnit[unit], bitWidth };\n }\n public visitTimestamp({ typeId, timezone, unit }: T) {\n return { 'name': ArrowType[typeId].toLowerCase(), 'unit': TimeUnit[unit], timezone };\n }\n public visitInterval({ typeId, unit }: T) {\n return { 'name': ArrowType[typeId].toLowerCase(), 'unit': IntervalUnit[unit] };\n }\n public visitList({ typeId }: T) {\n return { 'name': ArrowType[typeId].toLowerCase() };\n }\n public visitStruct({ typeId }: T) {\n return { 'name': ArrowType[typeId].toLowerCase() };\n }\n public visitUnion({ typeId, mode, typeIds }: T) {\n return {\n 'name': ArrowType[typeId].toLowerCase(),\n 'mode': UnionMode[mode],\n 'typeIds': [...typeIds]\n };\n }\n public visitDictionary(node: T) {\n return this.visit(node.dictionary);\n }\n public visitFixedSizeBinary({ typeId, byteWidth }: T) {\n return { 'name': ArrowType[typeId].toLowerCase(), 'byteWidth': byteWidth };\n }\n public visitFixedSizeList({ typeId, listSize }: T) {\n return { 'name': ArrowType[typeId].toLowerCase(), 'listSize': listSize };\n }\n public visitMap({ typeId, keysSorted }: T) {\n return { 'name': ArrowType[typeId].toLowerCase(), 'keysSorted': keysSorted };\n }\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/jsonvectorassembler.d.ts b/frontend/node_modules/apache-arrow/visitor/jsonvectorassembler.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3b8551982a54c1bc36380df8b041be2482189acf --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/jsonvectorassembler.d.ts @@ -0,0 +1,77 @@ +import { Column } from '../column'; +import { Visitor } from '../visitor'; +import { RecordBatch } from '../recordbatch'; +import { VectorType as V } from '../interfaces'; +import { DataType, Float, Int, Date_, Interval, Time, Timestamp, Union, Bool, Null, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct } from '../type'; +/** @ignore */ +export interface JSONVectorAssembler extends Visitor { + visit(node: T): object; + visitMany(cols: T[]): object[]; + getVisitFn(node: Column): (column: Column) => { + name: string; + count: number; + VALIDITY: (0 | 1)[]; + DATA?: any[]; + OFFSET?: number[]; + TYPE?: number[]; + children?: any[]; + }; + visitNull(vector: V): {}; + visitBool(vector: V): { + DATA: boolean[]; + }; + visitInt(vector: V): { + DATA: (number | string)[]; + }; + visitFloat(vector: V): { + DATA: number[]; + }; + visitUtf8(vector: V): { + DATA: string[]; + OFFSET: number[]; + }; + visitBinary(vector: V): { + DATA: string[]; + OFFSET: number[]; + }; + visitFixedSizeBinary(vector: V): { + DATA: string[]; + }; + visitDate(vector: V): { + DATA: number[]; + }; + visitTimestamp(vector: V): { + DATA: string[]; + }; + visitTime(vector: V): { + DATA: number[]; + }; + visitDecimal(vector: V): { + DATA: string[]; + }; + visitList(vector: V): { + children: any[]; + OFFSET: number[]; + }; + visitStruct(vector: V): { + children: any[]; + }; + visitUnion(vector: V): { + children: any[]; + TYPE: number[]; + }; + visitInterval(vector: V): { + DATA: number[]; + }; + visitFixedSizeList(vector: V): { + children: any[]; + }; + visitMap(vector: V): { + children: any[]; + }; +} +/** @ignore */ +export declare class JSONVectorAssembler extends Visitor { + /** @nocollapse */ + static assemble(...args: (T | T[])[]): object[]; +} diff --git a/frontend/node_modules/apache-arrow/visitor/jsonvectorassembler.js b/frontend/node_modules/apache-arrow/visitor/jsonvectorassembler.js new file mode 100644 index 0000000000000000000000000000000000000000..599b81631e482c433856768d0710e4617d0d2111 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/jsonvectorassembler.js @@ -0,0 +1,141 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const bn_1 = require("../util/bn"); +const column_1 = require("../column"); +const vector_1 = require("../vector"); +const visitor_1 = require("../visitor"); +const enum_1 = require("../enum"); +const recordbatch_1 = require("../recordbatch"); +const enum_2 = require("../enum"); +const bit_1 = require("../util/bit"); +const args_1 = require("../util/args"); +const type_1 = require("../type"); +/** @ignore */ +class JSONVectorAssembler extends visitor_1.Visitor { + /** @nocollapse */ + static assemble(...args) { + return new JSONVectorAssembler().visitMany(args_1.selectColumnChildrenArgs(recordbatch_1.RecordBatch, args)); + } + visit(column) { + const { data, name, length } = column; + const { offset, nullCount, nullBitmap } = data; + const type = type_1.DataType.isDictionary(column.type) ? column.type.indices : column.type; + const buffers = Object.assign([], data.buffers, { [enum_1.BufferType.VALIDITY]: undefined }); + return { + 'name': name, + 'count': length, + 'VALIDITY': type_1.DataType.isNull(type) ? undefined + : nullCount <= 0 ? Array.from({ length }, () => 1) + : [...bit_1.iterateBits(nullBitmap, offset, length, null, bit_1.getBit)], + ...super.visit(vector_1.Vector.new(data.clone(type, offset, length, 0, buffers))) + }; + } + visitNull() { return {}; } + visitBool({ values, offset, length }) { + return { 'DATA': [...bit_1.iterateBits(values, offset, length, null, bit_1.getBool)] }; + } + visitInt(vector) { + return { + 'DATA': vector.type.bitWidth < 64 + ? [...vector.values] + : [...bigNumsToStrings(vector.values, 2)] + }; + } + visitFloat(vector) { + return { 'DATA': [...vector.values] }; + } + visitUtf8(vector) { + return { 'DATA': [...vector], 'OFFSET': [...vector.valueOffsets] }; + } + visitBinary(vector) { + return { 'DATA': [...binaryToString(vector)], OFFSET: [...vector.valueOffsets] }; + } + visitFixedSizeBinary(vector) { + return { 'DATA': [...binaryToString(vector)] }; + } + visitDate(vector) { + return { + 'DATA': vector.type.unit === enum_2.DateUnit.DAY + ? [...vector.values] + : [...bigNumsToStrings(vector.values, 2)] + }; + } + visitTimestamp(vector) { + return { 'DATA': [...bigNumsToStrings(vector.values, 2)] }; + } + visitTime(vector) { + return { + 'DATA': vector.type.unit < enum_2.TimeUnit.MICROSECOND + ? [...vector.values] + : [...bigNumsToStrings(vector.values, 2)] + }; + } + visitDecimal(vector) { + return { 'DATA': [...bigNumsToStrings(vector.values, 4)] }; + } + visitList(vector) { + return { + 'OFFSET': [...vector.valueOffsets], + 'children': vector.type.children.map((f, i) => this.visit(new column_1.Column(f, [vector.getChildAt(i)]))) + }; + } + visitStruct(vector) { + return { + 'children': vector.type.children.map((f, i) => this.visit(new column_1.Column(f, [vector.getChildAt(i)]))) + }; + } + visitUnion(vector) { + return { + 'TYPE': [...vector.typeIds], + 'OFFSET': vector.type.mode === enum_2.UnionMode.Dense ? [...vector.valueOffsets] : undefined, + 'children': vector.type.children.map((f, i) => this.visit(new column_1.Column(f, [vector.getChildAt(i)]))) + }; + } + visitInterval(vector) { + return { 'DATA': [...vector.values] }; + } + visitFixedSizeList(vector) { + return { + 'children': vector.type.children.map((f, i) => this.visit(new column_1.Column(f, [vector.getChildAt(i)]))) + }; + } + visitMap(vector) { + return { + 'OFFSET': [...vector.valueOffsets], + 'children': vector.type.children.map((f, i) => this.visit(new column_1.Column(f, [vector.getChildAt(i)]))) + }; + } +} +exports.JSONVectorAssembler = JSONVectorAssembler; +/** @ignore */ +function* binaryToString(vector) { + for (const octets of vector) { + yield octets.reduce((str, byte) => { + return `${str}${('0' + (byte & 0xFF).toString(16)).slice(-2)}`; + }, '').toUpperCase(); + } +} +/** @ignore */ +function* bigNumsToStrings(values, stride) { + for (let i = -1, n = values.length / stride; ++i < n;) { + yield `${bn_1.BN.new(values.subarray((i + 0) * stride, (i + 1) * stride), false)}`; + } +} + +//# sourceMappingURL=jsonvectorassembler.js.map diff --git a/frontend/node_modules/apache-arrow/visitor/jsonvectorassembler.js.map b/frontend/node_modules/apache-arrow/visitor/jsonvectorassembler.js.map new file mode 100644 index 0000000000000000000000000000000000000000..57604754bd6db1fae9751a53f7a8f568d22d0005 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/jsonvectorassembler.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor/jsonvectorassembler.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DA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C,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC;KACjF;AACL,CAAC","file":"jsonvectorassembler.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { BN } from '../util/bn';\nimport { Column } from '../column';\nimport { Vector } from '../vector';\nimport { Visitor } from '../visitor';\nimport { BufferType } from '../enum';\nimport { RecordBatch } from '../recordbatch';\nimport { VectorType as V } from '../interfaces';\nimport { UnionMode, DateUnit, TimeUnit } from '../enum';\nimport { iterateBits, getBit, getBool } from '../util/bit';\nimport { selectColumnChildrenArgs } from '../util/args';\nimport {\n DataType,\n Float, Int, Date_, Interval, Time, Timestamp, Union,\n Bool, Null, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct,\n} from '../type';\n\n/** @ignore */\nexport interface JSONVectorAssembler extends Visitor {\n\n visit (node: T ): object;\n visitMany (cols: T[]): object[];\n getVisitFn(node: Column): (column: Column) => { name: string, count: number, VALIDITY: (0 | 1)[], DATA?: any[], OFFSET?: number[], TYPE?: number[], children?: any[] };\n\n visitNull (vector: V): { };\n visitBool (vector: V): { DATA: boolean[] };\n visitInt (vector: V): { DATA: (number | string)[] };\n visitFloat (vector: V): { DATA: number[] };\n visitUtf8 (vector: V): { DATA: string[], OFFSET: number[] };\n visitBinary (vector: V): { DATA: string[], OFFSET: number[] };\n visitFixedSizeBinary (vector: V): { DATA: string[] };\n visitDate (vector: V): { DATA: number[] };\n visitTimestamp (vector: V): { DATA: string[] };\n visitTime (vector: V): { DATA: number[] };\n visitDecimal (vector: V): { DATA: string[] };\n visitList (vector: V): { children: any[], OFFSET: number[] };\n visitStruct (vector: V): { children: any[] };\n visitUnion (vector: V): { children: any[], TYPE: number[], };\n visitInterval (vector: V): { DATA: number[] };\n visitFixedSizeList (vector: V): { children: any[] };\n visitMap (vector: V): { children: any[] };\n}\n\n/** @ignore */\nexport class JSONVectorAssembler extends Visitor {\n\n /** @nocollapse */\n public static assemble(...args: (T | T[])[]) {\n return new JSONVectorAssembler().visitMany(selectColumnChildrenArgs(RecordBatch, args));\n }\n\n public visit(column: T) {\n const { data, name, length } = column;\n const { offset, nullCount, nullBitmap } = data;\n const type = DataType.isDictionary(column.type) ? column.type.indices : column.type;\n const buffers = Object.assign([], data.buffers, { [BufferType.VALIDITY]: undefined });\n return {\n 'name': name,\n 'count': length,\n 'VALIDITY': DataType.isNull(type) ? undefined\n : nullCount <= 0 ? Array.from({ length }, () => 1)\n : [...iterateBits(nullBitmap, offset, length, null, getBit)],\n ...super.visit(Vector.new(data.clone(type, offset, length, 0, buffers)))\n };\n }\n public visitNull() { return {}; }\n public visitBool({ values, offset, length }: V) {\n return { 'DATA': [...iterateBits(values, offset, length, null, getBool)] };\n }\n public visitInt(vector: V) {\n return {\n 'DATA': vector.type.bitWidth < 64\n ? [...vector.values]\n : [...bigNumsToStrings(vector.values as (Int32Array | Uint32Array), 2)]\n };\n }\n public visitFloat(vector: V) {\n return { 'DATA': [...vector.values] };\n }\n public visitUtf8(vector: V) {\n return { 'DATA': [...vector], 'OFFSET': [...vector.valueOffsets] };\n }\n public visitBinary(vector: V) {\n return { 'DATA': [...binaryToString(vector)], OFFSET: [...vector.valueOffsets] };\n }\n public visitFixedSizeBinary(vector: V) {\n return { 'DATA': [...binaryToString(vector)] };\n }\n public visitDate(vector: V) {\n return {\n 'DATA': vector.type.unit === DateUnit.DAY\n ? [...vector.values]\n : [...bigNumsToStrings(vector.values, 2)]\n };\n }\n public visitTimestamp(vector: V) {\n return { 'DATA': [...bigNumsToStrings(vector.values, 2)] };\n }\n public visitTime(vector: V) {\n return {\n 'DATA': vector.type.unit < TimeUnit.MICROSECOND\n ? [...vector.values]\n : [...bigNumsToStrings(vector.values, 2)]\n };\n }\n public visitDecimal(vector: V) {\n return { 'DATA': [...bigNumsToStrings(vector.values, 4)] };\n }\n public visitList(vector: V) {\n return {\n 'OFFSET': [...vector.valueOffsets],\n 'children': vector.type.children.map((f, i) =>\n this.visit(new Column(f, [vector.getChildAt(i)!])))\n };\n }\n public visitStruct(vector: V) {\n return {\n 'children': vector.type.children.map((f, i) =>\n this.visit(new Column(f, [vector.getChildAt(i)!])))\n };\n }\n public visitUnion(vector: V) {\n return {\n 'TYPE': [...vector.typeIds],\n 'OFFSET': vector.type.mode === UnionMode.Dense ? [...vector.valueOffsets] : undefined,\n 'children': vector.type.children.map((f, i) => this.visit(new Column(f, [vector.getChildAt(i)!])))\n };\n }\n public visitInterval(vector: V) {\n return { 'DATA': [...vector.values] };\n }\n public visitFixedSizeList(vector: V) {\n return {\n 'children': vector.type.children.map((f, i) =>\n this.visit(new Column(f, [vector.getChildAt(i)!])))\n };\n }\n public visitMap(vector: V) {\n return {\n 'OFFSET': [...vector.valueOffsets],\n 'children': vector.type.children.map((f, i) =>\n this.visit(new Column(f, [vector.getChildAt(i)!])))\n };\n }\n}\n\n/** @ignore */\nfunction* binaryToString(vector: Vector | Vector) {\n for (const octets of vector as Iterable) {\n yield octets.reduce((str, byte) => {\n return `${str}${('0' + (byte & 0xFF).toString(16)).slice(-2)}`;\n }, '').toUpperCase();\n }\n}\n\n/** @ignore */\nfunction* bigNumsToStrings(values: Uint32Array | Int32Array, stride: number) {\n for (let i = -1, n = values.length / stride; ++i < n;) {\n yield `${BN.new(values.subarray((i + 0) * stride, (i + 1) * stride), false)}`;\n }\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/jsonvectorassembler.mjs b/frontend/node_modules/apache-arrow/visitor/jsonvectorassembler.mjs new file mode 100644 index 0000000000000000000000000000000000000000..8cfeb1d449f67af215e23ea4bcdf6a2d6b41fdcb --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/jsonvectorassembler.mjs @@ -0,0 +1,138 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { BN } from '../util/bn'; +import { Column } from '../column'; +import { Vector } from '../vector'; +import { Visitor } from '../visitor'; +import { BufferType } from '../enum'; +import { RecordBatch } from '../recordbatch'; +import { UnionMode, DateUnit, TimeUnit } from '../enum'; +import { iterateBits, getBit, getBool } from '../util/bit'; +import { selectColumnChildrenArgs } from '../util/args'; +import { DataType, } from '../type'; +/** @ignore */ +export class JSONVectorAssembler extends Visitor { + /** @nocollapse */ + static assemble(...args) { + return new JSONVectorAssembler().visitMany(selectColumnChildrenArgs(RecordBatch, args)); + } + visit(column) { + const { data, name, length } = column; + const { offset, nullCount, nullBitmap } = data; + const type = DataType.isDictionary(column.type) ? column.type.indices : column.type; + const buffers = Object.assign([], data.buffers, { [BufferType.VALIDITY]: undefined }); + return { + 'name': name, + 'count': length, + 'VALIDITY': DataType.isNull(type) ? undefined + : nullCount <= 0 ? Array.from({ length }, () => 1) + : [...iterateBits(nullBitmap, offset, length, null, getBit)], + ...super.visit(Vector.new(data.clone(type, offset, length, 0, buffers))) + }; + } + visitNull() { return {}; } + visitBool({ values, offset, length }) { + return { 'DATA': [...iterateBits(values, offset, length, null, getBool)] }; + } + visitInt(vector) { + return { + 'DATA': vector.type.bitWidth < 64 + ? [...vector.values] + : [...bigNumsToStrings(vector.values, 2)] + }; + } + visitFloat(vector) { + return { 'DATA': [...vector.values] }; + } + visitUtf8(vector) { + return { 'DATA': [...vector], 'OFFSET': [...vector.valueOffsets] }; + } + visitBinary(vector) { + return { 'DATA': [...binaryToString(vector)], OFFSET: [...vector.valueOffsets] }; + } + visitFixedSizeBinary(vector) { + return { 'DATA': [...binaryToString(vector)] }; + } + visitDate(vector) { + return { + 'DATA': vector.type.unit === DateUnit.DAY + ? [...vector.values] + : [...bigNumsToStrings(vector.values, 2)] + }; + } + visitTimestamp(vector) { + return { 'DATA': [...bigNumsToStrings(vector.values, 2)] }; + } + visitTime(vector) { + return { + 'DATA': vector.type.unit < TimeUnit.MICROSECOND + ? [...vector.values] + : [...bigNumsToStrings(vector.values, 2)] + }; + } + visitDecimal(vector) { + return { 'DATA': [...bigNumsToStrings(vector.values, 4)] }; + } + visitList(vector) { + return { + 'OFFSET': [...vector.valueOffsets], + 'children': vector.type.children.map((f, i) => this.visit(new Column(f, [vector.getChildAt(i)]))) + }; + } + visitStruct(vector) { + return { + 'children': vector.type.children.map((f, i) => this.visit(new Column(f, [vector.getChildAt(i)]))) + }; + } + visitUnion(vector) { + return { + 'TYPE': [...vector.typeIds], + 'OFFSET': vector.type.mode === UnionMode.Dense ? [...vector.valueOffsets] : undefined, + 'children': vector.type.children.map((f, i) => this.visit(new Column(f, [vector.getChildAt(i)]))) + }; + } + visitInterval(vector) { + return { 'DATA': [...vector.values] }; + } + visitFixedSizeList(vector) { + return { + 'children': vector.type.children.map((f, i) => this.visit(new Column(f, [vector.getChildAt(i)]))) + }; + } + visitMap(vector) { + return { + 'OFFSET': [...vector.valueOffsets], + 'children': vector.type.children.map((f, i) => this.visit(new Column(f, [vector.getChildAt(i)]))) + }; + } +} +/** @ignore */ +function* binaryToString(vector) { + for (const octets of vector) { + yield octets.reduce((str, byte) => { + return `${str}${('0' + (byte & 0xFF).toString(16)).slice(-2)}`; + }, '').toUpperCase(); + } +} +/** @ignore */ +function* bigNumsToStrings(values, stride) { + for (let i = -1, n = values.length / stride; ++i < n;) { + yield `${BN.new(values.subarray((i + 0) * stride, (i + 1) * stride), false)}`; + } +} + +//# sourceMappingURL=jsonvectorassembler.mjs.map diff --git a/frontend/node_modules/apache-arrow/visitor/jsonvectorassembler.mjs.map b/frontend/node_modules/apache-arrow/visitor/jsonvectorassembler.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..389700b5f103a894abe49c251008b9d76465184b --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/jsonvectorassembler.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor/jsonvectorassembler.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;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AC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAC1C,IAAI,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC,CAAC;SAC1D,CAAC;IACN,CAAC;CACJ;AAED,cAAc;AACd,QAAQ,CAAC,CAAC,cAAc,CAAC,MAAgD;IACrE,KAAK,MAAM,MAAM,IAAI,MAA8B,EAAE;QACjD,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YAC9B,OAAO,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACnE,CAAC,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;KACxB;AACL,CAAC;AAED,cAAc;AACd,QAAQ,CAAC,CAAC,gBAAgB,CAAC,MAAgC,EAAE,MAAc;IACvE,KAAK,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG;QACnD,MAAM,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC;KACjF;AACL,CAAC","file":"jsonvectorassembler.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { BN } from '../util/bn';\nimport { Column } from '../column';\nimport { Vector } from '../vector';\nimport { Visitor } from '../visitor';\nimport { BufferType } from '../enum';\nimport { RecordBatch } from '../recordbatch';\nimport { VectorType as V } from '../interfaces';\nimport { UnionMode, DateUnit, TimeUnit } from '../enum';\nimport { iterateBits, getBit, getBool } from '../util/bit';\nimport { selectColumnChildrenArgs } from '../util/args';\nimport {\n DataType,\n Float, Int, Date_, Interval, Time, Timestamp, Union,\n Bool, Null, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct,\n} from '../type';\n\n/** @ignore */\nexport interface JSONVectorAssembler extends Visitor {\n\n visit (node: T ): object;\n visitMany (cols: T[]): object[];\n getVisitFn(node: Column): (column: Column) => { name: string, count: number, VALIDITY: (0 | 1)[], DATA?: any[], OFFSET?: number[], TYPE?: number[], children?: any[] };\n\n visitNull (vector: V): { };\n visitBool (vector: V): { DATA: boolean[] };\n visitInt (vector: V): { DATA: (number | string)[] };\n visitFloat (vector: V): { DATA: number[] };\n visitUtf8 (vector: V): { DATA: string[], OFFSET: number[] };\n visitBinary (vector: V): { DATA: string[], OFFSET: number[] };\n visitFixedSizeBinary (vector: V): { DATA: string[] };\n visitDate (vector: V): { DATA: number[] };\n visitTimestamp (vector: V): { DATA: string[] };\n visitTime (vector: V): { DATA: number[] };\n visitDecimal (vector: V): { DATA: string[] };\n visitList (vector: V): { children: any[], OFFSET: number[] };\n visitStruct (vector: V): { children: any[] };\n visitUnion (vector: V): { children: any[], TYPE: number[], };\n visitInterval (vector: V): { DATA: number[] };\n visitFixedSizeList (vector: V): { children: any[] };\n visitMap (vector: V): { children: any[] };\n}\n\n/** @ignore */\nexport class JSONVectorAssembler extends Visitor {\n\n /** @nocollapse */\n public static assemble(...args: (T | T[])[]) {\n return new JSONVectorAssembler().visitMany(selectColumnChildrenArgs(RecordBatch, args));\n }\n\n public visit(column: T) {\n const { data, name, length } = column;\n const { offset, nullCount, nullBitmap } = data;\n const type = DataType.isDictionary(column.type) ? column.type.indices : column.type;\n const buffers = Object.assign([], data.buffers, { [BufferType.VALIDITY]: undefined });\n return {\n 'name': name,\n 'count': length,\n 'VALIDITY': DataType.isNull(type) ? undefined\n : nullCount <= 0 ? Array.from({ length }, () => 1)\n : [...iterateBits(nullBitmap, offset, length, null, getBit)],\n ...super.visit(Vector.new(data.clone(type, offset, length, 0, buffers)))\n };\n }\n public visitNull() { return {}; }\n public visitBool({ values, offset, length }: V) {\n return { 'DATA': [...iterateBits(values, offset, length, null, getBool)] };\n }\n public visitInt(vector: V) {\n return {\n 'DATA': vector.type.bitWidth < 64\n ? [...vector.values]\n : [...bigNumsToStrings(vector.values as (Int32Array | Uint32Array), 2)]\n };\n }\n public visitFloat(vector: V) {\n return { 'DATA': [...vector.values] };\n }\n public visitUtf8(vector: V) {\n return { 'DATA': [...vector], 'OFFSET': [...vector.valueOffsets] };\n }\n public visitBinary(vector: V) {\n return { 'DATA': [...binaryToString(vector)], OFFSET: [...vector.valueOffsets] };\n }\n public visitFixedSizeBinary(vector: V) {\n return { 'DATA': [...binaryToString(vector)] };\n }\n public visitDate(vector: V) {\n return {\n 'DATA': vector.type.unit === DateUnit.DAY\n ? [...vector.values]\n : [...bigNumsToStrings(vector.values, 2)]\n };\n }\n public visitTimestamp(vector: V) {\n return { 'DATA': [...bigNumsToStrings(vector.values, 2)] };\n }\n public visitTime(vector: V) {\n return {\n 'DATA': vector.type.unit < TimeUnit.MICROSECOND\n ? [...vector.values]\n : [...bigNumsToStrings(vector.values, 2)]\n };\n }\n public visitDecimal(vector: V) {\n return { 'DATA': [...bigNumsToStrings(vector.values, 4)] };\n }\n public visitList(vector: V) {\n return {\n 'OFFSET': [...vector.valueOffsets],\n 'children': vector.type.children.map((f, i) =>\n this.visit(new Column(f, [vector.getChildAt(i)!])))\n };\n }\n public visitStruct(vector: V) {\n return {\n 'children': vector.type.children.map((f, i) =>\n this.visit(new Column(f, [vector.getChildAt(i)!])))\n };\n }\n public visitUnion(vector: V) {\n return {\n 'TYPE': [...vector.typeIds],\n 'OFFSET': vector.type.mode === UnionMode.Dense ? [...vector.valueOffsets] : undefined,\n 'children': vector.type.children.map((f, i) => this.visit(new Column(f, [vector.getChildAt(i)!])))\n };\n }\n public visitInterval(vector: V) {\n return { 'DATA': [...vector.values] };\n }\n public visitFixedSizeList(vector: V) {\n return {\n 'children': vector.type.children.map((f, i) =>\n this.visit(new Column(f, [vector.getChildAt(i)!])))\n };\n }\n public visitMap(vector: V) {\n return {\n 'OFFSET': [...vector.valueOffsets],\n 'children': vector.type.children.map((f, i) =>\n this.visit(new Column(f, [vector.getChildAt(i)!])))\n };\n }\n}\n\n/** @ignore */\nfunction* binaryToString(vector: Vector | Vector) {\n for (const octets of vector as Iterable) {\n yield octets.reduce((str, byte) => {\n return `${str}${('0' + (byte & 0xFF).toString(16)).slice(-2)}`;\n }, '').toUpperCase();\n }\n}\n\n/** @ignore */\nfunction* bigNumsToStrings(values: Uint32Array | Int32Array, stride: number) {\n for (let i = -1, n = values.length / stride; ++i < n;) {\n yield `${BN.new(values.subarray((i + 0) * stride, (i + 1) * stride), false)}`;\n }\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/set.d.ts b/frontend/node_modules/apache-arrow/visitor/set.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0c171a7d095ddc4aef81967bdac923b650bc9bfc --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/set.d.ts @@ -0,0 +1,60 @@ +import { Data } from '../data'; +import { Visitor } from '../visitor'; +import { VectorType } from '../interfaces'; +import { Type } from '../enum'; +import { DataType, Dictionary, Bool, Null, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct, Float, Float16, Float32, Float64, Int, Uint8, Uint16, Uint32, Uint64, Int8, Int16, Int32, Int64, Date_, DateDay, DateMillisecond, Interval, IntervalDayTime, IntervalYearMonth, Time, TimeSecond, TimeMillisecond, TimeMicrosecond, TimeNanosecond, Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond, Union, DenseUnion, SparseUnion } from '../type'; +/** @ignore */ +export interface SetVisitor extends Visitor { + visit(node: T, index: number, value: T['TValue']): void; + visitMany(nodes: T[], indices: number[], values: T['TValue'][]): void[]; + getVisitFn(node: T): (vector: VectorType, index: number, value: VectorType['TValue']) => void; + getVisitFn(node: VectorType | Data | T): (vector: VectorType, index: number, value: VectorType['TValue']) => void; + visitNull(vector: VectorType, index: number, value: T['TValue']): void; + visitBool(vector: VectorType, index: number, value: T['TValue']): void; + visitInt(vector: VectorType, index: number, value: T['TValue']): void; + visitInt8(vector: VectorType, index: number, value: T['TValue']): void; + visitInt16(vector: VectorType, index: number, value: T['TValue']): void; + visitInt32(vector: VectorType, index: number, value: T['TValue']): void; + visitInt64(vector: VectorType, index: number, value: T['TValue']): void; + visitUint8(vector: VectorType, index: number, value: T['TValue']): void; + visitUint16(vector: VectorType, index: number, value: T['TValue']): void; + visitUint32(vector: VectorType, index: number, value: T['TValue']): void; + visitUint64(vector: VectorType, index: number, value: T['TValue']): void; + visitFloat(vector: VectorType, index: number, value: T['TValue']): void; + visitFloat16(vector: VectorType, index: number, value: T['TValue']): void; + visitFloat32(vector: VectorType, index: number, value: T['TValue']): void; + visitFloat64(vector: VectorType, index: number, value: T['TValue']): void; + visitUtf8(vector: VectorType, index: number, value: T['TValue']): void; + visitBinary(vector: VectorType, index: number, value: T['TValue']): void; + visitFixedSizeBinary(vector: VectorType, index: number, value: T['TValue']): void; + visitDate(vector: VectorType, index: number, value: T['TValue']): void; + visitDateDay(vector: VectorType, index: number, value: T['TValue']): void; + visitDateMillisecond(vector: VectorType, index: number, value: T['TValue']): void; + visitTimestamp(vector: VectorType, index: number, value: T['TValue']): void; + visitTimestampSecond(vector: VectorType, index: number, value: T['TValue']): void; + visitTimestampMillisecond(vector: VectorType, index: number, value: T['TValue']): void; + visitTimestampMicrosecond(vector: VectorType, index: number, value: T['TValue']): void; + visitTimestampNanosecond(vector: VectorType, index: number, value: T['TValue']): void; + visitTime(vector: VectorType, index: number, value: T['TValue']): void; + visitTimeSecond(vector: VectorType, index: number, value: T['TValue']): void; + visitTimeMillisecond(vector: VectorType, index: number, value: T['TValue']): void; + visitTimeMicrosecond(vector: VectorType, index: number, value: T['TValue']): void; + visitTimeNanosecond(vector: VectorType, index: number, value: T['TValue']): void; + visitDecimal(vector: VectorType, index: number, value: T['TValue']): void; + visitList(vector: VectorType, index: number, value: T['TValue']): void; + visitStruct(vector: VectorType, index: number, value: T['TValue']): void; + visitUnion(vector: VectorType, index: number, value: T['TValue']): void; + visitDenseUnion(vector: VectorType, index: number, value: T['TValue']): void; + visitSparseUnion(vector: VectorType, index: number, value: T['TValue']): void; + visitDictionary(vector: VectorType, index: number, value: T['TValue']): void; + visitInterval(vector: VectorType, index: number, value: T['TValue']): void; + visitIntervalDayTime(vector: VectorType, index: number, value: T['TValue']): void; + visitIntervalYearMonth(vector: VectorType, index: number, value: T['TValue']): void; + visitFixedSizeList(vector: VectorType, index: number, value: T['TValue']): void; + visitMap(vector: VectorType, index: number, value: T['TValue']): void; +} +/** @ignore */ +export declare class SetVisitor extends Visitor { +} +/** @ignore */ +export declare const instance: SetVisitor; diff --git a/frontend/node_modules/apache-arrow/visitor/set.js b/frontend/node_modules/apache-arrow/visitor/set.js new file mode 100644 index 0000000000000000000000000000000000000000..416b62e8b8836efe35f13df2b0472af40ce2ae78 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/set.js @@ -0,0 +1,265 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const vector_1 = require("../vector"); +const visitor_1 = require("../visitor"); +const utf8_1 = require("../util/utf8"); +const math_1 = require("../util/math"); +const buffer_1 = require("../util/buffer"); +const enum_1 = require("../enum"); +/** @ignore */ +class SetVisitor extends visitor_1.Visitor { +} +exports.SetVisitor = SetVisitor; +/** @ignore */ +const setEpochMsToDays = (data, index, epochMs) => { data[index] = (epochMs / 86400000) | 0; }; +/** @ignore */ +const setEpochMsToMillisecondsLong = (data, index, epochMs) => { + data[index] = (epochMs % 4294967296) | 0; + data[index + 1] = (epochMs / 4294967296) | 0; +}; +/** @ignore */ +const setEpochMsToMicrosecondsLong = (data, index, epochMs) => { + data[index] = ((epochMs * 1000) % 4294967296) | 0; + data[index + 1] = ((epochMs * 1000) / 4294967296) | 0; +}; +/** @ignore */ +const setEpochMsToNanosecondsLong = (data, index, epochMs) => { + data[index] = ((epochMs * 1000000) % 4294967296) | 0; + data[index + 1] = ((epochMs * 1000000) / 4294967296) | 0; +}; +/** @ignore */ +const setVariableWidthBytes = (values, valueOffsets, index, value) => { + const { [index]: x, [index + 1]: y } = valueOffsets; + if (x != null && y != null) { + values.set(value.subarray(0, y - x), x); + } +}; +/** @ignore */ +const setBool = ({ offset, values }, index, val) => { + const idx = offset + index; + val ? (values[idx >> 3] |= (1 << (idx % 8))) // true + : (values[idx >> 3] &= ~(1 << (idx % 8))); // false +}; +/** @ignore */ +const setDateDay = ({ values }, index, value) => { setEpochMsToDays(values, index, value.valueOf()); }; +/** @ignore */ +const setDateMillisecond = ({ values }, index, value) => { setEpochMsToMillisecondsLong(values, index * 2, value.valueOf()); }; +/** @ignore */ +const setNumeric = ({ stride, values }, index, value) => { values[stride * index] = value; }; +/** @ignore */ +const setFloat16 = ({ stride, values }, index, value) => { values[stride * index] = math_1.float64ToUint16(value); }; +/** @ignore */ +const setNumericX2 = (vector, index, value) => { + switch (typeof value) { + case 'bigint': + vector.values64[index] = value; + break; + case 'number': + vector.values[index * vector.stride] = value; + break; + default: + const val = value; + const { stride, ArrayType } = vector; + const long = buffer_1.toArrayBufferView(ArrayType, val); + vector.values.set(long.subarray(0, stride), stride * index); + } +}; +/** @ignore */ +const setFixedSizeBinary = ({ stride, values }, index, value) => { values.set(value.subarray(0, stride), stride * index); }; +/** @ignore */ +const setBinary = ({ values, valueOffsets }, index, value) => setVariableWidthBytes(values, valueOffsets, index, value); +/** @ignore */ +const setUtf8 = ({ values, valueOffsets }, index, value) => { + setVariableWidthBytes(values, valueOffsets, index, utf8_1.encodeUtf8(value)); +}; +/* istanbul ignore next */ +/** @ignore */ +const setInt = (vector, index, value) => { + vector.type.bitWidth < 64 + ? setNumeric(vector, index, value) + : setNumericX2(vector, index, value); +}; +/* istanbul ignore next */ +/** @ignore */ +const setFloat = (vector, index, value) => { + vector.type.precision !== enum_1.Precision.HALF + ? setNumeric(vector, index, value) + : setFloat16(vector, index, value); +}; +/* istanbul ignore next */ +const setDate = (vector, index, value) => { + vector.type.unit === enum_1.DateUnit.DAY + ? setDateDay(vector, index, value) + : setDateMillisecond(vector, index, value); +}; +/** @ignore */ +const setTimestampSecond = ({ values }, index, value) => setEpochMsToMillisecondsLong(values, index * 2, value / 1000); +/** @ignore */ +const setTimestampMillisecond = ({ values }, index, value) => setEpochMsToMillisecondsLong(values, index * 2, value); +/** @ignore */ +const setTimestampMicrosecond = ({ values }, index, value) => setEpochMsToMicrosecondsLong(values, index * 2, value); +/** @ignore */ +const setTimestampNanosecond = ({ values }, index, value) => setEpochMsToNanosecondsLong(values, index * 2, value); +/* istanbul ignore next */ +/** @ignore */ +const setTimestamp = (vector, index, value) => { + switch (vector.type.unit) { + case enum_1.TimeUnit.SECOND: return setTimestampSecond(vector, index, value); + case enum_1.TimeUnit.MILLISECOND: return setTimestampMillisecond(vector, index, value); + case enum_1.TimeUnit.MICROSECOND: return setTimestampMicrosecond(vector, index, value); + case enum_1.TimeUnit.NANOSECOND: return setTimestampNanosecond(vector, index, value); + } +}; +/** @ignore */ +const setTimeSecond = ({ values, stride }, index, value) => { values[stride * index] = value; }; +/** @ignore */ +const setTimeMillisecond = ({ values, stride }, index, value) => { values[stride * index] = value; }; +/** @ignore */ +const setTimeMicrosecond = ({ values }, index, value) => { values.set(value.subarray(0, 2), 2 * index); }; +/** @ignore */ +const setTimeNanosecond = ({ values }, index, value) => { values.set(value.subarray(0, 2), 2 * index); }; +/* istanbul ignore next */ +/** @ignore */ +const setTime = (vector, index, value) => { + switch (vector.type.unit) { + case enum_1.TimeUnit.SECOND: return setTimeSecond(vector, index, value); + case enum_1.TimeUnit.MILLISECOND: return setTimeMillisecond(vector, index, value); + case enum_1.TimeUnit.MICROSECOND: return setTimeMicrosecond(vector, index, value); + case enum_1.TimeUnit.NANOSECOND: return setTimeNanosecond(vector, index, value); + } +}; +/** @ignore */ +const setDecimal = ({ values }, index, value) => { values.set(value.subarray(0, 4), 4 * index); }; +/** @ignore */ +const setList = (vector, index, value) => { + const values = vector.getChildAt(0), valueOffsets = vector.valueOffsets; + for (let idx = -1, itr = valueOffsets[index], end = valueOffsets[index + 1]; itr < end;) { + values.set(itr++, value.get(++idx)); + } +}; +/** @ignore */ +const setMap = (vector, index, value) => { + const values = vector.getChildAt(0), valueOffsets = vector.valueOffsets; + const entries = value instanceof Map ? [...value] : Object.entries(value); + for (let idx = -1, itr = valueOffsets[index], end = valueOffsets[index + 1]; itr < end;) { + values.set(itr++, entries[++idx]); + } +}; +/** @ignore */ const _setStructArrayValue = (o, v) => (c, _, i) => c && c.set(o, v[i]); +/** @ignore */ const _setStructVectorValue = (o, v) => (c, _, i) => c && c.set(o, v.get(i)); +/** @ignore */ const _setStructMapValue = (o, v) => (c, f, _) => c && c.set(o, v.get(f.name)); +/** @ignore */ const _setStructObjectValue = (o, v) => (c, f, _) => c && c.set(o, v[f.name]); +/** @ignore */ +const setStruct = (vector, index, value) => { + const setValue = value instanceof Map ? _setStructMapValue(index, value) : + value instanceof vector_1.Vector ? _setStructVectorValue(index, value) : + Array.isArray(value) ? _setStructArrayValue(index, value) : + _setStructObjectValue(index, value); + vector.type.children.forEach((f, i) => setValue(vector.getChildAt(i), f, i)); +}; +/* istanbul ignore next */ +/** @ignore */ +const setUnion = (vector, index, value) => { + vector.type.mode === enum_1.UnionMode.Dense ? + setDenseUnion(vector, index, value) : + setSparseUnion(vector, index, value); +}; +/** @ignore */ +const setDenseUnion = (vector, index, value) => { + const childIndex = vector.typeIdToChildIndex[vector.typeIds[index]]; + const child = vector.getChildAt(childIndex); + child && child.set(vector.valueOffsets[index], value); +}; +/** @ignore */ +const setSparseUnion = (vector, index, value) => { + const childIndex = vector.typeIdToChildIndex[vector.typeIds[index]]; + const child = vector.getChildAt(childIndex); + child && child.set(index, value); +}; +/** @ignore */ +const setDictionary = (vector, index, value) => { + const key = vector.getKey(index); + if (key !== null) { + vector.setValue(key, value); + } +}; +/* istanbul ignore next */ +/** @ignore */ +const setIntervalValue = (vector, index, value) => { + (vector.type.unit === enum_1.IntervalUnit.DAY_TIME) + ? setIntervalDayTime(vector, index, value) + : setIntervalYearMonth(vector, index, value); +}; +/** @ignore */ +const setIntervalDayTime = ({ values }, index, value) => { values.set(value.subarray(0, 2), 2 * index); }; +/** @ignore */ +const setIntervalYearMonth = ({ values }, index, value) => { values[index] = (value[0] * 12) + (value[1] % 12); }; +/** @ignore */ +const setFixedSizeList = (vector, index, value) => { + const child = vector.getChildAt(0), { stride } = vector; + for (let idx = -1, offset = index * stride; ++idx < stride;) { + child.set(offset + idx, value.get(idx)); + } +}; +SetVisitor.prototype.visitBool = setBool; +SetVisitor.prototype.visitInt = setInt; +SetVisitor.prototype.visitInt8 = setNumeric; +SetVisitor.prototype.visitInt16 = setNumeric; +SetVisitor.prototype.visitInt32 = setNumeric; +SetVisitor.prototype.visitInt64 = setNumericX2; +SetVisitor.prototype.visitUint8 = setNumeric; +SetVisitor.prototype.visitUint16 = setNumeric; +SetVisitor.prototype.visitUint32 = setNumeric; +SetVisitor.prototype.visitUint64 = setNumericX2; +SetVisitor.prototype.visitFloat = setFloat; +SetVisitor.prototype.visitFloat16 = setFloat16; +SetVisitor.prototype.visitFloat32 = setNumeric; +SetVisitor.prototype.visitFloat64 = setNumeric; +SetVisitor.prototype.visitUtf8 = setUtf8; +SetVisitor.prototype.visitBinary = setBinary; +SetVisitor.prototype.visitFixedSizeBinary = setFixedSizeBinary; +SetVisitor.prototype.visitDate = setDate; +SetVisitor.prototype.visitDateDay = setDateDay; +SetVisitor.prototype.visitDateMillisecond = setDateMillisecond; +SetVisitor.prototype.visitTimestamp = setTimestamp; +SetVisitor.prototype.visitTimestampSecond = setTimestampSecond; +SetVisitor.prototype.visitTimestampMillisecond = setTimestampMillisecond; +SetVisitor.prototype.visitTimestampMicrosecond = setTimestampMicrosecond; +SetVisitor.prototype.visitTimestampNanosecond = setTimestampNanosecond; +SetVisitor.prototype.visitTime = setTime; +SetVisitor.prototype.visitTimeSecond = setTimeSecond; +SetVisitor.prototype.visitTimeMillisecond = setTimeMillisecond; +SetVisitor.prototype.visitTimeMicrosecond = setTimeMicrosecond; +SetVisitor.prototype.visitTimeNanosecond = setTimeNanosecond; +SetVisitor.prototype.visitDecimal = setDecimal; +SetVisitor.prototype.visitList = setList; +SetVisitor.prototype.visitStruct = setStruct; +SetVisitor.prototype.visitUnion = setUnion; +SetVisitor.prototype.visitDenseUnion = setDenseUnion; +SetVisitor.prototype.visitSparseUnion = setSparseUnion; +SetVisitor.prototype.visitDictionary = setDictionary; +SetVisitor.prototype.visitInterval = setIntervalValue; +SetVisitor.prototype.visitIntervalDayTime = setIntervalDayTime; +SetVisitor.prototype.visitIntervalYearMonth = setIntervalYearMonth; +SetVisitor.prototype.visitFixedSizeList = setFixedSizeList; +SetVisitor.prototype.visitMap = setMap; +/** @ignore */ +exports.instance = new SetVisitor(); + +//# sourceMappingURL=set.js.map diff --git a/frontend/node_modules/apache-arrow/visitor/set.js.map b/frontend/node_modules/apache-arrow/visitor/set.js.map new file mode 100644 index 0000000000000000000000000000000000000000..0aecfb1e3819b38ed5f1740f85fbad4e3d559fd6 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/set.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor/set.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAIrB,sCAAmC;AACnC,wCAAqC;AACrC,uCAA0C;AAE1C,uCAA+C;AAC/C,2CAAmD;AACnD,kCAAuF;AAgEvF,cAAc;AACd,MAAa,UAAW,SAAQ,iBAAO;CAAG;AAA1C,gCAA0C;AAE1C,cAAc;AACd,MAAM,gBAAgB,GAAG,CAAC,IAAgB,EAAE,KAAa,EAAE,OAAe,EAAE,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3H,cAAc;AACd,MAAM,4BAA4B,GAAG,CAAC,IAAgB,EAAE,KAAa,EAAE,OAAe,EAAE,EAAE;IACtF,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;IACzC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;AACjD,CAA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C,SAAS,GAAmC,OAAO,CAAC;AACzE,UAAU,CAAC,SAAS,CAAC,WAAW,GAA+B,SAAS,CAAC;AACzE,UAAU,CAAC,SAAS,CAAC,UAAU,GAAiC,QAAQ,CAAC;AACzE,UAAU,CAAC,SAAS,CAAC,eAAe,GAAuB,aAAa,CAAC;AACzE,UAAU,CAAC,SAAS,CAAC,gBAAgB,GAAqB,cAAc,CAAC;AACzE,UAAU,CAAC,SAAS,CAAC,eAAe,GAAuB,aAAa,CAAC;AACzE,UAAU,CAAC,SAAS,CAAC,aAAa,GAAsB,gBAAgB,CAAC;AACzE,UAAU,CAAC,SAAS,CAAC,oBAAoB,GAAa,kBAAkB,CAAC;AACzE,UAAU,CAAC,SAAS,CAAC,sBAAsB,GAAS,oBAAoB,CAAC;AACzE,UAAU,CAAC,SAAS,CAAC,kBAAkB,GAAiB,gBAAgB,CAAC;AACzE,UAAU,CAAC,SAAS,CAAC,QAAQ,GAAqC,MAAM,CAAC;AAEzE,cAAc;AACD,QAAA,QAAQ,GAAG,IAAI,UAAU,EAAE,CAAC","file":"set.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Field } from '../schema';\nimport { Vector } from '../vector';\nimport { Visitor } from '../visitor';\nimport { encodeUtf8 } from '../util/utf8';\nimport { VectorType } from '../interfaces';\nimport { float64ToUint16 } from '../util/math';\nimport { toArrayBufferView } from '../util/buffer';\nimport { Type, UnionMode, Precision, DateUnit, TimeUnit, IntervalUnit } from '../enum';\nimport {\n DataType, Dictionary,\n Bool, Null, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct,\n Float, Float16, Float32, Float64,\n Int, Uint8, Uint16, Uint32, Uint64, Int8, Int16, Int32, Int64,\n Date_, DateDay, DateMillisecond,\n Interval, IntervalDayTime, IntervalYearMonth,\n Time, TimeSecond, TimeMillisecond, TimeMicrosecond, TimeNanosecond,\n Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond,\n Union, DenseUnion, SparseUnion,\n} from '../type';\n\n/** @ignore */\nexport interface SetVisitor extends Visitor {\n visit(node: T, index: number, value: T['TValue']): void;\n visitMany(nodes: T[], indices: number[], values: T['TValue'][]): void[];\n getVisitFn(node: T): (vector: VectorType, index: number, value: VectorType['TValue']) => void;\n getVisitFn(node: VectorType | Data | T): (vector: VectorType, index: number, value: VectorType['TValue']) => void;\n visitNull (vector: VectorType, index: number, value: T['TValue']): void;\n visitBool (vector: VectorType, index: number, value: T['TValue']): void;\n visitInt (vector: VectorType, index: number, value: T['TValue']): void;\n visitInt8 (vector: VectorType, index: number, value: T['TValue']): void;\n visitInt16 (vector: VectorType, index: number, value: T['TValue']): void;\n visitInt32 (vector: VectorType, index: number, value: T['TValue']): void;\n visitInt64 (vector: VectorType, index: number, value: T['TValue']): void;\n visitUint8 (vector: VectorType, index: number, value: T['TValue']): void;\n visitUint16 (vector: VectorType, index: number, value: T['TValue']): void;\n visitUint32 (vector: VectorType, index: number, value: T['TValue']): void;\n visitUint64 (vector: VectorType, index: number, value: T['TValue']): void;\n visitFloat (vector: VectorType, index: number, value: T['TValue']): void;\n visitFloat16 (vector: VectorType, index: number, value: T['TValue']): void;\n visitFloat32 (vector: VectorType, index: number, value: T['TValue']): void;\n visitFloat64 (vector: VectorType, index: number, value: T['TValue']): void;\n visitUtf8 (vector: VectorType, index: number, value: T['TValue']): void;\n visitBinary (vector: VectorType, index: number, value: T['TValue']): void;\n visitFixedSizeBinary (vector: VectorType, index: number, value: T['TValue']): void;\n visitDate (vector: VectorType, index: number, value: T['TValue']): void;\n visitDateDay (vector: VectorType, index: number, value: T['TValue']): void;\n visitDateMillisecond (vector: VectorType, index: number, value: T['TValue']): void;\n visitTimestamp (vector: VectorType, index: number, value: T['TValue']): void;\n visitTimestampSecond (vector: VectorType, index: number, value: T['TValue']): void;\n visitTimestampMillisecond (vector: VectorType, index: number, value: T['TValue']): void;\n visitTimestampMicrosecond (vector: VectorType, index: number, value: T['TValue']): void;\n visitTimestampNanosecond (vector: VectorType, index: number, value: T['TValue']): void;\n visitTime (vector: VectorType, index: number, value: T['TValue']): void;\n visitTimeSecond (vector: VectorType, index: number, value: T['TValue']): void;\n visitTimeMillisecond (vector: VectorType, index: number, value: T['TValue']): void;\n visitTimeMicrosecond (vector: VectorType, index: number, value: T['TValue']): void;\n visitTimeNanosecond (vector: VectorType, index: number, value: T['TValue']): void;\n visitDecimal (vector: VectorType, index: number, value: T['TValue']): void;\n visitList (vector: VectorType, index: number, value: T['TValue']): void;\n visitStruct (vector: VectorType, index: number, value: T['TValue']): void;\n visitUnion (vector: VectorType, index: number, value: T['TValue']): void;\n visitDenseUnion (vector: VectorType, index: number, value: T['TValue']): void;\n visitSparseUnion (vector: VectorType, index: number, value: T['TValue']): void;\n visitDictionary (vector: VectorType, index: number, value: T['TValue']): void;\n visitInterval (vector: VectorType, index: number, value: T['TValue']): void;\n visitIntervalDayTime (vector: VectorType, index: number, value: T['TValue']): void;\n visitIntervalYearMonth (vector: VectorType, index: number, value: T['TValue']): void;\n visitFixedSizeList (vector: VectorType, index: number, value: T['TValue']): void;\n visitMap (vector: VectorType, index: number, value: T['TValue']): void;\n}\n\n/** @ignore */\nexport class SetVisitor extends Visitor {}\n\n/** @ignore */\nconst setEpochMsToDays = (data: Int32Array, index: number, epochMs: number) => { data[index] = (epochMs / 86400000) | 0; };\n/** @ignore */\nconst setEpochMsToMillisecondsLong = (data: Int32Array, index: number, epochMs: number) => {\n data[index] = (epochMs % 4294967296) | 0;\n data[index + 1] = (epochMs / 4294967296) | 0;\n};\n/** @ignore */\nconst setEpochMsToMicrosecondsLong = (data: Int32Array, index: number, epochMs: number) => {\n data[index] = ((epochMs * 1000) % 4294967296) | 0;\n data[index + 1] = ((epochMs * 1000) / 4294967296) | 0;\n};\n/** @ignore */\nconst setEpochMsToNanosecondsLong = (data: Int32Array, index: number, epochMs: number) => {\n data[index] = ((epochMs * 1000000) % 4294967296) | 0;\n data[index + 1] = ((epochMs * 1000000) / 4294967296) | 0;\n};\n\n/** @ignore */\nconst setVariableWidthBytes = (values: Uint8Array, valueOffsets: Int32Array, index: number, value: Uint8Array) => {\n const { [index]: x, [index + 1]: y } = valueOffsets;\n if (x != null && y != null) {\n values.set(value.subarray(0, y - x), x);\n }\n};\n\n/** @ignore */\nconst setBool = ({ offset, values }: VectorType, index: number, val: boolean) => {\n const idx = offset + index;\n val ? (values[idx >> 3] |= (1 << (idx % 8))) // true\n : (values[idx >> 3] &= ~(1 << (idx % 8))); // false\n\n};\n\n/** @ignore */ type Numeric1X = Int8 | Int16 | Int32 | Uint8 | Uint16 | Uint32 | Float32 | Float64;\n/** @ignore */ type Numeric2X = Int64 | Uint64;\n\n/** @ignore */\nconst setDateDay = ({ values }: VectorType, index: number, value: T['TValue']): void => { setEpochMsToDays(values, index, value.valueOf()); };\n/** @ignore */\nconst setDateMillisecond = ({ values }: VectorType, index: number, value: T['TValue']): void => { setEpochMsToMillisecondsLong(values, index * 2, value.valueOf()); };\n/** @ignore */\nconst setNumeric = ({ stride, values }: VectorType, index: number, value: T['TValue']): void => { values[stride * index] = value; };\n/** @ignore */\nconst setFloat16 = ({ stride, values }: VectorType, index: number, value: T['TValue']): void => { values[stride * index] = float64ToUint16(value); };\n/** @ignore */\nconst setNumericX2 = (vector: VectorType, index: number, value: T['TValue']): void => {\n switch (typeof value) {\n case 'bigint': vector.values64[index] = value; break;\n case 'number': vector.values[index * vector.stride] = value; break;\n default:\n const val = value as T['TArray'];\n const { stride, ArrayType } = vector;\n const long = toArrayBufferView(ArrayType, val);\n vector.values.set(long.subarray(0, stride), stride * index);\n }\n};\n/** @ignore */\nconst setFixedSizeBinary = ({ stride, values }: VectorType, index: number, value: T['TValue']): void => { values.set(value.subarray(0, stride), stride * index); };\n\n/** @ignore */\nconst setBinary = ({ values, valueOffsets }: VectorType, index: number, value: T['TValue']) => setVariableWidthBytes(values, valueOffsets, index, value);\n/** @ignore */\nconst setUtf8 = ({ values, valueOffsets }: VectorType, index: number, value: T['TValue']) => {\n setVariableWidthBytes(values, valueOffsets, index, encodeUtf8(value));\n};\n\n/* istanbul ignore next */\n/** @ignore */\nconst setInt = (vector: VectorType, index: number, value: T['TValue']): void => {\n vector.type.bitWidth < 64\n ? setNumeric(vector as VectorType, index, value as Numeric1X['TValue'])\n : setNumericX2(vector as VectorType, index, value as Numeric2X['TValue']);\n};\n\n/* istanbul ignore next */\n/** @ignore */\nconst setFloat = (vector: VectorType, index: number, value: T['TValue']): void => {\n vector.type.precision !== Precision.HALF\n ? setNumeric(vector as VectorType, index, value)\n : setFloat16(vector as VectorType, index, value);\n};\n\n/* istanbul ignore next */\nconst setDate = (vector: VectorType, index: number, value: T['TValue']): void => {\n vector.type.unit === DateUnit.DAY\n ? setDateDay(vector as VectorType, index, value)\n : setDateMillisecond(vector as VectorType, index, value);\n};\n\n/** @ignore */\nconst setTimestampSecond = ({ values }: VectorType, index: number, value: T['TValue']): void => setEpochMsToMillisecondsLong(values, index * 2, value / 1000);\n/** @ignore */\nconst setTimestampMillisecond = ({ values }: VectorType, index: number, value: T['TValue']): void => setEpochMsToMillisecondsLong(values, index * 2, value);\n/** @ignore */\nconst setTimestampMicrosecond = ({ values }: VectorType, index: number, value: T['TValue']): void => setEpochMsToMicrosecondsLong(values, index * 2, value);\n/** @ignore */\nconst setTimestampNanosecond = ({ values }: VectorType, index: number, value: T['TValue']): void => setEpochMsToNanosecondsLong(values, index * 2, value);\n/* istanbul ignore next */\n/** @ignore */\nconst setTimestamp = (vector: VectorType, index: number, value: T['TValue']): void => {\n switch (vector.type.unit) {\n case TimeUnit.SECOND: return setTimestampSecond(vector as VectorType, index, value);\n case TimeUnit.MILLISECOND: return setTimestampMillisecond(vector as VectorType, index, value);\n case TimeUnit.MICROSECOND: return setTimestampMicrosecond(vector as VectorType, index, value);\n case TimeUnit.NANOSECOND: return setTimestampNanosecond(vector as VectorType, index, value);\n }\n};\n\n/** @ignore */\nconst setTimeSecond = ({ values, stride }: VectorType, index: number, value: T['TValue']): void => { values[stride * index] = value; };\n/** @ignore */\nconst setTimeMillisecond = ({ values, stride }: VectorType, index: number, value: T['TValue']): void => { values[stride * index] = value; };\n/** @ignore */\nconst setTimeMicrosecond = ({ values }: VectorType, index: number, value: T['TValue']): void => { values.set(value.subarray(0, 2), 2 * index); };\n/** @ignore */\nconst setTimeNanosecond = ({ values }: VectorType, index: number, value: T['TValue']): void => { values.set(value.subarray(0, 2), 2 * index); };\n/* istanbul ignore next */\n/** @ignore */\nconst setTime = (vector: VectorType, index: number, value: T['TValue']): void => {\n switch (vector.type.unit) {\n case TimeUnit.SECOND: return setTimeSecond(vector as VectorType, index, value as TimeSecond['TValue']);\n case TimeUnit.MILLISECOND: return setTimeMillisecond(vector as VectorType, index, value as TimeMillisecond['TValue']);\n case TimeUnit.MICROSECOND: return setTimeMicrosecond(vector as VectorType, index, value as TimeMicrosecond['TValue']);\n case TimeUnit.NANOSECOND: return setTimeNanosecond(vector as VectorType, index, value as TimeNanosecond['TValue']);\n }\n};\n\n/** @ignore */\nconst setDecimal = ({ values }: VectorType, index: number, value: T['TValue']): void => { values.set(value.subarray(0, 4), 4 * index); };\n\n/** @ignore */\nconst setList = (vector: VectorType, index: number, value: T['TValue']): void => {\n const values = vector.getChildAt(0)!, valueOffsets = vector.valueOffsets;\n for (let idx = -1, itr = valueOffsets[index], end = valueOffsets[index + 1]; itr < end;) {\n values.set(itr++, value.get(++idx));\n }\n};\n\n/** @ignore */\nconst setMap = (vector: VectorType, index: number, value: T['TValue']) => {\n const values = vector.getChildAt(0)!, valueOffsets = vector.valueOffsets;\n const entries = value instanceof Map ? [...value] : Object.entries(value);\n for (let idx = -1, itr = valueOffsets[index], end = valueOffsets[index + 1]; itr < end;) {\n values.set(itr++, entries[++idx]);\n }\n};\n\n/** @ignore */ const _setStructArrayValue = (o: number, v: any[]) => (c: Vector | null, _: Field, i: number) => c && c.set(o, v[i]);\n/** @ignore */ const _setStructVectorValue = (o: number, v: Vector) => (c: Vector | null, _: Field, i: number) => c && c.set(o, v.get(i));\n/** @ignore */ const _setStructMapValue = (o: number, v: Map) => (c: Vector | null, f: Field, _: number) => c && c.set(o, v.get(f.name));\n/** @ignore */ const _setStructObjectValue = (o: number, v: { [key: string]: any }) => (c: Vector | null, f: Field, _: number) => c && c.set(o, v[f.name]);\n/** @ignore */\nconst setStruct = (vector: VectorType, index: number, value: T['TValue']) => {\n\n const setValue = value instanceof Map ? _setStructMapValue(index, value) :\n value instanceof Vector ? _setStructVectorValue(index, value) :\n Array.isArray(value) ? _setStructArrayValue(index, value) :\n _setStructObjectValue(index, value) ;\n\n vector.type.children.forEach((f: Field, i: number) => setValue(vector.getChildAt(i), f, i));\n};\n\n/* istanbul ignore next */\n/** @ignore */\nconst setUnion = <\n V extends VectorType | VectorType | VectorType\n>(vector: V, index: number, value: V['TValue']) => {\n vector.type.mode === UnionMode.Dense ?\n setDenseUnion(vector as VectorType, index, value) :\n setSparseUnion(vector as VectorType, index, value);\n};\n\n/** @ignore */\nconst setDenseUnion = (vector: VectorType, index: number, value: T['TValue']): void => {\n const childIndex = vector.typeIdToChildIndex[vector.typeIds[index]];\n const child = vector.getChildAt(childIndex);\n child && child.set(vector.valueOffsets[index], value);\n};\n\n/** @ignore */\nconst setSparseUnion = (vector: VectorType, index: number, value: T['TValue']): void => {\n const childIndex = vector.typeIdToChildIndex[vector.typeIds[index]];\n const child = vector.getChildAt(childIndex);\n child && child.set(index, value);\n};\n\n/** @ignore */\nconst setDictionary = (vector: VectorType, index: number, value: T['TValue']): void => {\n const key = vector.getKey(index);\n if (key !== null) {\n vector.setValue(key, value);\n }\n};\n\n/* istanbul ignore next */\n/** @ignore */\nconst setIntervalValue = (vector: VectorType, index: number, value: T['TValue']): void => {\n (vector.type.unit === IntervalUnit.DAY_TIME)\n ? setIntervalDayTime(vector as VectorType, index, value)\n : setIntervalYearMonth(vector as VectorType, index, value);\n};\n\n/** @ignore */\nconst setIntervalDayTime = ({ values }: VectorType, index: number, value: T['TValue']): void => { values.set(value.subarray(0, 2), 2 * index); };\n/** @ignore */\nconst setIntervalYearMonth = ({ values }: VectorType, index: number, value: T['TValue']): void => { values[index] = (value[0] * 12) + (value[1] % 12); };\n\n/** @ignore */\nconst setFixedSizeList = (vector: VectorType, index: number, value: T['TValue']): void => {\n const child = vector.getChildAt(0)!, { stride } = vector;\n for (let idx = -1, offset = index * stride; ++idx < stride;) {\n child.set(offset + idx, value.get(idx));\n }\n};\n\nSetVisitor.prototype.visitBool = setBool;\nSetVisitor.prototype.visitInt = setInt;\nSetVisitor.prototype.visitInt8 = setNumeric;\nSetVisitor.prototype.visitInt16 = setNumeric;\nSetVisitor.prototype.visitInt32 = setNumeric;\nSetVisitor.prototype.visitInt64 = setNumericX2;\nSetVisitor.prototype.visitUint8 = setNumeric;\nSetVisitor.prototype.visitUint16 = setNumeric;\nSetVisitor.prototype.visitUint32 = setNumeric;\nSetVisitor.prototype.visitUint64 = setNumericX2;\nSetVisitor.prototype.visitFloat = setFloat;\nSetVisitor.prototype.visitFloat16 = setFloat16;\nSetVisitor.prototype.visitFloat32 = setNumeric;\nSetVisitor.prototype.visitFloat64 = setNumeric;\nSetVisitor.prototype.visitUtf8 = setUtf8;\nSetVisitor.prototype.visitBinary = setBinary;\nSetVisitor.prototype.visitFixedSizeBinary = setFixedSizeBinary;\nSetVisitor.prototype.visitDate = setDate;\nSetVisitor.prototype.visitDateDay = setDateDay;\nSetVisitor.prototype.visitDateMillisecond = setDateMillisecond;\nSetVisitor.prototype.visitTimestamp = setTimestamp;\nSetVisitor.prototype.visitTimestampSecond = setTimestampSecond;\nSetVisitor.prototype.visitTimestampMillisecond = setTimestampMillisecond;\nSetVisitor.prototype.visitTimestampMicrosecond = setTimestampMicrosecond;\nSetVisitor.prototype.visitTimestampNanosecond = setTimestampNanosecond;\nSetVisitor.prototype.visitTime = setTime;\nSetVisitor.prototype.visitTimeSecond = setTimeSecond;\nSetVisitor.prototype.visitTimeMillisecond = setTimeMillisecond;\nSetVisitor.prototype.visitTimeMicrosecond = setTimeMicrosecond;\nSetVisitor.prototype.visitTimeNanosecond = setTimeNanosecond;\nSetVisitor.prototype.visitDecimal = setDecimal;\nSetVisitor.prototype.visitList = setList;\nSetVisitor.prototype.visitStruct = setStruct;\nSetVisitor.prototype.visitUnion = setUnion;\nSetVisitor.prototype.visitDenseUnion = setDenseUnion;\nSetVisitor.prototype.visitSparseUnion = setSparseUnion;\nSetVisitor.prototype.visitDictionary = setDictionary;\nSetVisitor.prototype.visitInterval = setIntervalValue;\nSetVisitor.prototype.visitIntervalDayTime = setIntervalDayTime;\nSetVisitor.prototype.visitIntervalYearMonth = setIntervalYearMonth;\nSetVisitor.prototype.visitFixedSizeList = setFixedSizeList;\nSetVisitor.prototype.visitMap = setMap;\n\n/** @ignore */\nexport const instance = new SetVisitor();\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/set.mjs b/frontend/node_modules/apache-arrow/visitor/set.mjs new file mode 100644 index 0000000000000000000000000000000000000000..24dff17af347507fe9c4d711a180e6a70d2ae9c4 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/set.mjs @@ -0,0 +1,262 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { Vector } from '../vector'; +import { Visitor } from '../visitor'; +import { encodeUtf8 } from '../util/utf8'; +import { float64ToUint16 } from '../util/math'; +import { toArrayBufferView } from '../util/buffer'; +import { UnionMode, Precision, DateUnit, TimeUnit, IntervalUnit } from '../enum'; +/** @ignore */ +export class SetVisitor extends Visitor { +} +/** @ignore */ +const setEpochMsToDays = (data, index, epochMs) => { data[index] = (epochMs / 86400000) | 0; }; +/** @ignore */ +const setEpochMsToMillisecondsLong = (data, index, epochMs) => { + data[index] = (epochMs % 4294967296) | 0; + data[index + 1] = (epochMs / 4294967296) | 0; +}; +/** @ignore */ +const setEpochMsToMicrosecondsLong = (data, index, epochMs) => { + data[index] = ((epochMs * 1000) % 4294967296) | 0; + data[index + 1] = ((epochMs * 1000) / 4294967296) | 0; +}; +/** @ignore */ +const setEpochMsToNanosecondsLong = (data, index, epochMs) => { + data[index] = ((epochMs * 1000000) % 4294967296) | 0; + data[index + 1] = ((epochMs * 1000000) / 4294967296) | 0; +}; +/** @ignore */ +const setVariableWidthBytes = (values, valueOffsets, index, value) => { + const { [index]: x, [index + 1]: y } = valueOffsets; + if (x != null && y != null) { + values.set(value.subarray(0, y - x), x); + } +}; +/** @ignore */ +const setBool = ({ offset, values }, index, val) => { + const idx = offset + index; + val ? (values[idx >> 3] |= (1 << (idx % 8))) // true + : (values[idx >> 3] &= ~(1 << (idx % 8))); // false +}; +/** @ignore */ +const setDateDay = ({ values }, index, value) => { setEpochMsToDays(values, index, value.valueOf()); }; +/** @ignore */ +const setDateMillisecond = ({ values }, index, value) => { setEpochMsToMillisecondsLong(values, index * 2, value.valueOf()); }; +/** @ignore */ +const setNumeric = ({ stride, values }, index, value) => { values[stride * index] = value; }; +/** @ignore */ +const setFloat16 = ({ stride, values }, index, value) => { values[stride * index] = float64ToUint16(value); }; +/** @ignore */ +const setNumericX2 = (vector, index, value) => { + switch (typeof value) { + case 'bigint': + vector.values64[index] = value; + break; + case 'number': + vector.values[index * vector.stride] = value; + break; + default: + const val = value; + const { stride, ArrayType } = vector; + const long = toArrayBufferView(ArrayType, val); + vector.values.set(long.subarray(0, stride), stride * index); + } +}; +/** @ignore */ +const setFixedSizeBinary = ({ stride, values }, index, value) => { values.set(value.subarray(0, stride), stride * index); }; +/** @ignore */ +const setBinary = ({ values, valueOffsets }, index, value) => setVariableWidthBytes(values, valueOffsets, index, value); +/** @ignore */ +const setUtf8 = ({ values, valueOffsets }, index, value) => { + setVariableWidthBytes(values, valueOffsets, index, encodeUtf8(value)); +}; +/* istanbul ignore next */ +/** @ignore */ +const setInt = (vector, index, value) => { + vector.type.bitWidth < 64 + ? setNumeric(vector, index, value) + : setNumericX2(vector, index, value); +}; +/* istanbul ignore next */ +/** @ignore */ +const setFloat = (vector, index, value) => { + vector.type.precision !== Precision.HALF + ? setNumeric(vector, index, value) + : setFloat16(vector, index, value); +}; +/* istanbul ignore next */ +const setDate = (vector, index, value) => { + vector.type.unit === DateUnit.DAY + ? setDateDay(vector, index, value) + : setDateMillisecond(vector, index, value); +}; +/** @ignore */ +const setTimestampSecond = ({ values }, index, value) => setEpochMsToMillisecondsLong(values, index * 2, value / 1000); +/** @ignore */ +const setTimestampMillisecond = ({ values }, index, value) => setEpochMsToMillisecondsLong(values, index * 2, value); +/** @ignore */ +const setTimestampMicrosecond = ({ values }, index, value) => setEpochMsToMicrosecondsLong(values, index * 2, value); +/** @ignore */ +const setTimestampNanosecond = ({ values }, index, value) => setEpochMsToNanosecondsLong(values, index * 2, value); +/* istanbul ignore next */ +/** @ignore */ +const setTimestamp = (vector, index, value) => { + switch (vector.type.unit) { + case TimeUnit.SECOND: return setTimestampSecond(vector, index, value); + case TimeUnit.MILLISECOND: return setTimestampMillisecond(vector, index, value); + case TimeUnit.MICROSECOND: return setTimestampMicrosecond(vector, index, value); + case TimeUnit.NANOSECOND: return setTimestampNanosecond(vector, index, value); + } +}; +/** @ignore */ +const setTimeSecond = ({ values, stride }, index, value) => { values[stride * index] = value; }; +/** @ignore */ +const setTimeMillisecond = ({ values, stride }, index, value) => { values[stride * index] = value; }; +/** @ignore */ +const setTimeMicrosecond = ({ values }, index, value) => { values.set(value.subarray(0, 2), 2 * index); }; +/** @ignore */ +const setTimeNanosecond = ({ values }, index, value) => { values.set(value.subarray(0, 2), 2 * index); }; +/* istanbul ignore next */ +/** @ignore */ +const setTime = (vector, index, value) => { + switch (vector.type.unit) { + case TimeUnit.SECOND: return setTimeSecond(vector, index, value); + case TimeUnit.MILLISECOND: return setTimeMillisecond(vector, index, value); + case TimeUnit.MICROSECOND: return setTimeMicrosecond(vector, index, value); + case TimeUnit.NANOSECOND: return setTimeNanosecond(vector, index, value); + } +}; +/** @ignore */ +const setDecimal = ({ values }, index, value) => { values.set(value.subarray(0, 4), 4 * index); }; +/** @ignore */ +const setList = (vector, index, value) => { + const values = vector.getChildAt(0), valueOffsets = vector.valueOffsets; + for (let idx = -1, itr = valueOffsets[index], end = valueOffsets[index + 1]; itr < end;) { + values.set(itr++, value.get(++idx)); + } +}; +/** @ignore */ +const setMap = (vector, index, value) => { + const values = vector.getChildAt(0), valueOffsets = vector.valueOffsets; + const entries = value instanceof Map ? [...value] : Object.entries(value); + for (let idx = -1, itr = valueOffsets[index], end = valueOffsets[index + 1]; itr < end;) { + values.set(itr++, entries[++idx]); + } +}; +/** @ignore */ const _setStructArrayValue = (o, v) => (c, _, i) => c && c.set(o, v[i]); +/** @ignore */ const _setStructVectorValue = (o, v) => (c, _, i) => c && c.set(o, v.get(i)); +/** @ignore */ const _setStructMapValue = (o, v) => (c, f, _) => c && c.set(o, v.get(f.name)); +/** @ignore */ const _setStructObjectValue = (o, v) => (c, f, _) => c && c.set(o, v[f.name]); +/** @ignore */ +const setStruct = (vector, index, value) => { + const setValue = value instanceof Map ? _setStructMapValue(index, value) : + value instanceof Vector ? _setStructVectorValue(index, value) : + Array.isArray(value) ? _setStructArrayValue(index, value) : + _setStructObjectValue(index, value); + vector.type.children.forEach((f, i) => setValue(vector.getChildAt(i), f, i)); +}; +/* istanbul ignore next */ +/** @ignore */ +const setUnion = (vector, index, value) => { + vector.type.mode === UnionMode.Dense ? + setDenseUnion(vector, index, value) : + setSparseUnion(vector, index, value); +}; +/** @ignore */ +const setDenseUnion = (vector, index, value) => { + const childIndex = vector.typeIdToChildIndex[vector.typeIds[index]]; + const child = vector.getChildAt(childIndex); + child && child.set(vector.valueOffsets[index], value); +}; +/** @ignore */ +const setSparseUnion = (vector, index, value) => { + const childIndex = vector.typeIdToChildIndex[vector.typeIds[index]]; + const child = vector.getChildAt(childIndex); + child && child.set(index, value); +}; +/** @ignore */ +const setDictionary = (vector, index, value) => { + const key = vector.getKey(index); + if (key !== null) { + vector.setValue(key, value); + } +}; +/* istanbul ignore next */ +/** @ignore */ +const setIntervalValue = (vector, index, value) => { + (vector.type.unit === IntervalUnit.DAY_TIME) + ? setIntervalDayTime(vector, index, value) + : setIntervalYearMonth(vector, index, value); +}; +/** @ignore */ +const setIntervalDayTime = ({ values }, index, value) => { values.set(value.subarray(0, 2), 2 * index); }; +/** @ignore */ +const setIntervalYearMonth = ({ values }, index, value) => { values[index] = (value[0] * 12) + (value[1] % 12); }; +/** @ignore */ +const setFixedSizeList = (vector, index, value) => { + const child = vector.getChildAt(0), { stride } = vector; + for (let idx = -1, offset = index * stride; ++idx < stride;) { + child.set(offset + idx, value.get(idx)); + } +}; +SetVisitor.prototype.visitBool = setBool; +SetVisitor.prototype.visitInt = setInt; +SetVisitor.prototype.visitInt8 = setNumeric; +SetVisitor.prototype.visitInt16 = setNumeric; +SetVisitor.prototype.visitInt32 = setNumeric; +SetVisitor.prototype.visitInt64 = setNumericX2; +SetVisitor.prototype.visitUint8 = setNumeric; +SetVisitor.prototype.visitUint16 = setNumeric; +SetVisitor.prototype.visitUint32 = setNumeric; +SetVisitor.prototype.visitUint64 = setNumericX2; +SetVisitor.prototype.visitFloat = setFloat; +SetVisitor.prototype.visitFloat16 = setFloat16; +SetVisitor.prototype.visitFloat32 = setNumeric; +SetVisitor.prototype.visitFloat64 = setNumeric; +SetVisitor.prototype.visitUtf8 = setUtf8; +SetVisitor.prototype.visitBinary = setBinary; +SetVisitor.prototype.visitFixedSizeBinary = setFixedSizeBinary; +SetVisitor.prototype.visitDate = setDate; +SetVisitor.prototype.visitDateDay = setDateDay; +SetVisitor.prototype.visitDateMillisecond = setDateMillisecond; +SetVisitor.prototype.visitTimestamp = setTimestamp; +SetVisitor.prototype.visitTimestampSecond = setTimestampSecond; +SetVisitor.prototype.visitTimestampMillisecond = setTimestampMillisecond; +SetVisitor.prototype.visitTimestampMicrosecond = setTimestampMicrosecond; +SetVisitor.prototype.visitTimestampNanosecond = setTimestampNanosecond; +SetVisitor.prototype.visitTime = setTime; +SetVisitor.prototype.visitTimeSecond = setTimeSecond; +SetVisitor.prototype.visitTimeMillisecond = setTimeMillisecond; +SetVisitor.prototype.visitTimeMicrosecond = setTimeMicrosecond; +SetVisitor.prototype.visitTimeNanosecond = setTimeNanosecond; +SetVisitor.prototype.visitDecimal = setDecimal; +SetVisitor.prototype.visitList = setList; +SetVisitor.prototype.visitStruct = setStruct; +SetVisitor.prototype.visitUnion = setUnion; +SetVisitor.prototype.visitDenseUnion = setDenseUnion; +SetVisitor.prototype.visitSparseUnion = setSparseUnion; +SetVisitor.prototype.visitDictionary = setDictionary; +SetVisitor.prototype.visitInterval = setIntervalValue; +SetVisitor.prototype.visitIntervalDayTime = setIntervalDayTime; +SetVisitor.prototype.visitIntervalYearMonth = setIntervalYearMonth; +SetVisitor.prototype.visitFixedSizeList = setFixedSizeList; +SetVisitor.prototype.visitMap = setMap; +/** @ignore */ +export const instance = new SetVisitor(); + +//# sourceMappingURL=set.mjs.map diff --git a/frontend/node_modules/apache-arrow/visitor/set.mjs.map b/frontend/node_modules/apache-arrow/visitor/set.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..8c59ae6305154e68c1ad424493ddc01b7f58b6b2 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/set.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor/set.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAIrB,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAQ,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAgEvF,cAAc;AACd,MAAM,OAAO,UAAW,SAAQ,OAAO;CAAG;AAE1C,cAAc;AACd,MAAM,gBAAgB,GAAG,CAAC,IAAgB,EAAE,KAAa,EAAE,OAAe,EAAE,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3H,cAAc;AACd,MAAM,4BAA4B,GAAG,CAAC,IAAgB,EAAE,KAAa,EAAE,OAAe,EAAE,EAAE;IACtF,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;IACzC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,OAAO,GAAG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,CAAC;AACzE,UAAU,CAAC,SAAS,CAAC,SAAS,GAAmC,OAAO,CAAC;AACzE,UAAU,CAAC,SAAS,CAAC,WAAW,GAA+B,SAAS,CAAC;AACzE,UAAU,CAAC,SAAS,CAAC,UAAU,GAAiC,QAAQ,CAAC;AACzE,UAAU,CAAC,SAAS,CAAC,eAAe,GAAuB,aAAa,CAAC;AACzE,UAAU,CAAC,SAAS,CAAC,gBAAgB,GAAqB,cAAc,CAAC;AACzE,UAAU,CAAC,SAAS,CAAC,eAAe,GAAuB,aAAa,CAAC;AACzE,UAAU,CAAC,SAAS,CAAC,aAAa,GAAsB,gBAAgB,CAAC;AACzE,UAAU,CAAC,SAAS,CAAC,oBAAoB,GAAa,kBAAkB,CAAC;AACzE,UAAU,CAAC,SAAS,CAAC,sBAAsB,GAAS,oBAAoB,CAAC;AACzE,UAAU,CAAC,SAAS,CAAC,kBAAkB,GAAiB,gBAAgB,CAAC;AACzE,UAAU,CAAC,SAAS,CAAC,QAAQ,GAAqC,MAAM,CAAC;AAEzE,cAAc;AACd,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,UAAU,EAAE,CAAC","file":"set.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Field } from '../schema';\nimport { Vector } from '../vector';\nimport { Visitor } from '../visitor';\nimport { encodeUtf8 } from '../util/utf8';\nimport { VectorType } from '../interfaces';\nimport { float64ToUint16 } from '../util/math';\nimport { toArrayBufferView } from '../util/buffer';\nimport { Type, UnionMode, Precision, DateUnit, TimeUnit, IntervalUnit } from '../enum';\nimport {\n DataType, Dictionary,\n Bool, Null, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct,\n Float, Float16, Float32, Float64,\n Int, Uint8, Uint16, Uint32, Uint64, Int8, Int16, Int32, Int64,\n Date_, DateDay, DateMillisecond,\n Interval, IntervalDayTime, IntervalYearMonth,\n Time, TimeSecond, TimeMillisecond, TimeMicrosecond, TimeNanosecond,\n Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond,\n Union, DenseUnion, SparseUnion,\n} from '../type';\n\n/** @ignore */\nexport interface SetVisitor extends Visitor {\n visit(node: T, index: number, value: T['TValue']): void;\n visitMany(nodes: T[], indices: number[], values: T['TValue'][]): void[];\n getVisitFn(node: T): (vector: VectorType, index: number, value: VectorType['TValue']) => void;\n getVisitFn(node: VectorType | Data | T): (vector: VectorType, index: number, value: VectorType['TValue']) => void;\n visitNull (vector: VectorType, index: number, value: T['TValue']): void;\n visitBool (vector: VectorType, index: number, value: T['TValue']): void;\n visitInt (vector: VectorType, index: number, value: T['TValue']): void;\n visitInt8 (vector: VectorType, index: number, value: T['TValue']): void;\n visitInt16 (vector: VectorType, index: number, value: T['TValue']): void;\n visitInt32 (vector: VectorType, index: number, value: T['TValue']): void;\n visitInt64 (vector: VectorType, index: number, value: T['TValue']): void;\n visitUint8 (vector: VectorType, index: number, value: T['TValue']): void;\n visitUint16 (vector: VectorType, index: number, value: T['TValue']): void;\n visitUint32 (vector: VectorType, index: number, value: T['TValue']): void;\n visitUint64 (vector: VectorType, index: number, value: T['TValue']): void;\n visitFloat (vector: VectorType, index: number, value: T['TValue']): void;\n visitFloat16 (vector: VectorType, index: number, value: T['TValue']): void;\n visitFloat32 (vector: VectorType, index: number, value: T['TValue']): void;\n visitFloat64 (vector: VectorType, index: number, value: T['TValue']): void;\n visitUtf8 (vector: VectorType, index: number, value: T['TValue']): void;\n visitBinary (vector: VectorType, index: number, value: T['TValue']): void;\n visitFixedSizeBinary (vector: VectorType, index: number, value: T['TValue']): void;\n visitDate (vector: VectorType, index: number, value: T['TValue']): void;\n visitDateDay (vector: VectorType, index: number, value: T['TValue']): void;\n visitDateMillisecond (vector: VectorType, index: number, value: T['TValue']): void;\n visitTimestamp (vector: VectorType, index: number, value: T['TValue']): void;\n visitTimestampSecond (vector: VectorType, index: number, value: T['TValue']): void;\n visitTimestampMillisecond (vector: VectorType, index: number, value: T['TValue']): void;\n visitTimestampMicrosecond (vector: VectorType, index: number, value: T['TValue']): void;\n visitTimestampNanosecond (vector: VectorType, index: number, value: T['TValue']): void;\n visitTime (vector: VectorType, index: number, value: T['TValue']): void;\n visitTimeSecond (vector: VectorType, index: number, value: T['TValue']): void;\n visitTimeMillisecond (vector: VectorType, index: number, value: T['TValue']): void;\n visitTimeMicrosecond (vector: VectorType, index: number, value: T['TValue']): void;\n visitTimeNanosecond (vector: VectorType, index: number, value: T['TValue']): void;\n visitDecimal (vector: VectorType, index: number, value: T['TValue']): void;\n visitList (vector: VectorType, index: number, value: T['TValue']): void;\n visitStruct (vector: VectorType, index: number, value: T['TValue']): void;\n visitUnion (vector: VectorType, index: number, value: T['TValue']): void;\n visitDenseUnion (vector: VectorType, index: number, value: T['TValue']): void;\n visitSparseUnion (vector: VectorType, index: number, value: T['TValue']): void;\n visitDictionary (vector: VectorType, index: number, value: T['TValue']): void;\n visitInterval (vector: VectorType, index: number, value: T['TValue']): void;\n visitIntervalDayTime (vector: VectorType, index: number, value: T['TValue']): void;\n visitIntervalYearMonth (vector: VectorType, index: number, value: T['TValue']): void;\n visitFixedSizeList (vector: VectorType, index: number, value: T['TValue']): void;\n visitMap (vector: VectorType, index: number, value: T['TValue']): void;\n}\n\n/** @ignore */\nexport class SetVisitor extends Visitor {}\n\n/** @ignore */\nconst setEpochMsToDays = (data: Int32Array, index: number, epochMs: number) => { data[index] = (epochMs / 86400000) | 0; };\n/** @ignore */\nconst setEpochMsToMillisecondsLong = (data: Int32Array, index: number, epochMs: number) => {\n data[index] = (epochMs % 4294967296) | 0;\n data[index + 1] = (epochMs / 4294967296) | 0;\n};\n/** @ignore */\nconst setEpochMsToMicrosecondsLong = (data: Int32Array, index: number, epochMs: number) => {\n data[index] = ((epochMs * 1000) % 4294967296) | 0;\n data[index + 1] = ((epochMs * 1000) / 4294967296) | 0;\n};\n/** @ignore */\nconst setEpochMsToNanosecondsLong = (data: Int32Array, index: number, epochMs: number) => {\n data[index] = ((epochMs * 1000000) % 4294967296) | 0;\n data[index + 1] = ((epochMs * 1000000) / 4294967296) | 0;\n};\n\n/** @ignore */\nconst setVariableWidthBytes = (values: Uint8Array, valueOffsets: Int32Array, index: number, value: Uint8Array) => {\n const { [index]: x, [index + 1]: y } = valueOffsets;\n if (x != null && y != null) {\n values.set(value.subarray(0, y - x), x);\n }\n};\n\n/** @ignore */\nconst setBool = ({ offset, values }: VectorType, index: number, val: boolean) => {\n const idx = offset + index;\n val ? (values[idx >> 3] |= (1 << (idx % 8))) // true\n : (values[idx >> 3] &= ~(1 << (idx % 8))); // false\n\n};\n\n/** @ignore */ type Numeric1X = Int8 | Int16 | Int32 | Uint8 | Uint16 | Uint32 | Float32 | Float64;\n/** @ignore */ type Numeric2X = Int64 | Uint64;\n\n/** @ignore */\nconst setDateDay = ({ values }: VectorType, index: number, value: T['TValue']): void => { setEpochMsToDays(values, index, value.valueOf()); };\n/** @ignore */\nconst setDateMillisecond = ({ values }: VectorType, index: number, value: T['TValue']): void => { setEpochMsToMillisecondsLong(values, index * 2, value.valueOf()); };\n/** @ignore */\nconst setNumeric = ({ stride, values }: VectorType, index: number, value: T['TValue']): void => { values[stride * index] = value; };\n/** @ignore */\nconst setFloat16 = ({ stride, values }: VectorType, index: number, value: T['TValue']): void => { values[stride * index] = float64ToUint16(value); };\n/** @ignore */\nconst setNumericX2 = (vector: VectorType, index: number, value: T['TValue']): void => {\n switch (typeof value) {\n case 'bigint': vector.values64[index] = value; break;\n case 'number': vector.values[index * vector.stride] = value; break;\n default:\n const val = value as T['TArray'];\n const { stride, ArrayType } = vector;\n const long = toArrayBufferView(ArrayType, val);\n vector.values.set(long.subarray(0, stride), stride * index);\n }\n};\n/** @ignore */\nconst setFixedSizeBinary = ({ stride, values }: VectorType, index: number, value: T['TValue']): void => { values.set(value.subarray(0, stride), stride * index); };\n\n/** @ignore */\nconst setBinary = ({ values, valueOffsets }: VectorType, index: number, value: T['TValue']) => setVariableWidthBytes(values, valueOffsets, index, value);\n/** @ignore */\nconst setUtf8 = ({ values, valueOffsets }: VectorType, index: number, value: T['TValue']) => {\n setVariableWidthBytes(values, valueOffsets, index, encodeUtf8(value));\n};\n\n/* istanbul ignore next */\n/** @ignore */\nconst setInt = (vector: VectorType, index: number, value: T['TValue']): void => {\n vector.type.bitWidth < 64\n ? setNumeric(vector as VectorType, index, value as Numeric1X['TValue'])\n : setNumericX2(vector as VectorType, index, value as Numeric2X['TValue']);\n};\n\n/* istanbul ignore next */\n/** @ignore */\nconst setFloat = (vector: VectorType, index: number, value: T['TValue']): void => {\n vector.type.precision !== Precision.HALF\n ? setNumeric(vector as VectorType, index, value)\n : setFloat16(vector as VectorType, index, value);\n};\n\n/* istanbul ignore next */\nconst setDate = (vector: VectorType, index: number, value: T['TValue']): void => {\n vector.type.unit === DateUnit.DAY\n ? setDateDay(vector as VectorType, index, value)\n : setDateMillisecond(vector as VectorType, index, value);\n};\n\n/** @ignore */\nconst setTimestampSecond = ({ values }: VectorType, index: number, value: T['TValue']): void => setEpochMsToMillisecondsLong(values, index * 2, value / 1000);\n/** @ignore */\nconst setTimestampMillisecond = ({ values }: VectorType, index: number, value: T['TValue']): void => setEpochMsToMillisecondsLong(values, index * 2, value);\n/** @ignore */\nconst setTimestampMicrosecond = ({ values }: VectorType, index: number, value: T['TValue']): void => setEpochMsToMicrosecondsLong(values, index * 2, value);\n/** @ignore */\nconst setTimestampNanosecond = ({ values }: VectorType, index: number, value: T['TValue']): void => setEpochMsToNanosecondsLong(values, index * 2, value);\n/* istanbul ignore next */\n/** @ignore */\nconst setTimestamp = (vector: VectorType, index: number, value: T['TValue']): void => {\n switch (vector.type.unit) {\n case TimeUnit.SECOND: return setTimestampSecond(vector as VectorType, index, value);\n case TimeUnit.MILLISECOND: return setTimestampMillisecond(vector as VectorType, index, value);\n case TimeUnit.MICROSECOND: return setTimestampMicrosecond(vector as VectorType, index, value);\n case TimeUnit.NANOSECOND: return setTimestampNanosecond(vector as VectorType, index, value);\n }\n};\n\n/** @ignore */\nconst setTimeSecond = ({ values, stride }: VectorType, index: number, value: T['TValue']): void => { values[stride * index] = value; };\n/** @ignore */\nconst setTimeMillisecond = ({ values, stride }: VectorType, index: number, value: T['TValue']): void => { values[stride * index] = value; };\n/** @ignore */\nconst setTimeMicrosecond = ({ values }: VectorType, index: number, value: T['TValue']): void => { values.set(value.subarray(0, 2), 2 * index); };\n/** @ignore */\nconst setTimeNanosecond = ({ values }: VectorType, index: number, value: T['TValue']): void => { values.set(value.subarray(0, 2), 2 * index); };\n/* istanbul ignore next */\n/** @ignore */\nconst setTime = (vector: VectorType, index: number, value: T['TValue']): void => {\n switch (vector.type.unit) {\n case TimeUnit.SECOND: return setTimeSecond(vector as VectorType, index, value as TimeSecond['TValue']);\n case TimeUnit.MILLISECOND: return setTimeMillisecond(vector as VectorType, index, value as TimeMillisecond['TValue']);\n case TimeUnit.MICROSECOND: return setTimeMicrosecond(vector as VectorType, index, value as TimeMicrosecond['TValue']);\n case TimeUnit.NANOSECOND: return setTimeNanosecond(vector as VectorType, index, value as TimeNanosecond['TValue']);\n }\n};\n\n/** @ignore */\nconst setDecimal = ({ values }: VectorType, index: number, value: T['TValue']): void => { values.set(value.subarray(0, 4), 4 * index); };\n\n/** @ignore */\nconst setList = (vector: VectorType, index: number, value: T['TValue']): void => {\n const values = vector.getChildAt(0)!, valueOffsets = vector.valueOffsets;\n for (let idx = -1, itr = valueOffsets[index], end = valueOffsets[index + 1]; itr < end;) {\n values.set(itr++, value.get(++idx));\n }\n};\n\n/** @ignore */\nconst setMap = (vector: VectorType, index: number, value: T['TValue']) => {\n const values = vector.getChildAt(0)!, valueOffsets = vector.valueOffsets;\n const entries = value instanceof Map ? [...value] : Object.entries(value);\n for (let idx = -1, itr = valueOffsets[index], end = valueOffsets[index + 1]; itr < end;) {\n values.set(itr++, entries[++idx]);\n }\n};\n\n/** @ignore */ const _setStructArrayValue = (o: number, v: any[]) => (c: Vector | null, _: Field, i: number) => c && c.set(o, v[i]);\n/** @ignore */ const _setStructVectorValue = (o: number, v: Vector) => (c: Vector | null, _: Field, i: number) => c && c.set(o, v.get(i));\n/** @ignore */ const _setStructMapValue = (o: number, v: Map) => (c: Vector | null, f: Field, _: number) => c && c.set(o, v.get(f.name));\n/** @ignore */ const _setStructObjectValue = (o: number, v: { [key: string]: any }) => (c: Vector | null, f: Field, _: number) => c && c.set(o, v[f.name]);\n/** @ignore */\nconst setStruct = (vector: VectorType, index: number, value: T['TValue']) => {\n\n const setValue = value instanceof Map ? _setStructMapValue(index, value) :\n value instanceof Vector ? _setStructVectorValue(index, value) :\n Array.isArray(value) ? _setStructArrayValue(index, value) :\n _setStructObjectValue(index, value) ;\n\n vector.type.children.forEach((f: Field, i: number) => setValue(vector.getChildAt(i), f, i));\n};\n\n/* istanbul ignore next */\n/** @ignore */\nconst setUnion = <\n V extends VectorType | VectorType | VectorType\n>(vector: V, index: number, value: V['TValue']) => {\n vector.type.mode === UnionMode.Dense ?\n setDenseUnion(vector as VectorType, index, value) :\n setSparseUnion(vector as VectorType, index, value);\n};\n\n/** @ignore */\nconst setDenseUnion = (vector: VectorType, index: number, value: T['TValue']): void => {\n const childIndex = vector.typeIdToChildIndex[vector.typeIds[index]];\n const child = vector.getChildAt(childIndex);\n child && child.set(vector.valueOffsets[index], value);\n};\n\n/** @ignore */\nconst setSparseUnion = (vector: VectorType, index: number, value: T['TValue']): void => {\n const childIndex = vector.typeIdToChildIndex[vector.typeIds[index]];\n const child = vector.getChildAt(childIndex);\n child && child.set(index, value);\n};\n\n/** @ignore */\nconst setDictionary = (vector: VectorType, index: number, value: T['TValue']): void => {\n const key = vector.getKey(index);\n if (key !== null) {\n vector.setValue(key, value);\n }\n};\n\n/* istanbul ignore next */\n/** @ignore */\nconst setIntervalValue = (vector: VectorType, index: number, value: T['TValue']): void => {\n (vector.type.unit === IntervalUnit.DAY_TIME)\n ? setIntervalDayTime(vector as VectorType, index, value)\n : setIntervalYearMonth(vector as VectorType, index, value);\n};\n\n/** @ignore */\nconst setIntervalDayTime = ({ values }: VectorType, index: number, value: T['TValue']): void => { values.set(value.subarray(0, 2), 2 * index); };\n/** @ignore */\nconst setIntervalYearMonth = ({ values }: VectorType, index: number, value: T['TValue']): void => { values[index] = (value[0] * 12) + (value[1] % 12); };\n\n/** @ignore */\nconst setFixedSizeList = (vector: VectorType, index: number, value: T['TValue']): void => {\n const child = vector.getChildAt(0)!, { stride } = vector;\n for (let idx = -1, offset = index * stride; ++idx < stride;) {\n child.set(offset + idx, value.get(idx));\n }\n};\n\nSetVisitor.prototype.visitBool = setBool;\nSetVisitor.prototype.visitInt = setInt;\nSetVisitor.prototype.visitInt8 = setNumeric;\nSetVisitor.prototype.visitInt16 = setNumeric;\nSetVisitor.prototype.visitInt32 = setNumeric;\nSetVisitor.prototype.visitInt64 = setNumericX2;\nSetVisitor.prototype.visitUint8 = setNumeric;\nSetVisitor.prototype.visitUint16 = setNumeric;\nSetVisitor.prototype.visitUint32 = setNumeric;\nSetVisitor.prototype.visitUint64 = setNumericX2;\nSetVisitor.prototype.visitFloat = setFloat;\nSetVisitor.prototype.visitFloat16 = setFloat16;\nSetVisitor.prototype.visitFloat32 = setNumeric;\nSetVisitor.prototype.visitFloat64 = setNumeric;\nSetVisitor.prototype.visitUtf8 = setUtf8;\nSetVisitor.prototype.visitBinary = setBinary;\nSetVisitor.prototype.visitFixedSizeBinary = setFixedSizeBinary;\nSetVisitor.prototype.visitDate = setDate;\nSetVisitor.prototype.visitDateDay = setDateDay;\nSetVisitor.prototype.visitDateMillisecond = setDateMillisecond;\nSetVisitor.prototype.visitTimestamp = setTimestamp;\nSetVisitor.prototype.visitTimestampSecond = setTimestampSecond;\nSetVisitor.prototype.visitTimestampMillisecond = setTimestampMillisecond;\nSetVisitor.prototype.visitTimestampMicrosecond = setTimestampMicrosecond;\nSetVisitor.prototype.visitTimestampNanosecond = setTimestampNanosecond;\nSetVisitor.prototype.visitTime = setTime;\nSetVisitor.prototype.visitTimeSecond = setTimeSecond;\nSetVisitor.prototype.visitTimeMillisecond = setTimeMillisecond;\nSetVisitor.prototype.visitTimeMicrosecond = setTimeMicrosecond;\nSetVisitor.prototype.visitTimeNanosecond = setTimeNanosecond;\nSetVisitor.prototype.visitDecimal = setDecimal;\nSetVisitor.prototype.visitList = setList;\nSetVisitor.prototype.visitStruct = setStruct;\nSetVisitor.prototype.visitUnion = setUnion;\nSetVisitor.prototype.visitDenseUnion = setDenseUnion;\nSetVisitor.prototype.visitSparseUnion = setSparseUnion;\nSetVisitor.prototype.visitDictionary = setDictionary;\nSetVisitor.prototype.visitInterval = setIntervalValue;\nSetVisitor.prototype.visitIntervalDayTime = setIntervalDayTime;\nSetVisitor.prototype.visitIntervalYearMonth = setIntervalYearMonth;\nSetVisitor.prototype.visitFixedSizeList = setFixedSizeList;\nSetVisitor.prototype.visitMap = setMap;\n\n/** @ignore */\nexport const instance = new SetVisitor();\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/toarray.d.ts b/frontend/node_modules/apache-arrow/visitor/toarray.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..add74ce91ac9aed5d070f6c03ef70c9d45fab46b --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/toarray.d.ts @@ -0,0 +1,60 @@ +import { Data } from '../data'; +import { Type } from '../enum'; +import { Visitor } from '../visitor'; +import { VectorType } from '../interfaces'; +import { DataType, Dictionary, Bool, Null, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct, Float, Float16, Float32, Float64, Int, Uint8, Uint16, Uint32, Uint64, Int8, Int16, Int32, Int64, Date_, DateDay, DateMillisecond, Interval, IntervalDayTime, IntervalYearMonth, Time, TimeSecond, TimeMillisecond, TimeMicrosecond, TimeNanosecond, Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond, Union, DenseUnion, SparseUnion } from '../type'; +/** @ignore */ +export interface ToArrayVisitor extends Visitor { + visit(node: T): T['TArray']; + visitMany(nodes: T[]): T['TArray'][]; + getVisitFn(node: T): (vector: VectorType) => VectorType['TArray']; + getVisitFn(node: VectorType | Data | T): (vector: VectorType) => VectorType['TArray']; + visitNull(vector: VectorType): VectorType['TArray']; + visitBool(vector: VectorType): VectorType['TArray']; + visitInt(vector: VectorType): VectorType['TArray']; + visitInt8(vector: VectorType): VectorType['TArray']; + visitInt16(vector: VectorType): VectorType['TArray']; + visitInt32(vector: VectorType): VectorType['TArray']; + visitInt64(vector: VectorType): VectorType['TArray']; + visitUint8(vector: VectorType): VectorType['TArray']; + visitUint16(vector: VectorType): VectorType['TArray']; + visitUint32(vector: VectorType): VectorType['TArray']; + visitUint64(vector: VectorType): VectorType['TArray']; + visitFloat(vector: VectorType): VectorType['TArray']; + visitFloat16(vector: VectorType): VectorType['TArray']; + visitFloat32(vector: VectorType): VectorType['TArray']; + visitFloat64(vector: VectorType): VectorType['TArray']; + visitUtf8(vector: VectorType): VectorType['TArray']; + visitBinary(vector: VectorType): VectorType['TArray']; + visitFixedSizeBinary(vector: VectorType): VectorType['TArray']; + visitDate(vector: VectorType): VectorType['TArray']; + visitDateDay(vector: VectorType): VectorType['TArray']; + visitDateMillisecond(vector: VectorType): VectorType['TArray']; + visitTimestamp(vector: VectorType): VectorType['TArray']; + visitTimestampSecond(vector: VectorType): VectorType['TArray']; + visitTimestampMillisecond(vector: VectorType): VectorType['TArray']; + visitTimestampMicrosecond(vector: VectorType): VectorType['TArray']; + visitTimestampNanosecond(vector: VectorType): VectorType['TArray']; + visitTime(vector: VectorType): VectorType['TArray']; + visitTimeSecond(vector: VectorType): VectorType['TArray']; + visitTimeMillisecond(vector: VectorType): VectorType['TArray']; + visitTimeMicrosecond(vector: VectorType): VectorType['TArray']; + visitTimeNanosecond(vector: VectorType): VectorType['TArray']; + visitDecimal(vector: VectorType): VectorType['TArray']; + visitList>(vector: VectorType): VectorType['TArray']; + visitStruct(vector: VectorType): VectorType['TArray']; + visitUnion(vector: VectorType): VectorType['TArray']; + visitDenseUnion(vector: VectorType): VectorType['TArray']; + visitSparseUnion(vector: VectorType): VectorType['TArray']; + visitDictionary>(vector: VectorType): VectorType['TArray']; + visitInterval(vector: VectorType): VectorType['TArray']; + visitIntervalDayTime(vector: VectorType): VectorType['TArray']; + visitIntervalYearMonth(vector: VectorType): VectorType['TArray']; + visitFixedSizeList>(vector: VectorType): VectorType['TArray']; + visitMap(vector: VectorType): VectorType['TArray']; +} +/** @ignore */ +export declare class ToArrayVisitor extends Visitor { +} +/** @ignore */ +export declare const instance: ToArrayVisitor; diff --git a/frontend/node_modules/apache-arrow/visitor/toarray.js b/frontend/node_modules/apache-arrow/visitor/toarray.js new file mode 100644 index 0000000000000000000000000000000000000000..b9c412d6e87f4339d21e432c4df7572830a74268 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/toarray.js @@ -0,0 +1,87 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const enum_1 = require("../enum"); +const visitor_1 = require("../visitor"); +const iterator_1 = require("./iterator"); +/** @ignore */ +class ToArrayVisitor extends visitor_1.Visitor { +} +exports.ToArrayVisitor = ToArrayVisitor; +/** @ignore */ +function arrayOfVector(vector) { + const { type, length, stride } = vector; + // Fast case, return subarray if possible + switch (type.typeId) { + case enum_1.Type.Int: + case enum_1.Type.Float: + case enum_1.Type.Decimal: + case enum_1.Type.Time: + case enum_1.Type.Timestamp: + return vector.values.subarray(0, length * stride); + } + // Otherwise if not primitive, slow copy + return [...iterator_1.instance.visit(vector)]; +} +ToArrayVisitor.prototype.visitNull = arrayOfVector; +ToArrayVisitor.prototype.visitBool = arrayOfVector; +ToArrayVisitor.prototype.visitInt = arrayOfVector; +ToArrayVisitor.prototype.visitInt8 = arrayOfVector; +ToArrayVisitor.prototype.visitInt16 = arrayOfVector; +ToArrayVisitor.prototype.visitInt32 = arrayOfVector; +ToArrayVisitor.prototype.visitInt64 = arrayOfVector; +ToArrayVisitor.prototype.visitUint8 = arrayOfVector; +ToArrayVisitor.prototype.visitUint16 = arrayOfVector; +ToArrayVisitor.prototype.visitUint32 = arrayOfVector; +ToArrayVisitor.prototype.visitUint64 = arrayOfVector; +ToArrayVisitor.prototype.visitFloat = arrayOfVector; +ToArrayVisitor.prototype.visitFloat16 = arrayOfVector; +ToArrayVisitor.prototype.visitFloat32 = arrayOfVector; +ToArrayVisitor.prototype.visitFloat64 = arrayOfVector; +ToArrayVisitor.prototype.visitUtf8 = arrayOfVector; +ToArrayVisitor.prototype.visitBinary = arrayOfVector; +ToArrayVisitor.prototype.visitFixedSizeBinary = arrayOfVector; +ToArrayVisitor.prototype.visitDate = arrayOfVector; +ToArrayVisitor.prototype.visitDateDay = arrayOfVector; +ToArrayVisitor.prototype.visitDateMillisecond = arrayOfVector; +ToArrayVisitor.prototype.visitTimestamp = arrayOfVector; +ToArrayVisitor.prototype.visitTimestampSecond = arrayOfVector; +ToArrayVisitor.prototype.visitTimestampMillisecond = arrayOfVector; +ToArrayVisitor.prototype.visitTimestampMicrosecond = arrayOfVector; +ToArrayVisitor.prototype.visitTimestampNanosecond = arrayOfVector; +ToArrayVisitor.prototype.visitTime = arrayOfVector; +ToArrayVisitor.prototype.visitTimeSecond = arrayOfVector; +ToArrayVisitor.prototype.visitTimeMillisecond = arrayOfVector; +ToArrayVisitor.prototype.visitTimeMicrosecond = arrayOfVector; +ToArrayVisitor.prototype.visitTimeNanosecond = arrayOfVector; +ToArrayVisitor.prototype.visitDecimal = arrayOfVector; +ToArrayVisitor.prototype.visitList = arrayOfVector; +ToArrayVisitor.prototype.visitStruct = arrayOfVector; +ToArrayVisitor.prototype.visitUnion = arrayOfVector; +ToArrayVisitor.prototype.visitDenseUnion = arrayOfVector; +ToArrayVisitor.prototype.visitSparseUnion = arrayOfVector; +ToArrayVisitor.prototype.visitDictionary = arrayOfVector; +ToArrayVisitor.prototype.visitInterval = arrayOfVector; +ToArrayVisitor.prototype.visitIntervalDayTime = arrayOfVector; +ToArrayVisitor.prototype.visitIntervalYearMonth = arrayOfVector; +ToArrayVisitor.prototype.visitFixedSizeList = arrayOfVector; +ToArrayVisitor.prototype.visitMap = arrayOfVector; +/** @ignore */ +exports.instance = new ToArrayVisitor(); + +//# sourceMappingURL=toarray.js.map diff --git a/frontend/node_modules/apache-arrow/visitor/toarray.js.map b/frontend/node_modules/apache-arrow/visitor/toarray.js.map new file mode 100644 index 0000000000000000000000000000000000000000..af159cdbedde12c756551640d03c942532559faf --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/toarray.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor/toarray.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBA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,SAAS,CAAC,SAAS,GAAmB,aAAa,CAAC;AACnE,cAAc,CAAC,SAAS,CAAC,WAAW,GAAiB,aAAa,CAAC;AACnE,cAAc,CAAC,SAAS,CAAC,UAAU,GAAkB,aAAa,CAAC;AACnE,cAAc,CAAC,SAAS,CAAC,eAAe,GAAa,aAAa,CAAC;AACnE,cAAc,CAAC,SAAS,CAAC,gBAAgB,GAAY,aAAa,CAAC;AACnE,cAAc,CAAC,SAAS,CAAC,eAAe,GAAa,aAAa,CAAC;AACnE,cAAc,CAAC,SAAS,CAAC,aAAa,GAAe,aAAa,CAAC;AACnE,cAAc,CAAC,SAAS,CAAC,oBAAoB,GAAQ,aAAa,CAAC;AACnE,cAAc,CAAC,SAAS,CAAC,sBAAsB,GAAM,aAAa,CAAC;AACnE,cAAc,CAAC,SAAS,CAAC,kBAAkB,GAAU,aAAa,CAAC;AACnE,cAAc,CAAC,SAAS,CAAC,QAAQ,GAAoB,aAAa,CAAC;AAEnE,cAAc;AACD,QAAA,QAAQ,GAAG,IAAI,cAAc,EAAE,CAAC","file":"toarray.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Type } from '../enum';\nimport { Visitor } from '../visitor';\nimport { VectorType } from '../interfaces';\nimport { instance as iteratorVisitor } from './iterator';\nimport {\n DataType, Dictionary,\n Bool, Null, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct,\n Float, Float16, Float32, Float64,\n Int, Uint8, Uint16, Uint32, Uint64, Int8, Int16, Int32, Int64,\n Date_, DateDay, DateMillisecond,\n Interval, IntervalDayTime, IntervalYearMonth,\n Time, TimeSecond, TimeMillisecond, TimeMicrosecond, TimeNanosecond,\n Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond,\n Union, DenseUnion, SparseUnion,\n} from '../type';\n\n/** @ignore */\nexport interface ToArrayVisitor extends Visitor {\n visit(node: T): T['TArray'];\n visitMany(nodes: T[]): T['TArray'][];\n getVisitFn(node: T): (vector: VectorType) => VectorType['TArray'];\n getVisitFn(node: VectorType | Data | T): (vector: VectorType) => VectorType['TArray'];\n visitNull (vector: VectorType): VectorType['TArray'];\n visitBool (vector: VectorType): VectorType['TArray'];\n visitInt (vector: VectorType): VectorType['TArray'];\n visitInt8 (vector: VectorType): VectorType['TArray'];\n visitInt16 (vector: VectorType): VectorType['TArray'];\n visitInt32 (vector: VectorType): VectorType['TArray'];\n visitInt64 (vector: VectorType): VectorType['TArray'];\n visitUint8 (vector: VectorType): VectorType['TArray'];\n visitUint16 (vector: VectorType): VectorType['TArray'];\n visitUint32 (vector: VectorType): VectorType['TArray'];\n visitUint64 (vector: VectorType): VectorType['TArray'];\n visitFloat (vector: VectorType): VectorType['TArray'];\n visitFloat16 (vector: VectorType): VectorType['TArray'];\n visitFloat32 (vector: VectorType): VectorType['TArray'];\n visitFloat64 (vector: VectorType): VectorType['TArray'];\n visitUtf8 (vector: VectorType): VectorType['TArray'];\n visitBinary (vector: VectorType): VectorType['TArray'];\n visitFixedSizeBinary (vector: VectorType): VectorType['TArray'];\n visitDate (vector: VectorType): VectorType['TArray'];\n visitDateDay (vector: VectorType): VectorType['TArray'];\n visitDateMillisecond (vector: VectorType): VectorType['TArray'];\n visitTimestamp (vector: VectorType): VectorType['TArray'];\n visitTimestampSecond (vector: VectorType): VectorType['TArray'];\n visitTimestampMillisecond (vector: VectorType): VectorType['TArray'];\n visitTimestampMicrosecond (vector: VectorType): VectorType['TArray'];\n visitTimestampNanosecond (vector: VectorType): VectorType['TArray'];\n visitTime (vector: VectorType): VectorType['TArray'];\n visitTimeSecond (vector: VectorType): VectorType['TArray'];\n visitTimeMillisecond (vector: VectorType): VectorType['TArray'];\n visitTimeMicrosecond (vector: VectorType): VectorType['TArray'];\n visitTimeNanosecond (vector: VectorType): VectorType['TArray'];\n visitDecimal (vector: VectorType): VectorType['TArray'];\n visitList > (vector: VectorType): VectorType['TArray'];\n visitStruct (vector: VectorType): VectorType['TArray'];\n visitUnion (vector: VectorType): VectorType['TArray'];\n visitDenseUnion (vector: VectorType): VectorType['TArray'];\n visitSparseUnion (vector: VectorType): VectorType['TArray'];\n visitDictionary > (vector: VectorType): VectorType['TArray'];\n visitInterval (vector: VectorType): VectorType['TArray'];\n visitIntervalDayTime (vector: VectorType): VectorType['TArray'];\n visitIntervalYearMonth (vector: VectorType): VectorType['TArray'];\n visitFixedSizeList > (vector: VectorType): VectorType['TArray'];\n visitMap (vector: VectorType): VectorType['TArray'];\n}\n\n/** @ignore */\nexport class ToArrayVisitor extends Visitor {}\n\n/** @ignore */\nfunction arrayOfVector(vector: VectorType): T['TArray'] {\n\n const { type, length, stride } = vector;\n\n // Fast case, return subarray if possible\n switch (type.typeId) {\n case Type.Int:\n case Type.Float: case Type.Decimal:\n case Type.Time: case Type.Timestamp:\n return vector.values.subarray(0, length * stride);\n }\n\n // Otherwise if not primitive, slow copy\n return [...iteratorVisitor.visit(vector)] as T['TArray'];\n}\n\nToArrayVisitor.prototype.visitNull = arrayOfVector;\nToArrayVisitor.prototype.visitBool = arrayOfVector;\nToArrayVisitor.prototype.visitInt = arrayOfVector;\nToArrayVisitor.prototype.visitInt8 = arrayOfVector;\nToArrayVisitor.prototype.visitInt16 = arrayOfVector;\nToArrayVisitor.prototype.visitInt32 = arrayOfVector;\nToArrayVisitor.prototype.visitInt64 = arrayOfVector;\nToArrayVisitor.prototype.visitUint8 = arrayOfVector;\nToArrayVisitor.prototype.visitUint16 = arrayOfVector;\nToArrayVisitor.prototype.visitUint32 = arrayOfVector;\nToArrayVisitor.prototype.visitUint64 = arrayOfVector;\nToArrayVisitor.prototype.visitFloat = arrayOfVector;\nToArrayVisitor.prototype.visitFloat16 = arrayOfVector;\nToArrayVisitor.prototype.visitFloat32 = arrayOfVector;\nToArrayVisitor.prototype.visitFloat64 = arrayOfVector;\nToArrayVisitor.prototype.visitUtf8 = arrayOfVector;\nToArrayVisitor.prototype.visitBinary = arrayOfVector;\nToArrayVisitor.prototype.visitFixedSizeBinary = arrayOfVector;\nToArrayVisitor.prototype.visitDate = arrayOfVector;\nToArrayVisitor.prototype.visitDateDay = arrayOfVector;\nToArrayVisitor.prototype.visitDateMillisecond = arrayOfVector;\nToArrayVisitor.prototype.visitTimestamp = arrayOfVector;\nToArrayVisitor.prototype.visitTimestampSecond = arrayOfVector;\nToArrayVisitor.prototype.visitTimestampMillisecond = arrayOfVector;\nToArrayVisitor.prototype.visitTimestampMicrosecond = arrayOfVector;\nToArrayVisitor.prototype.visitTimestampNanosecond = arrayOfVector;\nToArrayVisitor.prototype.visitTime = arrayOfVector;\nToArrayVisitor.prototype.visitTimeSecond = arrayOfVector;\nToArrayVisitor.prototype.visitTimeMillisecond = arrayOfVector;\nToArrayVisitor.prototype.visitTimeMicrosecond = arrayOfVector;\nToArrayVisitor.prototype.visitTimeNanosecond = arrayOfVector;\nToArrayVisitor.prototype.visitDecimal = arrayOfVector;\nToArrayVisitor.prototype.visitList = arrayOfVector;\nToArrayVisitor.prototype.visitStruct = arrayOfVector;\nToArrayVisitor.prototype.visitUnion = arrayOfVector;\nToArrayVisitor.prototype.visitDenseUnion = arrayOfVector;\nToArrayVisitor.prototype.visitSparseUnion = arrayOfVector;\nToArrayVisitor.prototype.visitDictionary = arrayOfVector;\nToArrayVisitor.prototype.visitInterval = arrayOfVector;\nToArrayVisitor.prototype.visitIntervalDayTime = arrayOfVector;\nToArrayVisitor.prototype.visitIntervalYearMonth = arrayOfVector;\nToArrayVisitor.prototype.visitFixedSizeList = arrayOfVector;\nToArrayVisitor.prototype.visitMap = arrayOfVector;\n\n/** @ignore */\nexport const instance = new ToArrayVisitor();\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/toarray.mjs b/frontend/node_modules/apache-arrow/visitor/toarray.mjs new file mode 100644 index 0000000000000000000000000000000000000000..316b0f2b4084b4a0dc13f545486ad5f777ac2f60 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/toarray.mjs @@ -0,0 +1,84 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { Type } from '../enum'; +import { Visitor } from '../visitor'; +import { instance as iteratorVisitor } from './iterator'; +/** @ignore */ +export class ToArrayVisitor extends Visitor { +} +/** @ignore */ +function arrayOfVector(vector) { + const { type, length, stride } = vector; + // Fast case, return subarray if possible + switch (type.typeId) { + case Type.Int: + case Type.Float: + case Type.Decimal: + case Type.Time: + case Type.Timestamp: + return vector.values.subarray(0, length * stride); + } + // Otherwise if not primitive, slow copy + return [...iteratorVisitor.visit(vector)]; +} +ToArrayVisitor.prototype.visitNull = arrayOfVector; +ToArrayVisitor.prototype.visitBool = arrayOfVector; +ToArrayVisitor.prototype.visitInt = arrayOfVector; +ToArrayVisitor.prototype.visitInt8 = arrayOfVector; +ToArrayVisitor.prototype.visitInt16 = arrayOfVector; +ToArrayVisitor.prototype.visitInt32 = arrayOfVector; +ToArrayVisitor.prototype.visitInt64 = arrayOfVector; +ToArrayVisitor.prototype.visitUint8 = arrayOfVector; +ToArrayVisitor.prototype.visitUint16 = arrayOfVector; +ToArrayVisitor.prototype.visitUint32 = arrayOfVector; +ToArrayVisitor.prototype.visitUint64 = arrayOfVector; +ToArrayVisitor.prototype.visitFloat = arrayOfVector; +ToArrayVisitor.prototype.visitFloat16 = arrayOfVector; +ToArrayVisitor.prototype.visitFloat32 = arrayOfVector; +ToArrayVisitor.prototype.visitFloat64 = arrayOfVector; +ToArrayVisitor.prototype.visitUtf8 = arrayOfVector; +ToArrayVisitor.prototype.visitBinary = arrayOfVector; +ToArrayVisitor.prototype.visitFixedSizeBinary = arrayOfVector; +ToArrayVisitor.prototype.visitDate = arrayOfVector; +ToArrayVisitor.prototype.visitDateDay = arrayOfVector; +ToArrayVisitor.prototype.visitDateMillisecond = arrayOfVector; +ToArrayVisitor.prototype.visitTimestamp = arrayOfVector; +ToArrayVisitor.prototype.visitTimestampSecond = arrayOfVector; +ToArrayVisitor.prototype.visitTimestampMillisecond = arrayOfVector; +ToArrayVisitor.prototype.visitTimestampMicrosecond = arrayOfVector; +ToArrayVisitor.prototype.visitTimestampNanosecond = arrayOfVector; +ToArrayVisitor.prototype.visitTime = arrayOfVector; +ToArrayVisitor.prototype.visitTimeSecond = arrayOfVector; +ToArrayVisitor.prototype.visitTimeMillisecond = arrayOfVector; +ToArrayVisitor.prototype.visitTimeMicrosecond = arrayOfVector; +ToArrayVisitor.prototype.visitTimeNanosecond = arrayOfVector; +ToArrayVisitor.prototype.visitDecimal = arrayOfVector; +ToArrayVisitor.prototype.visitList = arrayOfVector; +ToArrayVisitor.prototype.visitStruct = arrayOfVector; +ToArrayVisitor.prototype.visitUnion = arrayOfVector; +ToArrayVisitor.prototype.visitDenseUnion = arrayOfVector; +ToArrayVisitor.prototype.visitSparseUnion = arrayOfVector; +ToArrayVisitor.prototype.visitDictionary = arrayOfVector; +ToArrayVisitor.prototype.visitInterval = arrayOfVector; +ToArrayVisitor.prototype.visitIntervalDayTime = arrayOfVector; +ToArrayVisitor.prototype.visitIntervalYearMonth = arrayOfVector; +ToArrayVisitor.prototype.visitFixedSizeList = arrayOfVector; +ToArrayVisitor.prototype.visitMap = arrayOfVector; +/** @ignore */ +export const instance = new ToArrayVisitor(); + +//# sourceMappingURL=toarray.mjs.map diff --git a/frontend/node_modules/apache-arrow/visitor/toarray.mjs.map b/frontend/node_modules/apache-arrow/visitor/toarray.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..26e74dd702d7fdeac469bb7f514a5b84be85b52d --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/toarray.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor/toarray.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAGrB,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,QAAQ,IAAI,eAAe,EAAE,MAAM,YAAY,CAAC;AAgEzD,cAAc;AACd,MAAM,OAAO,cAAe,SAAQ,OAAO;CAAG;AAE9C,cAAc;AACd,SAAS,aAAa,CAAqB,MAAqB;IAE5D,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAExC,yCAAyC;IACzC,QAAQ,IAAI,CAAC,MAAM,EAAE;QACjB,KAAK,IAAI,CAAC,GAAG,CAAC;QACd,KAAK,IAAI,CAAC,KAAK,CAAC;QAAC,KAAK,IAAI,CAAC,OAAO,CAAC;QACnC,KAAK,IAAI,CAAC,IAAI,CAAC;QAAC,KAAK,IAAI,CAAC,SAAS;YAC/B,OAAO,MAAM,CAAC,MAAM,C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AAC,SAAS,CAAC,kBAAkB,GAAU,aAAa,CAAC;AACnE,cAAc,CAAC,SAAS,CAAC,QAAQ,GAAoB,aAAa,CAAC;AAEnE,cAAc;AACd,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,cAAc,EAAE,CAAC","file":"toarray.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Type } from '../enum';\nimport { Visitor } from '../visitor';\nimport { VectorType } from '../interfaces';\nimport { instance as iteratorVisitor } from './iterator';\nimport {\n DataType, Dictionary,\n Bool, Null, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct,\n Float, Float16, Float32, Float64,\n Int, Uint8, Uint16, Uint32, Uint64, Int8, Int16, Int32, Int64,\n Date_, DateDay, DateMillisecond,\n Interval, IntervalDayTime, IntervalYearMonth,\n Time, TimeSecond, TimeMillisecond, TimeMicrosecond, TimeNanosecond,\n Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond,\n Union, DenseUnion, SparseUnion,\n} from '../type';\n\n/** @ignore */\nexport interface ToArrayVisitor extends Visitor {\n visit(node: T): T['TArray'];\n visitMany(nodes: T[]): T['TArray'][];\n getVisitFn(node: T): (vector: VectorType) => VectorType['TArray'];\n getVisitFn(node: VectorType | Data | T): (vector: VectorType) => VectorType['TArray'];\n visitNull (vector: VectorType): VectorType['TArray'];\n visitBool (vector: VectorType): VectorType['TArray'];\n visitInt (vector: VectorType): VectorType['TArray'];\n visitInt8 (vector: VectorType): VectorType['TArray'];\n visitInt16 (vector: VectorType): VectorType['TArray'];\n visitInt32 (vector: VectorType): VectorType['TArray'];\n visitInt64 (vector: VectorType): VectorType['TArray'];\n visitUint8 (vector: VectorType): VectorType['TArray'];\n visitUint16 (vector: VectorType): VectorType['TArray'];\n visitUint32 (vector: VectorType): VectorType['TArray'];\n visitUint64 (vector: VectorType): VectorType['TArray'];\n visitFloat (vector: VectorType): VectorType['TArray'];\n visitFloat16 (vector: VectorType): VectorType['TArray'];\n visitFloat32 (vector: VectorType): VectorType['TArray'];\n visitFloat64 (vector: VectorType): VectorType['TArray'];\n visitUtf8 (vector: VectorType): VectorType['TArray'];\n visitBinary (vector: VectorType): VectorType['TArray'];\n visitFixedSizeBinary (vector: VectorType): VectorType['TArray'];\n visitDate (vector: VectorType): VectorType['TArray'];\n visitDateDay (vector: VectorType): VectorType['TArray'];\n visitDateMillisecond (vector: VectorType): VectorType['TArray'];\n visitTimestamp (vector: VectorType): VectorType['TArray'];\n visitTimestampSecond (vector: VectorType): VectorType['TArray'];\n visitTimestampMillisecond (vector: VectorType): VectorType['TArray'];\n visitTimestampMicrosecond (vector: VectorType): VectorType['TArray'];\n visitTimestampNanosecond (vector: VectorType): VectorType['TArray'];\n visitTime (vector: VectorType): VectorType['TArray'];\n visitTimeSecond (vector: VectorType): VectorType['TArray'];\n visitTimeMillisecond (vector: VectorType): VectorType['TArray'];\n visitTimeMicrosecond (vector: VectorType): VectorType['TArray'];\n visitTimeNanosecond (vector: VectorType): VectorType['TArray'];\n visitDecimal (vector: VectorType): VectorType['TArray'];\n visitList > (vector: VectorType): VectorType['TArray'];\n visitStruct (vector: VectorType): VectorType['TArray'];\n visitUnion (vector: VectorType): VectorType['TArray'];\n visitDenseUnion (vector: VectorType): VectorType['TArray'];\n visitSparseUnion (vector: VectorType): VectorType['TArray'];\n visitDictionary > (vector: VectorType): VectorType['TArray'];\n visitInterval (vector: VectorType): VectorType['TArray'];\n visitIntervalDayTime (vector: VectorType): VectorType['TArray'];\n visitIntervalYearMonth (vector: VectorType): VectorType['TArray'];\n visitFixedSizeList > (vector: VectorType): VectorType['TArray'];\n visitMap (vector: VectorType): VectorType['TArray'];\n}\n\n/** @ignore */\nexport class ToArrayVisitor extends Visitor {}\n\n/** @ignore */\nfunction arrayOfVector(vector: VectorType): T['TArray'] {\n\n const { type, length, stride } = vector;\n\n // Fast case, return subarray if possible\n switch (type.typeId) {\n case Type.Int:\n case Type.Float: case Type.Decimal:\n case Type.Time: case Type.Timestamp:\n return vector.values.subarray(0, length * stride);\n }\n\n // Otherwise if not primitive, slow copy\n return [...iteratorVisitor.visit(vector)] as T['TArray'];\n}\n\nToArrayVisitor.prototype.visitNull = arrayOfVector;\nToArrayVisitor.prototype.visitBool = arrayOfVector;\nToArrayVisitor.prototype.visitInt = arrayOfVector;\nToArrayVisitor.prototype.visitInt8 = arrayOfVector;\nToArrayVisitor.prototype.visitInt16 = arrayOfVector;\nToArrayVisitor.prototype.visitInt32 = arrayOfVector;\nToArrayVisitor.prototype.visitInt64 = arrayOfVector;\nToArrayVisitor.prototype.visitUint8 = arrayOfVector;\nToArrayVisitor.prototype.visitUint16 = arrayOfVector;\nToArrayVisitor.prototype.visitUint32 = arrayOfVector;\nToArrayVisitor.prototype.visitUint64 = arrayOfVector;\nToArrayVisitor.prototype.visitFloat = arrayOfVector;\nToArrayVisitor.prototype.visitFloat16 = arrayOfVector;\nToArrayVisitor.prototype.visitFloat32 = arrayOfVector;\nToArrayVisitor.prototype.visitFloat64 = arrayOfVector;\nToArrayVisitor.prototype.visitUtf8 = arrayOfVector;\nToArrayVisitor.prototype.visitBinary = arrayOfVector;\nToArrayVisitor.prototype.visitFixedSizeBinary = arrayOfVector;\nToArrayVisitor.prototype.visitDate = arrayOfVector;\nToArrayVisitor.prototype.visitDateDay = arrayOfVector;\nToArrayVisitor.prototype.visitDateMillisecond = arrayOfVector;\nToArrayVisitor.prototype.visitTimestamp = arrayOfVector;\nToArrayVisitor.prototype.visitTimestampSecond = arrayOfVector;\nToArrayVisitor.prototype.visitTimestampMillisecond = arrayOfVector;\nToArrayVisitor.prototype.visitTimestampMicrosecond = arrayOfVector;\nToArrayVisitor.prototype.visitTimestampNanosecond = arrayOfVector;\nToArrayVisitor.prototype.visitTime = arrayOfVector;\nToArrayVisitor.prototype.visitTimeSecond = arrayOfVector;\nToArrayVisitor.prototype.visitTimeMillisecond = arrayOfVector;\nToArrayVisitor.prototype.visitTimeMicrosecond = arrayOfVector;\nToArrayVisitor.prototype.visitTimeNanosecond = arrayOfVector;\nToArrayVisitor.prototype.visitDecimal = arrayOfVector;\nToArrayVisitor.prototype.visitList = arrayOfVector;\nToArrayVisitor.prototype.visitStruct = arrayOfVector;\nToArrayVisitor.prototype.visitUnion = arrayOfVector;\nToArrayVisitor.prototype.visitDenseUnion = arrayOfVector;\nToArrayVisitor.prototype.visitSparseUnion = arrayOfVector;\nToArrayVisitor.prototype.visitDictionary = arrayOfVector;\nToArrayVisitor.prototype.visitInterval = arrayOfVector;\nToArrayVisitor.prototype.visitIntervalDayTime = arrayOfVector;\nToArrayVisitor.prototype.visitIntervalYearMonth = arrayOfVector;\nToArrayVisitor.prototype.visitFixedSizeList = arrayOfVector;\nToArrayVisitor.prototype.visitMap = arrayOfVector;\n\n/** @ignore */\nexport const instance = new ToArrayVisitor();\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/typeassembler.d.ts b/frontend/node_modules/apache-arrow/visitor/typeassembler.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..293f9565d6a967de784fedc0ee3c6c88c336c494 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/typeassembler.d.ts @@ -0,0 +1,31 @@ +import { flatbuffers } from 'flatbuffers'; +import Builder = flatbuffers.Builder; +import * as type from '../type'; +import { Visitor } from '../visitor'; +/** @ignore */ +export interface TypeAssembler extends Visitor { + visit(node: T, builder: Builder): number | undefined; +} +/** @ignore */ +export declare class TypeAssembler extends Visitor { + visitNull(_node: T, b: Builder): number; + visitInt(node: T, b: Builder): number; + visitFloat(node: T, b: Builder): number; + visitBinary(_node: T, b: Builder): number; + visitBool(_node: T, b: Builder): number; + visitUtf8(_node: T, b: Builder): number; + visitDecimal(node: T, b: Builder): number; + visitDate(node: T, b: Builder): number; + visitTime(node: T, b: Builder): number; + visitTimestamp(node: T, b: Builder): number; + visitInterval(node: T, b: Builder): number; + visitList(_node: T, b: Builder): number; + visitStruct(_node: T, b: Builder): number; + visitUnion(node: T, b: Builder): number; + visitDictionary(node: T, b: Builder): number; + visitFixedSizeBinary(node: T, b: Builder): number; + visitFixedSizeList(node: T, b: Builder): number; + visitMap(node: T, b: Builder): number; +} +/** @ignore */ +export declare const instance: TypeAssembler; diff --git a/frontend/node_modules/apache-arrow/visitor/typeassembler.js b/frontend/node_modules/apache-arrow/visitor/typeassembler.js new file mode 100644 index 0000000000000000000000000000000000000000..fcbfbc5e2368b69173e36d86ef8da289b3505319 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/typeassembler.js @@ -0,0 +1,150 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const flatbuffers_1 = require("flatbuffers"); +var Long = flatbuffers_1.flatbuffers.Long; +const Schema_ = require("../fb/Schema"); +const visitor_1 = require("../visitor"); +var Null = Schema_.org.apache.arrow.flatbuf.Null; +var Int = Schema_.org.apache.arrow.flatbuf.Int; +var FloatingPoint = Schema_.org.apache.arrow.flatbuf.FloatingPoint; +var Binary = Schema_.org.apache.arrow.flatbuf.Binary; +var Bool = Schema_.org.apache.arrow.flatbuf.Bool; +var Utf8 = Schema_.org.apache.arrow.flatbuf.Utf8; +var Decimal = Schema_.org.apache.arrow.flatbuf.Decimal; +var Date = Schema_.org.apache.arrow.flatbuf.Date; +var Time = Schema_.org.apache.arrow.flatbuf.Time; +var Timestamp = Schema_.org.apache.arrow.flatbuf.Timestamp; +var Interval = Schema_.org.apache.arrow.flatbuf.Interval; +var List = Schema_.org.apache.arrow.flatbuf.List; +var Struct = Schema_.org.apache.arrow.flatbuf.Struct_; +var Union = Schema_.org.apache.arrow.flatbuf.Union; +var DictionaryEncoding = Schema_.org.apache.arrow.flatbuf.DictionaryEncoding; +var FixedSizeBinary = Schema_.org.apache.arrow.flatbuf.FixedSizeBinary; +var FixedSizeList = Schema_.org.apache.arrow.flatbuf.FixedSizeList; +var Map_ = Schema_.org.apache.arrow.flatbuf.Map; +/** @ignore */ +class TypeAssembler extends visitor_1.Visitor { + visit(node, builder) { + return (node == null || builder == null) ? undefined : super.visit(node, builder); + } + visitNull(_node, b) { + Null.startNull(b); + return Null.endNull(b); + } + visitInt(node, b) { + Int.startInt(b); + Int.addBitWidth(b, node.bitWidth); + Int.addIsSigned(b, node.isSigned); + return Int.endInt(b); + } + visitFloat(node, b) { + FloatingPoint.startFloatingPoint(b); + FloatingPoint.addPrecision(b, node.precision); + return FloatingPoint.endFloatingPoint(b); + } + visitBinary(_node, b) { + Binary.startBinary(b); + return Binary.endBinary(b); + } + visitBool(_node, b) { + Bool.startBool(b); + return Bool.endBool(b); + } + visitUtf8(_node, b) { + Utf8.startUtf8(b); + return Utf8.endUtf8(b); + } + visitDecimal(node, b) { + Decimal.startDecimal(b); + Decimal.addScale(b, node.scale); + Decimal.addPrecision(b, node.precision); + return Decimal.endDecimal(b); + } + visitDate(node, b) { + Date.startDate(b); + Date.addUnit(b, node.unit); + return Date.endDate(b); + } + visitTime(node, b) { + Time.startTime(b); + Time.addUnit(b, node.unit); + Time.addBitWidth(b, node.bitWidth); + return Time.endTime(b); + } + visitTimestamp(node, b) { + const timezone = (node.timezone && b.createString(node.timezone)) || undefined; + Timestamp.startTimestamp(b); + Timestamp.addUnit(b, node.unit); + if (timezone !== undefined) { + Timestamp.addTimezone(b, timezone); + } + return Timestamp.endTimestamp(b); + } + visitInterval(node, b) { + Interval.startInterval(b); + Interval.addUnit(b, node.unit); + return Interval.endInterval(b); + } + visitList(_node, b) { + List.startList(b); + return List.endList(b); + } + visitStruct(_node, b) { + Struct.startStruct_(b); + return Struct.endStruct_(b); + } + visitUnion(node, b) { + Union.startTypeIdsVector(b, node.typeIds.length); + const typeIds = Union.createTypeIdsVector(b, node.typeIds); + Union.startUnion(b); + Union.addMode(b, node.mode); + Union.addTypeIds(b, typeIds); + return Union.endUnion(b); + } + visitDictionary(node, b) { + const indexType = this.visit(node.indices, b); + DictionaryEncoding.startDictionaryEncoding(b); + DictionaryEncoding.addId(b, new Long(node.id, 0)); + DictionaryEncoding.addIsOrdered(b, node.isOrdered); + if (indexType !== undefined) { + DictionaryEncoding.addIndexType(b, indexType); + } + return DictionaryEncoding.endDictionaryEncoding(b); + } + visitFixedSizeBinary(node, b) { + FixedSizeBinary.startFixedSizeBinary(b); + FixedSizeBinary.addByteWidth(b, node.byteWidth); + return FixedSizeBinary.endFixedSizeBinary(b); + } + visitFixedSizeList(node, b) { + FixedSizeList.startFixedSizeList(b); + FixedSizeList.addListSize(b, node.listSize); + return FixedSizeList.endFixedSizeList(b); + } + visitMap(node, b) { + Map_.startMap(b); + Map_.addKeysSorted(b, node.keysSorted); + return Map_.endMap(b); + } +} +exports.TypeAssembler = TypeAssembler; +/** @ignore */ +exports.instance = new TypeAssembler(); + +//# sourceMappingURL=typeassembler.js.map diff --git a/frontend/node_modules/apache-arrow/visitor/typeassembler.js.map b/frontend/node_modules/apache-arrow/visitor/typeassembler.js.map new file mode 100644 index 0000000000000000000000000000000000000000..936a4b09c1005ef75ac2c10d294df51ce1fcb929 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/typeassembler.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor/typeassembler.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,6CAA0C;AAC1C,IAAO,IAAI,GAAG,yBAAW,CAAC,IAAI,CAAC;AAE/B,wCAAwC;AAGxC,wCAAqC;AAErC,IAAO,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;AACpD,IAAO,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;AAClD,IAAO,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC;AACtE,IAAO,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;AACxD,IAAO,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;AACpD,IAAO,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;AACpD,IAAO,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;AAC1D,IAAO,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO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CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;QAClD,kBAAkB,CAAC,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;QACnD,IAAI,SAAS,KAAK,SAAS,EAAE;YACzB,kBAAkB,CAAC,YAAY,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;SACjD;QACD,OAAO,kBAAkB,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;IACvD,CAAC;IACM,oBAAoB,CAAiC,IAAO,EAAE,CAAU;QAC3E,eAAe,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;QACxC,eAAe,CAAC,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;QAChD,OAAO,eAAe,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC;IACjD,CAAC;IACM,kBAAkB,CAA+B,IAAO,EAAE,CAAU;QACvE,aAAa,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC;QACpC,aAAa,CAAC,WAAW,CAAC,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC5C,OAAO,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAC7C,CAAC;IACM,QAAQ,CAAsB,IAAO,EAAE,CAAU;QACpD,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QACjB,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC1B,CAAC;CACJ;AAvGD,sCAuGC;AAED,cAAc;AACD,QAAA,QAAQ,GAAG,IAAI,aAAa,EAAE,CAAC","file":"typeassembler.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { flatbuffers } from 'flatbuffers';\nimport Long = flatbuffers.Long;\nimport Builder = flatbuffers.Builder;\nimport * as Schema_ from '../fb/Schema';\n\nimport * as type from '../type';\nimport { Visitor } from '../visitor';\n\nimport Null = Schema_.org.apache.arrow.flatbuf.Null;\nimport Int = Schema_.org.apache.arrow.flatbuf.Int;\nimport FloatingPoint = Schema_.org.apache.arrow.flatbuf.FloatingPoint;\nimport Binary = Schema_.org.apache.arrow.flatbuf.Binary;\nimport Bool = Schema_.org.apache.arrow.flatbuf.Bool;\nimport Utf8 = Schema_.org.apache.arrow.flatbuf.Utf8;\nimport Decimal = Schema_.org.apache.arrow.flatbuf.Decimal;\nimport Date = Schema_.org.apache.arrow.flatbuf.Date;\nimport Time = Schema_.org.apache.arrow.flatbuf.Time;\nimport Timestamp = Schema_.org.apache.arrow.flatbuf.Timestamp;\nimport Interval = Schema_.org.apache.arrow.flatbuf.Interval;\nimport List = Schema_.org.apache.arrow.flatbuf.List;\nimport Struct = Schema_.org.apache.arrow.flatbuf.Struct_;\nimport Union = Schema_.org.apache.arrow.flatbuf.Union;\nimport DictionaryEncoding = Schema_.org.apache.arrow.flatbuf.DictionaryEncoding;\nimport FixedSizeBinary = Schema_.org.apache.arrow.flatbuf.FixedSizeBinary;\nimport FixedSizeList = Schema_.org.apache.arrow.flatbuf.FixedSizeList;\nimport Map_ = Schema_.org.apache.arrow.flatbuf.Map;\n\n/** @ignore */\nexport interface TypeAssembler extends Visitor {\n visit(node: T, builder: Builder): number | undefined;\n}\n\n/** @ignore */\nexport class TypeAssembler extends Visitor {\n public visit(node: T, builder: Builder): number | undefined {\n return (node == null || builder == null) ? undefined : super.visit(node, builder);\n }\n public visitNull(_node: T, b: Builder) {\n Null.startNull(b);\n return Null.endNull(b);\n }\n public visitInt(node: T, b: Builder) {\n Int.startInt(b);\n Int.addBitWidth(b, node.bitWidth);\n Int.addIsSigned(b, node.isSigned);\n return Int.endInt(b);\n }\n public visitFloat(node: T, b: Builder) {\n FloatingPoint.startFloatingPoint(b);\n FloatingPoint.addPrecision(b, node.precision);\n return FloatingPoint.endFloatingPoint(b);\n }\n public visitBinary(_node: T, b: Builder) {\n Binary.startBinary(b);\n return Binary.endBinary(b);\n }\n public visitBool(_node: T, b: Builder) {\n Bool.startBool(b);\n return Bool.endBool(b);\n }\n public visitUtf8(_node: T, b: Builder) {\n Utf8.startUtf8(b);\n return Utf8.endUtf8(b);\n }\n public visitDecimal(node: T, b: Builder) {\n Decimal.startDecimal(b);\n Decimal.addScale(b, node.scale);\n Decimal.addPrecision(b, node.precision);\n return Decimal.endDecimal(b);\n }\n public visitDate(node: T, b: Builder) {\n Date.startDate(b);\n Date.addUnit(b, node.unit);\n return Date.endDate(b);\n }\n public visitTime(node: T, b: Builder) {\n Time.startTime(b);\n Time.addUnit(b, node.unit);\n Time.addBitWidth(b, node.bitWidth);\n return Time.endTime(b);\n }\n public visitTimestamp(node: T, b: Builder) {\n const timezone = (node.timezone && b.createString(node.timezone)) || undefined;\n Timestamp.startTimestamp(b);\n Timestamp.addUnit(b, node.unit);\n if (timezone !== undefined) {\n Timestamp.addTimezone(b, timezone);\n }\n return Timestamp.endTimestamp(b);\n }\n public visitInterval(node: T, b: Builder) {\n Interval.startInterval(b);\n Interval.addUnit(b, node.unit);\n return Interval.endInterval(b);\n }\n public visitList(_node: T, b: Builder) {\n List.startList(b);\n return List.endList(b);\n }\n public visitStruct(_node: T, b: Builder) {\n Struct.startStruct_(b);\n return Struct.endStruct_(b);\n }\n public visitUnion(node: T, b: Builder) {\n Union.startTypeIdsVector(b, node.typeIds.length);\n const typeIds = Union.createTypeIdsVector(b, node.typeIds);\n Union.startUnion(b);\n Union.addMode(b, node.mode);\n Union.addTypeIds(b, typeIds);\n return Union.endUnion(b);\n }\n public visitDictionary(node: T, b: Builder) {\n const indexType = this.visit(node.indices, b);\n DictionaryEncoding.startDictionaryEncoding(b);\n DictionaryEncoding.addId(b, new Long(node.id, 0));\n DictionaryEncoding.addIsOrdered(b, node.isOrdered);\n if (indexType !== undefined) {\n DictionaryEncoding.addIndexType(b, indexType);\n }\n return DictionaryEncoding.endDictionaryEncoding(b);\n }\n public visitFixedSizeBinary(node: T, b: Builder) {\n FixedSizeBinary.startFixedSizeBinary(b);\n FixedSizeBinary.addByteWidth(b, node.byteWidth);\n return FixedSizeBinary.endFixedSizeBinary(b);\n }\n public visitFixedSizeList(node: T, b: Builder) {\n FixedSizeList.startFixedSizeList(b);\n FixedSizeList.addListSize(b, node.listSize);\n return FixedSizeList.endFixedSizeList(b);\n }\n public visitMap(node: T, b: Builder) {\n Map_.startMap(b);\n Map_.addKeysSorted(b, node.keysSorted);\n return Map_.endMap(b);\n }\n}\n\n/** @ignore */\nexport const instance = new TypeAssembler();\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/typeassembler.mjs b/frontend/node_modules/apache-arrow/visitor/typeassembler.mjs new file mode 100644 index 0000000000000000000000000000000000000000..bb69164c417a2122fa573986a2004efad5b27f31 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/typeassembler.mjs @@ -0,0 +1,147 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { flatbuffers } from 'flatbuffers'; +var Long = flatbuffers.Long; +import * as Schema_ from '../fb/Schema'; +import { Visitor } from '../visitor'; +var Null = Schema_.org.apache.arrow.flatbuf.Null; +var Int = Schema_.org.apache.arrow.flatbuf.Int; +var FloatingPoint = Schema_.org.apache.arrow.flatbuf.FloatingPoint; +var Binary = Schema_.org.apache.arrow.flatbuf.Binary; +var Bool = Schema_.org.apache.arrow.flatbuf.Bool; +var Utf8 = Schema_.org.apache.arrow.flatbuf.Utf8; +var Decimal = Schema_.org.apache.arrow.flatbuf.Decimal; +var Date = Schema_.org.apache.arrow.flatbuf.Date; +var Time = Schema_.org.apache.arrow.flatbuf.Time; +var Timestamp = Schema_.org.apache.arrow.flatbuf.Timestamp; +var Interval = Schema_.org.apache.arrow.flatbuf.Interval; +var List = Schema_.org.apache.arrow.flatbuf.List; +var Struct = Schema_.org.apache.arrow.flatbuf.Struct_; +var Union = Schema_.org.apache.arrow.flatbuf.Union; +var DictionaryEncoding = Schema_.org.apache.arrow.flatbuf.DictionaryEncoding; +var FixedSizeBinary = Schema_.org.apache.arrow.flatbuf.FixedSizeBinary; +var FixedSizeList = Schema_.org.apache.arrow.flatbuf.FixedSizeList; +var Map_ = Schema_.org.apache.arrow.flatbuf.Map; +/** @ignore */ +export class TypeAssembler extends Visitor { + visit(node, builder) { + return (node == null || builder == null) ? undefined : super.visit(node, builder); + } + visitNull(_node, b) { + Null.startNull(b); + return Null.endNull(b); + } + visitInt(node, b) { + Int.startInt(b); + Int.addBitWidth(b, node.bitWidth); + Int.addIsSigned(b, node.isSigned); + return Int.endInt(b); + } + visitFloat(node, b) { + FloatingPoint.startFloatingPoint(b); + FloatingPoint.addPrecision(b, node.precision); + return FloatingPoint.endFloatingPoint(b); + } + visitBinary(_node, b) { + Binary.startBinary(b); + return Binary.endBinary(b); + } + visitBool(_node, b) { + Bool.startBool(b); + return Bool.endBool(b); + } + visitUtf8(_node, b) { + Utf8.startUtf8(b); + return Utf8.endUtf8(b); + } + visitDecimal(node, b) { + Decimal.startDecimal(b); + Decimal.addScale(b, node.scale); + Decimal.addPrecision(b, node.precision); + return Decimal.endDecimal(b); + } + visitDate(node, b) { + Date.startDate(b); + Date.addUnit(b, node.unit); + return Date.endDate(b); + } + visitTime(node, b) { + Time.startTime(b); + Time.addUnit(b, node.unit); + Time.addBitWidth(b, node.bitWidth); + return Time.endTime(b); + } + visitTimestamp(node, b) { + const timezone = (node.timezone && b.createString(node.timezone)) || undefined; + Timestamp.startTimestamp(b); + Timestamp.addUnit(b, node.unit); + if (timezone !== undefined) { + Timestamp.addTimezone(b, timezone); + } + return Timestamp.endTimestamp(b); + } + visitInterval(node, b) { + Interval.startInterval(b); + Interval.addUnit(b, node.unit); + return Interval.endInterval(b); + } + visitList(_node, b) { + List.startList(b); + return List.endList(b); + } + visitStruct(_node, b) { + Struct.startStruct_(b); + return Struct.endStruct_(b); + } + visitUnion(node, b) { + Union.startTypeIdsVector(b, node.typeIds.length); + const typeIds = Union.createTypeIdsVector(b, node.typeIds); + Union.startUnion(b); + Union.addMode(b, node.mode); + Union.addTypeIds(b, typeIds); + return Union.endUnion(b); + } + visitDictionary(node, b) { + const indexType = this.visit(node.indices, b); + DictionaryEncoding.startDictionaryEncoding(b); + DictionaryEncoding.addId(b, new Long(node.id, 0)); + DictionaryEncoding.addIsOrdered(b, node.isOrdered); + if (indexType !== undefined) { + DictionaryEncoding.addIndexType(b, indexType); + } + return DictionaryEncoding.endDictionaryEncoding(b); + } + visitFixedSizeBinary(node, b) { + FixedSizeBinary.startFixedSizeBinary(b); + FixedSizeBinary.addByteWidth(b, node.byteWidth); + return FixedSizeBinary.endFixedSizeBinary(b); + } + visitFixedSizeList(node, b) { + FixedSizeList.startFixedSizeList(b); + FixedSizeList.addListSize(b, node.listSize); + return FixedSizeList.endFixedSizeList(b); + } + visitMap(node, b) { + Map_.startMap(b); + Map_.addKeysSorted(b, node.keysSorted); + return Map_.endMap(b); + } +} +/** @ignore */ +export const instance = new TypeAssembler(); + +//# sourceMappingURL=typeassembler.mjs.map diff --git a/frontend/node_modules/apache-arrow/visitor/typeassembler.mjs.map b/frontend/node_modules/apache-arrow/visitor/typeassembler.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..4ce0781566dab325c7087a7fcf47b45f50b9220d --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/typeassembler.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor/typeassembler.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,IAAO,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC;AAE/B,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AAGxC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,IAAO,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;AACpD,IAAO,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;AAClD,IAAO,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC;AACtE,IAAO,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;AACxD,IAAO,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;AACpD,IAAO,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,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AAC,MAAM,QAAQ,GAAG,IAAI,aAAa,EAAE,CAAC","file":"typeassembler.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { flatbuffers } from 'flatbuffers';\nimport Long = flatbuffers.Long;\nimport Builder = flatbuffers.Builder;\nimport * as Schema_ from '../fb/Schema';\n\nimport * as type from '../type';\nimport { Visitor } from '../visitor';\n\nimport Null = Schema_.org.apache.arrow.flatbuf.Null;\nimport Int = Schema_.org.apache.arrow.flatbuf.Int;\nimport FloatingPoint = Schema_.org.apache.arrow.flatbuf.FloatingPoint;\nimport Binary = Schema_.org.apache.arrow.flatbuf.Binary;\nimport Bool = Schema_.org.apache.arrow.flatbuf.Bool;\nimport Utf8 = Schema_.org.apache.arrow.flatbuf.Utf8;\nimport Decimal = Schema_.org.apache.arrow.flatbuf.Decimal;\nimport Date = Schema_.org.apache.arrow.flatbuf.Date;\nimport Time = Schema_.org.apache.arrow.flatbuf.Time;\nimport Timestamp = Schema_.org.apache.arrow.flatbuf.Timestamp;\nimport Interval = Schema_.org.apache.arrow.flatbuf.Interval;\nimport List = Schema_.org.apache.arrow.flatbuf.List;\nimport Struct = Schema_.org.apache.arrow.flatbuf.Struct_;\nimport Union = Schema_.org.apache.arrow.flatbuf.Union;\nimport DictionaryEncoding = Schema_.org.apache.arrow.flatbuf.DictionaryEncoding;\nimport FixedSizeBinary = Schema_.org.apache.arrow.flatbuf.FixedSizeBinary;\nimport FixedSizeList = Schema_.org.apache.arrow.flatbuf.FixedSizeList;\nimport Map_ = Schema_.org.apache.arrow.flatbuf.Map;\n\n/** @ignore */\nexport interface TypeAssembler extends Visitor {\n visit(node: T, builder: Builder): number | undefined;\n}\n\n/** @ignore */\nexport class TypeAssembler extends Visitor {\n public visit(node: T, builder: Builder): number | undefined {\n return (node == null || builder == null) ? undefined : super.visit(node, builder);\n }\n public visitNull(_node: T, b: Builder) {\n Null.startNull(b);\n return Null.endNull(b);\n }\n public visitInt(node: T, b: Builder) {\n Int.startInt(b);\n Int.addBitWidth(b, node.bitWidth);\n Int.addIsSigned(b, node.isSigned);\n return Int.endInt(b);\n }\n public visitFloat(node: T, b: Builder) {\n FloatingPoint.startFloatingPoint(b);\n FloatingPoint.addPrecision(b, node.precision);\n return FloatingPoint.endFloatingPoint(b);\n }\n public visitBinary(_node: T, b: Builder) {\n Binary.startBinary(b);\n return Binary.endBinary(b);\n }\n public visitBool(_node: T, b: Builder) {\n Bool.startBool(b);\n return Bool.endBool(b);\n }\n public visitUtf8(_node: T, b: Builder) {\n Utf8.startUtf8(b);\n return Utf8.endUtf8(b);\n }\n public visitDecimal(node: T, b: Builder) {\n Decimal.startDecimal(b);\n Decimal.addScale(b, node.scale);\n Decimal.addPrecision(b, node.precision);\n return Decimal.endDecimal(b);\n }\n public visitDate(node: T, b: Builder) {\n Date.startDate(b);\n Date.addUnit(b, node.unit);\n return Date.endDate(b);\n }\n public visitTime(node: T, b: Builder) {\n Time.startTime(b);\n Time.addUnit(b, node.unit);\n Time.addBitWidth(b, node.bitWidth);\n return Time.endTime(b);\n }\n public visitTimestamp(node: T, b: Builder) {\n const timezone = (node.timezone && b.createString(node.timezone)) || undefined;\n Timestamp.startTimestamp(b);\n Timestamp.addUnit(b, node.unit);\n if (timezone !== undefined) {\n Timestamp.addTimezone(b, timezone);\n }\n return Timestamp.endTimestamp(b);\n }\n public visitInterval(node: T, b: Builder) {\n Interval.startInterval(b);\n Interval.addUnit(b, node.unit);\n return Interval.endInterval(b);\n }\n public visitList(_node: T, b: Builder) {\n List.startList(b);\n return List.endList(b);\n }\n public visitStruct(_node: T, b: Builder) {\n Struct.startStruct_(b);\n return Struct.endStruct_(b);\n }\n public visitUnion(node: T, b: Builder) {\n Union.startTypeIdsVector(b, node.typeIds.length);\n const typeIds = Union.createTypeIdsVector(b, node.typeIds);\n Union.startUnion(b);\n Union.addMode(b, node.mode);\n Union.addTypeIds(b, typeIds);\n return Union.endUnion(b);\n }\n public visitDictionary(node: T, b: Builder) {\n const indexType = this.visit(node.indices, b);\n DictionaryEncoding.startDictionaryEncoding(b);\n DictionaryEncoding.addId(b, new Long(node.id, 0));\n DictionaryEncoding.addIsOrdered(b, node.isOrdered);\n if (indexType !== undefined) {\n DictionaryEncoding.addIndexType(b, indexType);\n }\n return DictionaryEncoding.endDictionaryEncoding(b);\n }\n public visitFixedSizeBinary(node: T, b: Builder) {\n FixedSizeBinary.startFixedSizeBinary(b);\n FixedSizeBinary.addByteWidth(b, node.byteWidth);\n return FixedSizeBinary.endFixedSizeBinary(b);\n }\n public visitFixedSizeList(node: T, b: Builder) {\n FixedSizeList.startFixedSizeList(b);\n FixedSizeList.addListSize(b, node.listSize);\n return FixedSizeList.endFixedSizeList(b);\n }\n public visitMap(node: T, b: Builder) {\n Map_.startMap(b);\n Map_.addKeysSorted(b, node.keysSorted);\n return Map_.endMap(b);\n }\n}\n\n/** @ignore */\nexport const instance = new TypeAssembler();\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/typecomparator.d.ts b/frontend/node_modules/apache-arrow/visitor/typecomparator.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d14aa1c41fba331d64a9ef3f26052a99d7191141 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/typecomparator.d.ts @@ -0,0 +1,66 @@ +import { Data } from '../data'; +import { Visitor } from '../visitor'; +import { VectorType } from '../interfaces'; +import { Schema, Field } from '../schema'; +import { DataType, Dictionary, Bool, Null, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct, Float, Float16, Float32, Float64, Int, Uint8, Uint16, Uint32, Uint64, Int8, Int16, Int32, Int64, Date_, DateDay, DateMillisecond, Interval, IntervalDayTime, IntervalYearMonth, Time, TimeSecond, TimeMillisecond, TimeMicrosecond, TimeNanosecond, Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond, Union, DenseUnion, SparseUnion } from '../type'; +/** @ignore */ +export interface TypeComparator extends Visitor { + visit(type: T, other?: DataType | null): other is T; + visitMany(nodes: T[], others?: DataType[] | null): boolean[]; + getVisitFn(node: VectorType | Data | T): (other?: DataType | null) => other is T; + visitNull(type: T, other?: DataType | null): other is T; + visitBool(type: T, other?: DataType | null): other is T; + visitInt(type: T, other?: DataType | null): other is T; + visitInt8(type: T, other?: DataType | null): other is T; + visitInt16(type: T, other?: DataType | null): other is T; + visitInt32(type: T, other?: DataType | null): other is T; + visitInt64(type: T, other?: DataType | null): other is T; + visitUint8(type: T, other?: DataType | null): other is T; + visitUint16(type: T, other?: DataType | null): other is T; + visitUint32(type: T, other?: DataType | null): other is T; + visitUint64(type: T, other?: DataType | null): other is T; + visitFloat(type: T, other?: DataType | null): other is T; + visitFloat16(type: T, other?: DataType | null): other is T; + visitFloat32(type: T, other?: DataType | null): other is T; + visitFloat64(type: T, other?: DataType | null): other is T; + visitUtf8(type: T, other?: DataType | null): other is T; + visitBinary(type: T, other?: DataType | null): other is T; + visitFixedSizeBinary(type: T, other?: DataType | null): other is T; + visitDate(type: T, other?: DataType | null): other is T; + visitDateDay(type: T, other?: DataType | null): other is T; + visitDateMillisecond(type: T, other?: DataType | null): other is T; + visitTimestamp(type: T, other?: DataType | null): other is T; + visitTimestampSecond(type: T, other?: DataType | null): other is T; + visitTimestampMillisecond(type: T, other?: DataType | null): other is T; + visitTimestampMicrosecond(type: T, other?: DataType | null): other is T; + visitTimestampNanosecond(type: T, other?: DataType | null): other is T; + visitTime(type: T, other?: DataType | null): other is T; + visitTimeSecond(type: T, other?: DataType | null): other is T; + visitTimeMillisecond(type: T, other?: DataType | null): other is T; + visitTimeMicrosecond(type: T, other?: DataType | null): other is T; + visitTimeNanosecond(type: T, other?: DataType | null): other is T; + visitDecimal(type: T, other?: DataType | null): other is T; + visitList(type: T, other?: DataType | null): other is T; + visitStruct(type: T, other?: DataType | null): other is T; + visitUnion(type: T, other?: DataType | null): other is T; + visitDenseUnion(type: T, other?: DataType | null): other is T; + visitSparseUnion(type: T, other?: DataType | null): other is T; + visitDictionary(type: T, other?: DataType | null): other is T; + visitInterval(type: T, other?: DataType | null): other is T; + visitIntervalDayTime(type: T, other?: DataType | null): other is T; + visitIntervalYearMonth(type: T, other?: DataType | null): other is T; + visitFixedSizeList(type: T, other?: DataType | null): other is T; + visitMap(type: T, other?: DataType | null): other is T; +} +/** @ignore */ +export declare class TypeComparator extends Visitor { + compareSchemas(schema: Schema, other?: Schema | null): other is Schema; + compareFields(fields: Field[], others?: Field[] | null): others is Field[]; + compareField(field: Field, other?: Field | null): other is Field; +} +/** @ignore */ +export declare const instance: TypeComparator; diff --git a/frontend/node_modules/apache-arrow/visitor/typecomparator.js b/frontend/node_modules/apache-arrow/visitor/typecomparator.js new file mode 100644 index 0000000000000000000000000000000000000000..2213ed394ec10385bd64f4e17005143b2e478acb --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/typecomparator.js @@ -0,0 +1,158 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const visitor_1 = require("../visitor"); +/** @ignore */ +class TypeComparator extends visitor_1.Visitor { + compareSchemas(schema, other) { + return (schema === other) || (other instanceof schema.constructor && + exports.instance.compareFields(schema.fields, other.fields)); + } + compareFields(fields, others) { + return (fields === others) || (Array.isArray(fields) && + Array.isArray(others) && + fields.length === others.length && + fields.every((f, i) => exports.instance.compareField(f, others[i]))); + } + compareField(field, other) { + return (field === other) || (other instanceof field.constructor && + field.name === other.name && + field.nullable === other.nullable && + exports.instance.visit(field.type, other.type)); + } +} +exports.TypeComparator = TypeComparator; +function compareConstructor(type, other) { + return other instanceof type.constructor; +} +function compareAny(type, other) { + return (type === other) || compareConstructor(type, other); +} +function compareInt(type, other) { + return (type === other) || (compareConstructor(type, other) && + type.bitWidth === other.bitWidth && + type.isSigned === other.isSigned); +} +function compareFloat(type, other) { + return (type === other) || (compareConstructor(type, other) && + type.precision === other.precision); +} +function compareFixedSizeBinary(type, other) { + return (type === other) || (compareConstructor(type, other) && + type.byteWidth === other.byteWidth); +} +function compareDate(type, other) { + return (type === other) || (compareConstructor(type, other) && + type.unit === other.unit); +} +function compareTimestamp(type, other) { + return (type === other) || (compareConstructor(type, other) && + type.unit === other.unit && + type.timezone === other.timezone); +} +function compareTime(type, other) { + return (type === other) || (compareConstructor(type, other) && + type.unit === other.unit && + type.bitWidth === other.bitWidth); +} +function compareList(type, other) { + return (type === other) || (compareConstructor(type, other) && + type.children.length === other.children.length && + exports.instance.compareFields(type.children, other.children)); +} +function compareStruct(type, other) { + return (type === other) || (compareConstructor(type, other) && + type.children.length === other.children.length && + exports.instance.compareFields(type.children, other.children)); +} +function compareUnion(type, other) { + return (type === other) || (compareConstructor(type, other) && + type.mode === other.mode && + type.typeIds.every((x, i) => x === other.typeIds[i]) && + exports.instance.compareFields(type.children, other.children)); +} +function compareDictionary(type, other) { + return (type === other) || (compareConstructor(type, other) && + type.id === other.id && + type.isOrdered === other.isOrdered && + exports.instance.visit(type.indices, other.indices) && + exports.instance.visit(type.dictionary, other.dictionary)); +} +function compareInterval(type, other) { + return (type === other) || (compareConstructor(type, other) && + type.unit === other.unit); +} +function compareFixedSizeList(type, other) { + return (type === other) || (compareConstructor(type, other) && + type.listSize === other.listSize && + type.children.length === other.children.length && + exports.instance.compareFields(type.children, other.children)); +} +function compareMap(type, other) { + return (type === other) || (compareConstructor(type, other) && + type.keysSorted === other.keysSorted && + type.children.length === other.children.length && + exports.instance.compareFields(type.children, other.children)); +} +TypeComparator.prototype.visitNull = compareAny; +TypeComparator.prototype.visitBool = compareAny; +TypeComparator.prototype.visitInt = compareInt; +TypeComparator.prototype.visitInt8 = compareInt; +TypeComparator.prototype.visitInt16 = compareInt; +TypeComparator.prototype.visitInt32 = compareInt; +TypeComparator.prototype.visitInt64 = compareInt; +TypeComparator.prototype.visitUint8 = compareInt; +TypeComparator.prototype.visitUint16 = compareInt; +TypeComparator.prototype.visitUint32 = compareInt; +TypeComparator.prototype.visitUint64 = compareInt; +TypeComparator.prototype.visitFloat = compareFloat; +TypeComparator.prototype.visitFloat16 = compareFloat; +TypeComparator.prototype.visitFloat32 = compareFloat; +TypeComparator.prototype.visitFloat64 = compareFloat; +TypeComparator.prototype.visitUtf8 = compareAny; +TypeComparator.prototype.visitBinary = compareAny; +TypeComparator.prototype.visitFixedSizeBinary = compareFixedSizeBinary; +TypeComparator.prototype.visitDate = compareDate; +TypeComparator.prototype.visitDateDay = compareDate; +TypeComparator.prototype.visitDateMillisecond = compareDate; +TypeComparator.prototype.visitTimestamp = compareTimestamp; +TypeComparator.prototype.visitTimestampSecond = compareTimestamp; +TypeComparator.prototype.visitTimestampMillisecond = compareTimestamp; +TypeComparator.prototype.visitTimestampMicrosecond = compareTimestamp; +TypeComparator.prototype.visitTimestampNanosecond = compareTimestamp; +TypeComparator.prototype.visitTime = compareTime; +TypeComparator.prototype.visitTimeSecond = compareTime; +TypeComparator.prototype.visitTimeMillisecond = compareTime; +TypeComparator.prototype.visitTimeMicrosecond = compareTime; +TypeComparator.prototype.visitTimeNanosecond = compareTime; +TypeComparator.prototype.visitDecimal = compareAny; +TypeComparator.prototype.visitList = compareList; +TypeComparator.prototype.visitStruct = compareStruct; +TypeComparator.prototype.visitUnion = compareUnion; +TypeComparator.prototype.visitDenseUnion = compareUnion; +TypeComparator.prototype.visitSparseUnion = compareUnion; +TypeComparator.prototype.visitDictionary = compareDictionary; +TypeComparator.prototype.visitInterval = compareInterval; +TypeComparator.prototype.visitIntervalDayTime = compareInterval; +TypeComparator.prototype.visitIntervalYearMonth = compareInterval; +TypeComparator.prototype.visitFixedSizeList = compareFixedSizeList; +TypeComparator.prototype.visitMap = compareMap; +/** @ignore */ +exports.instance = new TypeComparator(); + +//# sourceMappingURL=typecomparator.js.map diff --git a/frontend/node_modules/apache-arrow/visitor/typecomparator.js.map b/frontend/node_modules/apache-arrow/visitor/typecomparator.js.map new file mode 100644 index 0000000000000000000000000000000000000000..41e10acc3a90e19f339b665bc3d5f191f5a2ee98 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/typecomparator.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor/typecomparator.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAGrB,wCAAqC;AAiErC,cAAc;AACd,MAAa,cAAe,SAAQ,iBAAO;IACvC,cAAc,CAAwC,MAAiB,EAAE,KAAqB;QAC1F,OAAO,CAAC,MAAM,KAAK,KAAK,CAAC,IAAI,CACzB,KAAK,YAAY,MAAM,CAAC,WAAW;YACnC,gBAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CACtD,CAAC;IACN,CAAC;IACD,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ent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Visitor } from '../visitor';\nimport { VectorType } from '../interfaces';\nimport { Schema, Field } from '../schema';\nimport {\n DataType, Dictionary,\n Bool, Null, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct,\n Float, Float16, Float32, Float64,\n Int, Uint8, Uint16, Uint32, Uint64, Int8, Int16, Int32, Int64,\n Date_, DateDay, DateMillisecond,\n Interval, IntervalDayTime, IntervalYearMonth,\n Time, TimeSecond, TimeMillisecond, TimeMicrosecond, TimeNanosecond,\n Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond,\n Union, DenseUnion, SparseUnion,\n} from '../type';\n\n/** @ignore */\nexport interface TypeComparator extends Visitor {\n visit(type: T, other?: DataType | null): other is T;\n visitMany(nodes: T[], others?: DataType[] | null): boolean[];\n getVisitFn(node: VectorType | Data | T): (other?: DataType | null) => other is T;\n visitNull (type: T, other?: DataType | null): other is T;\n visitBool (type: T, other?: DataType | null): other is T;\n visitInt (type: T, other?: DataType | null): other is T;\n visitInt8 (type: T, other?: DataType | null): other is T;\n visitInt16 (type: T, other?: DataType | null): other is T;\n visitInt32 (type: T, other?: DataType | null): other is T;\n visitInt64 (type: T, other?: DataType | null): other is T;\n visitUint8 (type: T, other?: DataType | null): other is T;\n visitUint16 (type: T, other?: DataType | null): other is T;\n visitUint32 (type: T, other?: DataType | null): other is T;\n visitUint64 (type: T, other?: DataType | null): other is T;\n visitFloat (type: T, other?: DataType | null): other is T;\n visitFloat16 (type: T, other?: DataType | null): other is T;\n visitFloat32 (type: T, other?: DataType | null): other is T;\n visitFloat64 (type: T, other?: DataType | null): other is T;\n visitUtf8 (type: T, other?: DataType | null): other is T;\n visitBinary (type: T, other?: DataType | null): other is T;\n visitFixedSizeBinary (type: T, other?: DataType | null): other is T;\n visitDate (type: T, other?: DataType | null): other is T;\n visitDateDay (type: T, other?: DataType | null): other is T;\n visitDateMillisecond (type: T, other?: DataType | null): other is T;\n visitTimestamp (type: T, other?: DataType | null): other is T;\n visitTimestampSecond (type: T, other?: DataType | null): other is T;\n visitTimestampMillisecond (type: T, other?: DataType | null): other is T;\n visitTimestampMicrosecond (type: T, other?: DataType | null): other is T;\n visitTimestampNanosecond (type: T, other?: DataType | null): other is T;\n visitTime (type: T, other?: DataType | null): other is T;\n visitTimeSecond (type: T, other?: DataType | null): other is T;\n visitTimeMillisecond (type: T, other?: DataType | null): other is T;\n visitTimeMicrosecond (type: T, other?: DataType | null): other is T;\n visitTimeNanosecond (type: T, other?: DataType | null): other is T;\n visitDecimal (type: T, other?: DataType | null): other is T;\n visitList (type: T, other?: DataType | null): other is T;\n visitStruct (type: T, other?: DataType | null): other is T;\n visitUnion (type: T, other?: DataType | null): other is T;\n visitDenseUnion (type: T, other?: DataType | null): other is T;\n visitSparseUnion (type: T, other?: DataType | null): other is T;\n visitDictionary (type: T, other?: DataType | null): other is T;\n visitInterval (type: T, other?: DataType | null): other is T;\n visitIntervalDayTime (type: T, other?: DataType | null): other is T;\n visitIntervalYearMonth (type: T, other?: DataType | null): other is T;\n visitFixedSizeList (type: T, other?: DataType | null): other is T;\n visitMap (type: T, other?: DataType | null): other is T;\n}\n\n/** @ignore */\nexport class TypeComparator extends Visitor {\n compareSchemas(schema: Schema, other?: Schema | null): other is Schema {\n return (schema === other) || (\n other instanceof schema.constructor &&\n instance.compareFields(schema.fields, other.fields)\n );\n }\n compareFields(fields: Field[], others?: Field[] | null): others is Field[] {\n return (fields === others) || (\n Array.isArray(fields) &&\n Array.isArray(others) &&\n fields.length === others.length &&\n fields.every((f, i) => instance.compareField(f, others[i]))\n );\n }\n compareField(field: Field, other?: Field | null): other is Field {\n return (field === other) || (\n other instanceof field.constructor &&\n field.name === other.name &&\n field.nullable === other.nullable &&\n instance.visit(field.type, other.type)\n );\n }\n}\n\nfunction compareConstructor(type: T, other?: DataType | null): other is T {\n return other instanceof type.constructor;\n}\n\nfunction compareAny(type: T, other?: DataType | null): other is T {\n return (type === other) || compareConstructor(type, other);\n}\n\nfunction compareInt(type: T, other?: DataType | null): other is T {\n return (type === other) || (\n compareConstructor(type, other) &&\n type.bitWidth === other.bitWidth &&\n type.isSigned === other.isSigned\n );\n}\n\nfunction compareFloat(type: T, other?: DataType | null): other is T {\n return (type === other) || (\n compareConstructor(type, other) &&\n type.precision === other.precision\n );\n}\n\nfunction compareFixedSizeBinary(type: T, other?: DataType | null): other is T {\n return (type === other) || (\n compareConstructor(type, other) &&\n type.byteWidth === other.byteWidth\n );\n}\n\nfunction compareDate(type: T, other?: DataType | null): other is T {\n return (type === other) || (\n compareConstructor(type, other) &&\n type.unit === other.unit\n );\n}\n\nfunction compareTimestamp(type: T, other?: DataType | null): other is T {\n return (type === other) || (\n compareConstructor(type, other) &&\n type.unit === other.unit &&\n type.timezone === other.timezone\n );\n}\n\nfunction compareTime(type: T, other?: DataType | null): other is T {\n return (type === other) || (\n compareConstructor(type, other) &&\n type.unit === other.unit &&\n type.bitWidth === other.bitWidth\n );\n}\n\nfunction compareList(type: T, other?: DataType | null): other is T {\n return (type === other) || (\n compareConstructor(type, other) &&\n type.children.length === other.children.length &&\n instance.compareFields(type.children, other.children)\n );\n}\n\nfunction compareStruct(type: T, other?: DataType | null): other is T {\n return (type === other) || (\n compareConstructor(type, other) &&\n type.children.length === other.children.length &&\n instance.compareFields(type.children, other.children)\n );\n}\n\nfunction compareUnion(type: T, other?: DataType | null): other is T {\n return (type === other) || (\n compareConstructor(type, other) &&\n type.mode === other.mode &&\n type.typeIds.every((x, i) => x === other.typeIds[i]) &&\n instance.compareFields(type.children, other.children)\n );\n}\n\nfunction compareDictionary(type: T, other?: DataType | null): other is T {\n return (type === other) || (\n compareConstructor(type, other) &&\n type.id === other.id &&\n type.isOrdered === other.isOrdered &&\n instance.visit( type.indices, other.indices) &&\n instance.visit(type.dictionary, other.dictionary)\n );\n}\n\nfunction compareInterval(type: T, other?: DataType | null): other is T {\n return (type === other) || (\n compareConstructor(type, other) &&\n type.unit === other.unit\n );\n}\n\nfunction compareFixedSizeList(type: T, other?: DataType | null): other is T {\n return (type === other) || (\n compareConstructor(type, other) &&\n type.listSize === other.listSize &&\n type.children.length === other.children.length &&\n instance.compareFields(type.children, other.children)\n );\n}\n\nfunction compareMap(type: T, other?: DataType | null): other is T {\n return (type === other) || (\n compareConstructor(type, other) &&\n type.keysSorted === other.keysSorted &&\n type.children.length === other.children.length &&\n instance.compareFields(type.children, other.children)\n );\n}\n\nTypeComparator.prototype.visitNull = compareAny;\nTypeComparator.prototype.visitBool = compareAny;\nTypeComparator.prototype.visitInt = compareInt;\nTypeComparator.prototype.visitInt8 = compareInt;\nTypeComparator.prototype.visitInt16 = compareInt;\nTypeComparator.prototype.visitInt32 = compareInt;\nTypeComparator.prototype.visitInt64 = compareInt;\nTypeComparator.prototype.visitUint8 = compareInt;\nTypeComparator.prototype.visitUint16 = compareInt;\nTypeComparator.prototype.visitUint32 = compareInt;\nTypeComparator.prototype.visitUint64 = compareInt;\nTypeComparator.prototype.visitFloat = compareFloat;\nTypeComparator.prototype.visitFloat16 = compareFloat;\nTypeComparator.prototype.visitFloat32 = compareFloat;\nTypeComparator.prototype.visitFloat64 = compareFloat;\nTypeComparator.prototype.visitUtf8 = compareAny;\nTypeComparator.prototype.visitBinary = compareAny;\nTypeComparator.prototype.visitFixedSizeBinary = compareFixedSizeBinary;\nTypeComparator.prototype.visitDate = compareDate;\nTypeComparator.prototype.visitDateDay = compareDate;\nTypeComparator.prototype.visitDateMillisecond = compareDate;\nTypeComparator.prototype.visitTimestamp = compareTimestamp;\nTypeComparator.prototype.visitTimestampSecond = compareTimestamp;\nTypeComparator.prototype.visitTimestampMillisecond = compareTimestamp;\nTypeComparator.prototype.visitTimestampMicrosecond = compareTimestamp;\nTypeComparator.prototype.visitTimestampNanosecond = compareTimestamp;\nTypeComparator.prototype.visitTime = compareTime;\nTypeComparator.prototype.visitTimeSecond = compareTime;\nTypeComparator.prototype.visitTimeMillisecond = compareTime;\nTypeComparator.prototype.visitTimeMicrosecond = compareTime;\nTypeComparator.prototype.visitTimeNanosecond = compareTime;\nTypeComparator.prototype.visitDecimal = compareAny;\nTypeComparator.prototype.visitList = compareList;\nTypeComparator.prototype.visitStruct = compareStruct;\nTypeComparator.prototype.visitUnion = compareUnion;\nTypeComparator.prototype.visitDenseUnion = compareUnion;\nTypeComparator.prototype.visitSparseUnion = compareUnion;\nTypeComparator.prototype.visitDictionary = compareDictionary;\nTypeComparator.prototype.visitInterval = compareInterval;\nTypeComparator.prototype.visitIntervalDayTime = compareInterval;\nTypeComparator.prototype.visitIntervalYearMonth = compareInterval;\nTypeComparator.prototype.visitFixedSizeList = compareFixedSizeList;\nTypeComparator.prototype.visitMap = compareMap;\n\n/** @ignore */\nexport const instance = new TypeComparator();\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/typecomparator.mjs b/frontend/node_modules/apache-arrow/visitor/typecomparator.mjs new file mode 100644 index 0000000000000000000000000000000000000000..042cd29f0606c654b2ed17e7349c8300faf3f283 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/typecomparator.mjs @@ -0,0 +1,155 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { Visitor } from '../visitor'; +/** @ignore */ +export class TypeComparator extends Visitor { + compareSchemas(schema, other) { + return (schema === other) || (other instanceof schema.constructor && + instance.compareFields(schema.fields, other.fields)); + } + compareFields(fields, others) { + return (fields === others) || (Array.isArray(fields) && + Array.isArray(others) && + fields.length === others.length && + fields.every((f, i) => instance.compareField(f, others[i]))); + } + compareField(field, other) { + return (field === other) || (other instanceof field.constructor && + field.name === other.name && + field.nullable === other.nullable && + instance.visit(field.type, other.type)); + } +} +function compareConstructor(type, other) { + return other instanceof type.constructor; +} +function compareAny(type, other) { + return (type === other) || compareConstructor(type, other); +} +function compareInt(type, other) { + return (type === other) || (compareConstructor(type, other) && + type.bitWidth === other.bitWidth && + type.isSigned === other.isSigned); +} +function compareFloat(type, other) { + return (type === other) || (compareConstructor(type, other) && + type.precision === other.precision); +} +function compareFixedSizeBinary(type, other) { + return (type === other) || (compareConstructor(type, other) && + type.byteWidth === other.byteWidth); +} +function compareDate(type, other) { + return (type === other) || (compareConstructor(type, other) && + type.unit === other.unit); +} +function compareTimestamp(type, other) { + return (type === other) || (compareConstructor(type, other) && + type.unit === other.unit && + type.timezone === other.timezone); +} +function compareTime(type, other) { + return (type === other) || (compareConstructor(type, other) && + type.unit === other.unit && + type.bitWidth === other.bitWidth); +} +function compareList(type, other) { + return (type === other) || (compareConstructor(type, other) && + type.children.length === other.children.length && + instance.compareFields(type.children, other.children)); +} +function compareStruct(type, other) { + return (type === other) || (compareConstructor(type, other) && + type.children.length === other.children.length && + instance.compareFields(type.children, other.children)); +} +function compareUnion(type, other) { + return (type === other) || (compareConstructor(type, other) && + type.mode === other.mode && + type.typeIds.every((x, i) => x === other.typeIds[i]) && + instance.compareFields(type.children, other.children)); +} +function compareDictionary(type, other) { + return (type === other) || (compareConstructor(type, other) && + type.id === other.id && + type.isOrdered === other.isOrdered && + instance.visit(type.indices, other.indices) && + instance.visit(type.dictionary, other.dictionary)); +} +function compareInterval(type, other) { + return (type === other) || (compareConstructor(type, other) && + type.unit === other.unit); +} +function compareFixedSizeList(type, other) { + return (type === other) || (compareConstructor(type, other) && + type.listSize === other.listSize && + type.children.length === other.children.length && + instance.compareFields(type.children, other.children)); +} +function compareMap(type, other) { + return (type === other) || (compareConstructor(type, other) && + type.keysSorted === other.keysSorted && + type.children.length === other.children.length && + instance.compareFields(type.children, other.children)); +} +TypeComparator.prototype.visitNull = compareAny; +TypeComparator.prototype.visitBool = compareAny; +TypeComparator.prototype.visitInt = compareInt; +TypeComparator.prototype.visitInt8 = compareInt; +TypeComparator.prototype.visitInt16 = compareInt; +TypeComparator.prototype.visitInt32 = compareInt; +TypeComparator.prototype.visitInt64 = compareInt; +TypeComparator.prototype.visitUint8 = compareInt; +TypeComparator.prototype.visitUint16 = compareInt; +TypeComparator.prototype.visitUint32 = compareInt; +TypeComparator.prototype.visitUint64 = compareInt; +TypeComparator.prototype.visitFloat = compareFloat; +TypeComparator.prototype.visitFloat16 = compareFloat; +TypeComparator.prototype.visitFloat32 = compareFloat; +TypeComparator.prototype.visitFloat64 = compareFloat; +TypeComparator.prototype.visitUtf8 = compareAny; +TypeComparator.prototype.visitBinary = compareAny; +TypeComparator.prototype.visitFixedSizeBinary = compareFixedSizeBinary; +TypeComparator.prototype.visitDate = compareDate; +TypeComparator.prototype.visitDateDay = compareDate; +TypeComparator.prototype.visitDateMillisecond = compareDate; +TypeComparator.prototype.visitTimestamp = compareTimestamp; +TypeComparator.prototype.visitTimestampSecond = compareTimestamp; +TypeComparator.prototype.visitTimestampMillisecond = compareTimestamp; +TypeComparator.prototype.visitTimestampMicrosecond = compareTimestamp; +TypeComparator.prototype.visitTimestampNanosecond = compareTimestamp; +TypeComparator.prototype.visitTime = compareTime; +TypeComparator.prototype.visitTimeSecond = compareTime; +TypeComparator.prototype.visitTimeMillisecond = compareTime; +TypeComparator.prototype.visitTimeMicrosecond = compareTime; +TypeComparator.prototype.visitTimeNanosecond = compareTime; +TypeComparator.prototype.visitDecimal = compareAny; +TypeComparator.prototype.visitList = compareList; +TypeComparator.prototype.visitStruct = compareStruct; +TypeComparator.prototype.visitUnion = compareUnion; +TypeComparator.prototype.visitDenseUnion = compareUnion; +TypeComparator.prototype.visitSparseUnion = compareUnion; +TypeComparator.prototype.visitDictionary = compareDictionary; +TypeComparator.prototype.visitInterval = compareInterval; +TypeComparator.prototype.visitIntervalDayTime = compareInterval; +TypeComparator.prototype.visitIntervalYearMonth = compareInterval; +TypeComparator.prototype.visitFixedSizeList = compareFixedSizeList; +TypeComparator.prototype.visitMap = compareMap; +/** @ignore */ +export const instance = new TypeComparator(); + +//# sourceMappingURL=typecomparator.mjs.map diff --git a/frontend/node_modules/apache-arrow/visitor/typecomparator.mjs.map b/frontend/node_modules/apache-arrow/visitor/typecomparator.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..30c89818c675c9870ff10f1ae1c32c88e7d4c7f6 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/typecomparator.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor/typecomparator.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAGrB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAiErC,cAAc;AACd,MAAM,OAAO,cAAe,SAAQ,OAAO;IACvC,cAAc,CAAwC,MAAiB,EAAE,KAAqB;QAC1F,OAAO,CAAC,MAAM,KAAK,KAAK,CAAC,IAAI,CACzB,KAAK,YAAY,MAAM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,UAAU,CAAC;AAE5E,cAAc;AACd,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,cAAc,EAAE,CAAC","file":"typecomparator.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Visitor } from '../visitor';\nimport { VectorType } from '../interfaces';\nimport { Schema, Field } from '../schema';\nimport {\n DataType, Dictionary,\n Bool, Null, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct,\n Float, Float16, Float32, Float64,\n Int, Uint8, Uint16, Uint32, Uint64, Int8, Int16, Int32, Int64,\n Date_, DateDay, DateMillisecond,\n Interval, IntervalDayTime, IntervalYearMonth,\n Time, TimeSecond, TimeMillisecond, TimeMicrosecond, TimeNanosecond,\n Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond,\n Union, DenseUnion, SparseUnion,\n} from '../type';\n\n/** @ignore */\nexport interface TypeComparator extends Visitor {\n visit(type: T, other?: DataType | null): other is T;\n visitMany(nodes: T[], others?: DataType[] | null): boolean[];\n getVisitFn(node: VectorType | Data | T): (other?: DataType | null) => other is T;\n visitNull (type: T, other?: DataType | null): other is T;\n visitBool (type: T, other?: DataType | null): other is T;\n visitInt (type: T, other?: DataType | null): other is T;\n visitInt8 (type: T, other?: DataType | null): other is T;\n visitInt16 (type: T, other?: DataType | null): other is T;\n visitInt32 (type: T, other?: DataType | null): other is T;\n visitInt64 (type: T, other?: DataType | null): other is T;\n visitUint8 (type: T, other?: DataType | null): other is T;\n visitUint16 (type: T, other?: DataType | null): other is T;\n visitUint32 (type: T, other?: DataType | null): other is T;\n visitUint64 (type: T, other?: DataType | null): other is T;\n visitFloat (type: T, other?: DataType | null): other is T;\n visitFloat16 (type: T, other?: DataType | null): other is T;\n visitFloat32 (type: T, other?: DataType | null): other is T;\n visitFloat64 (type: T, other?: DataType | null): other is T;\n visitUtf8 (type: T, other?: DataType | null): other is T;\n visitBinary (type: T, other?: DataType | null): other is T;\n visitFixedSizeBinary (type: T, other?: DataType | null): other is T;\n visitDate (type: T, other?: DataType | null): other is T;\n visitDateDay (type: T, other?: DataType | null): other is T;\n visitDateMillisecond (type: T, other?: DataType | null): other is T;\n visitTimestamp (type: T, other?: DataType | null): other is T;\n visitTimestampSecond (type: T, other?: DataType | null): other is T;\n visitTimestampMillisecond (type: T, other?: DataType | null): other is T;\n visitTimestampMicrosecond (type: T, other?: DataType | null): other is T;\n visitTimestampNanosecond (type: T, other?: DataType | null): other is T;\n visitTime (type: T, other?: DataType | null): other is T;\n visitTimeSecond (type: T, other?: DataType | null): other is T;\n visitTimeMillisecond (type: T, other?: DataType | null): other is T;\n visitTimeMicrosecond (type: T, other?: DataType | null): other is T;\n visitTimeNanosecond (type: T, other?: DataType | null): other is T;\n visitDecimal (type: T, other?: DataType | null): other is T;\n visitList (type: T, other?: DataType | null): other is T;\n visitStruct (type: T, other?: DataType | null): other is T;\n visitUnion (type: T, other?: DataType | null): other is T;\n visitDenseUnion (type: T, other?: DataType | null): other is T;\n visitSparseUnion (type: T, other?: DataType | null): other is T;\n visitDictionary (type: T, other?: DataType | null): other is T;\n visitInterval (type: T, other?: DataType | null): other is T;\n visitIntervalDayTime (type: T, other?: DataType | null): other is T;\n visitIntervalYearMonth (type: T, other?: DataType | null): other is T;\n visitFixedSizeList (type: T, other?: DataType | null): other is T;\n visitMap (type: T, other?: DataType | null): other is T;\n}\n\n/** @ignore */\nexport class TypeComparator extends Visitor {\n compareSchemas(schema: Schema, other?: Schema | null): other is Schema {\n return (schema === other) || (\n other instanceof schema.constructor &&\n instance.compareFields(schema.fields, other.fields)\n );\n }\n compareFields(fields: Field[], others?: Field[] | null): others is Field[] {\n return (fields === others) || (\n Array.isArray(fields) &&\n Array.isArray(others) &&\n fields.length === others.length &&\n fields.every((f, i) => instance.compareField(f, others[i]))\n );\n }\n compareField(field: Field, other?: Field | null): other is Field {\n return (field === other) || (\n other instanceof field.constructor &&\n field.name === other.name &&\n field.nullable === other.nullable &&\n instance.visit(field.type, other.type)\n );\n }\n}\n\nfunction compareConstructor(type: T, other?: DataType | null): other is T {\n return other instanceof type.constructor;\n}\n\nfunction compareAny(type: T, other?: DataType | null): other is T {\n return (type === other) || compareConstructor(type, other);\n}\n\nfunction compareInt(type: T, other?: DataType | null): other is T {\n return (type === other) || (\n compareConstructor(type, other) &&\n type.bitWidth === other.bitWidth &&\n type.isSigned === other.isSigned\n );\n}\n\nfunction compareFloat(type: T, other?: DataType | null): other is T {\n return (type === other) || (\n compareConstructor(type, other) &&\n type.precision === other.precision\n );\n}\n\nfunction compareFixedSizeBinary(type: T, other?: DataType | null): other is T {\n return (type === other) || (\n compareConstructor(type, other) &&\n type.byteWidth === other.byteWidth\n );\n}\n\nfunction compareDate(type: T, other?: DataType | null): other is T {\n return (type === other) || (\n compareConstructor(type, other) &&\n type.unit === other.unit\n );\n}\n\nfunction compareTimestamp(type: T, other?: DataType | null): other is T {\n return (type === other) || (\n compareConstructor(type, other) &&\n type.unit === other.unit &&\n type.timezone === other.timezone\n );\n}\n\nfunction compareTime(type: T, other?: DataType | null): other is T {\n return (type === other) || (\n compareConstructor(type, other) &&\n type.unit === other.unit &&\n type.bitWidth === other.bitWidth\n );\n}\n\nfunction compareList(type: T, other?: DataType | null): other is T {\n return (type === other) || (\n compareConstructor(type, other) &&\n type.children.length === other.children.length &&\n instance.compareFields(type.children, other.children)\n );\n}\n\nfunction compareStruct(type: T, other?: DataType | null): other is T {\n return (type === other) || (\n compareConstructor(type, other) &&\n type.children.length === other.children.length &&\n instance.compareFields(type.children, other.children)\n );\n}\n\nfunction compareUnion(type: T, other?: DataType | null): other is T {\n return (type === other) || (\n compareConstructor(type, other) &&\n type.mode === other.mode &&\n type.typeIds.every((x, i) => x === other.typeIds[i]) &&\n instance.compareFields(type.children, other.children)\n );\n}\n\nfunction compareDictionary(type: T, other?: DataType | null): other is T {\n return (type === other) || (\n compareConstructor(type, other) &&\n type.id === other.id &&\n type.isOrdered === other.isOrdered &&\n instance.visit( type.indices, other.indices) &&\n instance.visit(type.dictionary, other.dictionary)\n );\n}\n\nfunction compareInterval(type: T, other?: DataType | null): other is T {\n return (type === other) || (\n compareConstructor(type, other) &&\n type.unit === other.unit\n );\n}\n\nfunction compareFixedSizeList(type: T, other?: DataType | null): other is T {\n return (type === other) || (\n compareConstructor(type, other) &&\n type.listSize === other.listSize &&\n type.children.length === other.children.length &&\n instance.compareFields(type.children, other.children)\n );\n}\n\nfunction compareMap(type: T, other?: DataType | null): other is T {\n return (type === other) || (\n compareConstructor(type, other) &&\n type.keysSorted === other.keysSorted &&\n type.children.length === other.children.length &&\n instance.compareFields(type.children, other.children)\n );\n}\n\nTypeComparator.prototype.visitNull = compareAny;\nTypeComparator.prototype.visitBool = compareAny;\nTypeComparator.prototype.visitInt = compareInt;\nTypeComparator.prototype.visitInt8 = compareInt;\nTypeComparator.prototype.visitInt16 = compareInt;\nTypeComparator.prototype.visitInt32 = compareInt;\nTypeComparator.prototype.visitInt64 = compareInt;\nTypeComparator.prototype.visitUint8 = compareInt;\nTypeComparator.prototype.visitUint16 = compareInt;\nTypeComparator.prototype.visitUint32 = compareInt;\nTypeComparator.prototype.visitUint64 = compareInt;\nTypeComparator.prototype.visitFloat = compareFloat;\nTypeComparator.prototype.visitFloat16 = compareFloat;\nTypeComparator.prototype.visitFloat32 = compareFloat;\nTypeComparator.prototype.visitFloat64 = compareFloat;\nTypeComparator.prototype.visitUtf8 = compareAny;\nTypeComparator.prototype.visitBinary = compareAny;\nTypeComparator.prototype.visitFixedSizeBinary = compareFixedSizeBinary;\nTypeComparator.prototype.visitDate = compareDate;\nTypeComparator.prototype.visitDateDay = compareDate;\nTypeComparator.prototype.visitDateMillisecond = compareDate;\nTypeComparator.prototype.visitTimestamp = compareTimestamp;\nTypeComparator.prototype.visitTimestampSecond = compareTimestamp;\nTypeComparator.prototype.visitTimestampMillisecond = compareTimestamp;\nTypeComparator.prototype.visitTimestampMicrosecond = compareTimestamp;\nTypeComparator.prototype.visitTimestampNanosecond = compareTimestamp;\nTypeComparator.prototype.visitTime = compareTime;\nTypeComparator.prototype.visitTimeSecond = compareTime;\nTypeComparator.prototype.visitTimeMillisecond = compareTime;\nTypeComparator.prototype.visitTimeMicrosecond = compareTime;\nTypeComparator.prototype.visitTimeNanosecond = compareTime;\nTypeComparator.prototype.visitDecimal = compareAny;\nTypeComparator.prototype.visitList = compareList;\nTypeComparator.prototype.visitStruct = compareStruct;\nTypeComparator.prototype.visitUnion = compareUnion;\nTypeComparator.prototype.visitDenseUnion = compareUnion;\nTypeComparator.prototype.visitSparseUnion = compareUnion;\nTypeComparator.prototype.visitDictionary = compareDictionary;\nTypeComparator.prototype.visitInterval = compareInterval;\nTypeComparator.prototype.visitIntervalDayTime = compareInterval;\nTypeComparator.prototype.visitIntervalYearMonth = compareInterval;\nTypeComparator.prototype.visitFixedSizeList = compareFixedSizeList;\nTypeComparator.prototype.visitMap = compareMap;\n\n/** @ignore */\nexport const instance = new TypeComparator();\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/typector.d.ts b/frontend/node_modules/apache-arrow/visitor/typector.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1ef2c5cd1a5183876a02f0e26dbf71e35b60d5aa --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/typector.d.ts @@ -0,0 +1,62 @@ +import { Data } from '../data'; +import { Type } from '../enum'; +import * as type from '../type'; +import { DataType } from '../type'; +import { Visitor } from '../visitor'; +import { VectorType } from '../interfaces'; +import { DataTypeCtor } from '../interfaces'; +/** @ignore */ +export interface GetDataTypeConstructor extends Visitor { + visit(node: T): DataTypeCtor; + visitMany(nodes: T[]): DataTypeCtor[]; + getVisitFn(node: T): () => DataTypeCtor; + getVisitFn(node: VectorType | Data | T): () => DataTypeCtor; +} +/** @ignore */ +export declare class GetDataTypeConstructor extends Visitor { + visitNull(): typeof type.Null; + visitBool(): typeof type.Bool; + visitInt(): typeof type.Int; + visitInt8(): typeof type.Int8; + visitInt16(): typeof type.Int16; + visitInt32(): typeof type.Int32; + visitInt64(): typeof type.Int64; + visitUint8(): typeof type.Uint8; + visitUint16(): typeof type.Uint16; + visitUint32(): typeof type.Uint32; + visitUint64(): typeof type.Uint64; + visitFloat(): typeof type.Float; + visitFloat16(): typeof type.Float16; + visitFloat32(): typeof type.Float32; + visitFloat64(): typeof type.Float64; + visitUtf8(): typeof type.Utf8; + visitBinary(): typeof type.Binary; + visitFixedSizeBinary(): typeof type.FixedSizeBinary; + visitDate(): typeof type.Date_; + visitDateDay(): typeof type.DateDay; + visitDateMillisecond(): typeof type.DateMillisecond; + visitTimestamp(): typeof type.Timestamp; + visitTimestampSecond(): typeof type.TimestampSecond; + visitTimestampMillisecond(): typeof type.TimestampMillisecond; + visitTimestampMicrosecond(): typeof type.TimestampMicrosecond; + visitTimestampNanosecond(): typeof type.TimestampNanosecond; + visitTime(): typeof type.Time; + visitTimeSecond(): typeof type.TimeSecond; + visitTimeMillisecond(): typeof type.TimeMillisecond; + visitTimeMicrosecond(): typeof type.TimeMicrosecond; + visitTimeNanosecond(): typeof type.TimeNanosecond; + visitDecimal(): typeof type.Decimal; + visitList(): typeof type.List; + visitStruct(): typeof type.Struct; + visitUnion(): typeof type.Union; + visitDenseUnion(): typeof type.DenseUnion; + visitSparseUnion(): typeof type.SparseUnion; + visitDictionary(): typeof type.Dictionary; + visitInterval(): typeof type.Interval; + visitIntervalDayTime(): typeof type.IntervalDayTime; + visitIntervalYearMonth(): typeof type.IntervalYearMonth; + visitFixedSizeList(): typeof type.FixedSizeList; + visitMap(): typeof type.Map_; +} +/** @ignore */ +export declare const instance: GetDataTypeConstructor; diff --git a/frontend/node_modules/apache-arrow/visitor/typector.js b/frontend/node_modules/apache-arrow/visitor/typector.js new file mode 100644 index 0000000000000000000000000000000000000000..5e58eb8cab8997cb72650e41f7f12e0f57c8a14e --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/typector.js @@ -0,0 +1,71 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const type = require("../type"); +const visitor_1 = require("../visitor"); +/** @ignore */ +class GetDataTypeConstructor extends visitor_1.Visitor { + visitNull() { return type.Null; } + visitBool() { return type.Bool; } + visitInt() { return type.Int; } + visitInt8() { return type.Int8; } + visitInt16() { return type.Int16; } + visitInt32() { return type.Int32; } + visitInt64() { return type.Int64; } + visitUint8() { return type.Uint8; } + visitUint16() { return type.Uint16; } + visitUint32() { return type.Uint32; } + visitUint64() { return type.Uint64; } + visitFloat() { return type.Float; } + visitFloat16() { return type.Float16; } + visitFloat32() { return type.Float32; } + visitFloat64() { return type.Float64; } + visitUtf8() { return type.Utf8; } + visitBinary() { return type.Binary; } + visitFixedSizeBinary() { return type.FixedSizeBinary; } + visitDate() { return type.Date_; } + visitDateDay() { return type.DateDay; } + visitDateMillisecond() { return type.DateMillisecond; } + visitTimestamp() { return type.Timestamp; } + visitTimestampSecond() { return type.TimestampSecond; } + visitTimestampMillisecond() { return type.TimestampMillisecond; } + visitTimestampMicrosecond() { return type.TimestampMicrosecond; } + visitTimestampNanosecond() { return type.TimestampNanosecond; } + visitTime() { return type.Time; } + visitTimeSecond() { return type.TimeSecond; } + visitTimeMillisecond() { return type.TimeMillisecond; } + visitTimeMicrosecond() { return type.TimeMicrosecond; } + visitTimeNanosecond() { return type.TimeNanosecond; } + visitDecimal() { return type.Decimal; } + visitList() { return type.List; } + visitStruct() { return type.Struct; } + visitUnion() { return type.Union; } + visitDenseUnion() { return type.DenseUnion; } + visitSparseUnion() { return type.SparseUnion; } + visitDictionary() { return type.Dictionary; } + visitInterval() { return type.Interval; } + visitIntervalDayTime() { return type.IntervalDayTime; } + visitIntervalYearMonth() { return type.IntervalYearMonth; } + visitFixedSizeList() { return type.FixedSizeList; } + visitMap() { return type.Map_; } +} +exports.GetDataTypeConstructor = GetDataTypeConstructor; +/** @ignore */ +exports.instance = new GetDataTypeConstructor(); + +//# sourceMappingURL=typector.js.map diff --git a/frontend/node_modules/apache-arrow/visitor/typector.js.map b/frontend/node_modules/apache-arrow/visitor/typector.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a0346d7f8bb3e6318d7d504fdace3d7fee24f713 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/typector.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor/typector.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAIrB,gCAAgC;AAEhC,wCAAqC;AAYrC,cAAc;AACd,MAAa,sBAAuB,SAAQ,iBAAO;IACxC,SAAS,KAAsB,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACl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iB,CAAC,CAAC,CAAC;IAC/D,kBAAkB,KAAa,OAAO,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;IAC3D,QAAQ,KAAuB,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;CAC5D;AA5CD,wDA4CC;AAED,cAAc;AACD,QAAA,QAAQ,GAAG,IAAI,sBAAsB,EAAE,CAAC","file":"typector.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Type } from '../enum';\nimport * as type from '../type';\nimport { DataType } from '../type';\nimport { Visitor } from '../visitor';\nimport { VectorType } from '../interfaces';\nimport { DataTypeCtor } from '../interfaces';\n\n/** @ignore */\nexport interface GetDataTypeConstructor extends Visitor {\n visit(node: T): DataTypeCtor;\n visitMany(nodes: T[]): DataTypeCtor[];\n getVisitFn(node: T): () => DataTypeCtor;\n getVisitFn(node: VectorType | Data | T): () => DataTypeCtor;\n}\n\n/** @ignore */\nexport class GetDataTypeConstructor extends Visitor {\n public visitNull () { return type.Null; }\n public visitBool () { return type.Bool; }\n public visitInt () { return type.Int; }\n public visitInt8 () { return type.Int8; }\n public visitInt16 () { return type.Int16; }\n public visitInt32 () { return type.Int32; }\n public visitInt64 () { return type.Int64; }\n public visitUint8 () { return type.Uint8; }\n public visitUint16 () { return type.Uint16; }\n public visitUint32 () { return type.Uint32; }\n public visitUint64 () { return type.Uint64; }\n public visitFloat () { return type.Float; }\n public visitFloat16 () { return type.Float16; }\n public visitFloat32 () { return type.Float32; }\n public visitFloat64 () { return type.Float64; }\n public visitUtf8 () { return type.Utf8; }\n public visitBinary () { return type.Binary; }\n public visitFixedSizeBinary () { return type.FixedSizeBinary; }\n public visitDate () { return type.Date_; }\n public visitDateDay () { return type.DateDay; }\n public visitDateMillisecond () { return type.DateMillisecond; }\n public visitTimestamp () { return type.Timestamp; }\n public visitTimestampSecond () { return type.TimestampSecond; }\n public visitTimestampMillisecond () { return type.TimestampMillisecond; }\n public visitTimestampMicrosecond () { return type.TimestampMicrosecond; }\n public visitTimestampNanosecond () { return type.TimestampNanosecond; }\n public visitTime () { return type.Time; }\n public visitTimeSecond () { return type.TimeSecond; }\n public visitTimeMillisecond () { return type.TimeMillisecond; }\n public visitTimeMicrosecond () { return type.TimeMicrosecond; }\n public visitTimeNanosecond () { return type.TimeNanosecond; }\n public visitDecimal () { return type.Decimal; }\n public visitList () { return type.List; }\n public visitStruct () { return type.Struct; }\n public visitUnion () { return type.Union; }\n public visitDenseUnion () { return type.DenseUnion; }\n public visitSparseUnion () { return type.SparseUnion; }\n public visitDictionary () { return type.Dictionary; }\n public visitInterval () { return type.Interval; }\n public visitIntervalDayTime () { return type.IntervalDayTime; }\n public visitIntervalYearMonth () { return type.IntervalYearMonth; }\n public visitFixedSizeList () { return type.FixedSizeList; }\n public visitMap () { return type.Map_; }\n}\n\n/** @ignore */\nexport const instance = new GetDataTypeConstructor();\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/typector.mjs b/frontend/node_modules/apache-arrow/visitor/typector.mjs new file mode 100644 index 0000000000000000000000000000000000000000..a3c1034858319d8215cd7f1671b6a883f0684681 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/typector.mjs @@ -0,0 +1,68 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import * as type from '../type'; +import { Visitor } from '../visitor'; +/** @ignore */ +export class GetDataTypeConstructor extends Visitor { + visitNull() { return type.Null; } + visitBool() { return type.Bool; } + visitInt() { return type.Int; } + visitInt8() { return type.Int8; } + visitInt16() { return type.Int16; } + visitInt32() { return type.Int32; } + visitInt64() { return type.Int64; } + visitUint8() { return type.Uint8; } + visitUint16() { return type.Uint16; } + visitUint32() { return type.Uint32; } + visitUint64() { return type.Uint64; } + visitFloat() { return type.Float; } + visitFloat16() { return type.Float16; } + visitFloat32() { return type.Float32; } + visitFloat64() { return type.Float64; } + visitUtf8() { return type.Utf8; } + visitBinary() { return type.Binary; } + visitFixedSizeBinary() { return type.FixedSizeBinary; } + visitDate() { return type.Date_; } + visitDateDay() { return type.DateDay; } + visitDateMillisecond() { return type.DateMillisecond; } + visitTimestamp() { return type.Timestamp; } + visitTimestampSecond() { return type.TimestampSecond; } + visitTimestampMillisecond() { return type.TimestampMillisecond; } + visitTimestampMicrosecond() { return type.TimestampMicrosecond; } + visitTimestampNanosecond() { return type.TimestampNanosecond; } + visitTime() { return type.Time; } + visitTimeSecond() { return type.TimeSecond; } + visitTimeMillisecond() { return type.TimeMillisecond; } + visitTimeMicrosecond() { return type.TimeMicrosecond; } + visitTimeNanosecond() { return type.TimeNanosecond; } + visitDecimal() { return type.Decimal; } + visitList() { return type.List; } + visitStruct() { return type.Struct; } + visitUnion() { return type.Union; } + visitDenseUnion() { return type.DenseUnion; } + visitSparseUnion() { return type.SparseUnion; } + visitDictionary() { return type.Dictionary; } + visitInterval() { return type.Interval; } + visitIntervalDayTime() { return type.IntervalDayTime; } + visitIntervalYearMonth() { return type.IntervalYearMonth; } + visitFixedSizeList() { return type.FixedSizeList; } + visitMap() { return type.Map_; } +} +/** @ignore */ +export const instance = new GetDataTypeConstructor(); + +//# sourceMappingURL=typector.mjs.map diff --git a/frontend/node_modules/apache-arrow/visitor/typector.mjs.map b/frontend/node_modules/apache-arrow/visitor/typector.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..3629b8c9064ba5935180fb94e7c523a9dc7599d6 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/typector.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor/typector.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAIrB,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAYrC,cAAc;AACd,MAAM,OAAO,sBAAuB,SAAQ,OAAO;IACxC,SAAS,KAAsB,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAClD,SAAS,KAAsB,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAClD,QAAQ,KAAuB,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACjD,SAAS,KAAsB,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAClD,UAAU,KAAqB,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACnD,UAAU,KAAqB,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACnD,UAAU,KAAqB,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACnD,UAAU,KAAqB,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACnD,WAAW,KA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ACxD,oBAAoB,KAAW,OAAO,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;IAC7D,oBAAoB,KAAW,OAAO,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;IAC7D,mBAAmB,KAAY,OAAO,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;IAC5D,YAAY,KAAmB,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IACrD,SAAS,KAAsB,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAClD,WAAW,KAAoB,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IACpD,UAAU,KAAqB,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACnD,eAAe,KAAgB,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;IACxD,gBAAgB,KAAe,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IACzD,eAAe,KAAgB,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;IACxD,aAAa,KAAkB,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IACtD,oBAAoB,KAAW,OAAO,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;IAC7D,sBAAsB,KAAS,OAAO,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAC/D,kBAAkB,KAAa,OAAO,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;IAC3D,QAAQ,KAAuB,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;CAC5D;AAED,cAAc;AACd,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,sBAAsB,EAAE,CAAC","file":"typector.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Type } from '../enum';\nimport * as type from '../type';\nimport { DataType } from '../type';\nimport { Visitor } from '../visitor';\nimport { VectorType } from '../interfaces';\nimport { DataTypeCtor } from '../interfaces';\n\n/** @ignore */\nexport interface GetDataTypeConstructor extends Visitor {\n visit(node: T): DataTypeCtor;\n visitMany(nodes: T[]): DataTypeCtor[];\n getVisitFn(node: T): () => DataTypeCtor;\n getVisitFn(node: VectorType | Data | T): () => DataTypeCtor;\n}\n\n/** @ignore */\nexport class GetDataTypeConstructor extends Visitor {\n public visitNull () { return type.Null; }\n public visitBool () { return type.Bool; }\n public visitInt () { return type.Int; }\n public visitInt8 () { return type.Int8; }\n public visitInt16 () { return type.Int16; }\n public visitInt32 () { return type.Int32; }\n public visitInt64 () { return type.Int64; }\n public visitUint8 () { return type.Uint8; }\n public visitUint16 () { return type.Uint16; }\n public visitUint32 () { return type.Uint32; }\n public visitUint64 () { return type.Uint64; }\n public visitFloat () { return type.Float; }\n public visitFloat16 () { return type.Float16; }\n public visitFloat32 () { return type.Float32; }\n public visitFloat64 () { return type.Float64; }\n public visitUtf8 () { return type.Utf8; }\n public visitBinary () { return type.Binary; }\n public visitFixedSizeBinary () { return type.FixedSizeBinary; }\n public visitDate () { return type.Date_; }\n public visitDateDay () { return type.DateDay; }\n public visitDateMillisecond () { return type.DateMillisecond; }\n public visitTimestamp () { return type.Timestamp; }\n public visitTimestampSecond () { return type.TimestampSecond; }\n public visitTimestampMillisecond () { return type.TimestampMillisecond; }\n public visitTimestampMicrosecond () { return type.TimestampMicrosecond; }\n public visitTimestampNanosecond () { return type.TimestampNanosecond; }\n public visitTime () { return type.Time; }\n public visitTimeSecond () { return type.TimeSecond; }\n public visitTimeMillisecond () { return type.TimeMillisecond; }\n public visitTimeMicrosecond () { return type.TimeMicrosecond; }\n public visitTimeNanosecond () { return type.TimeNanosecond; }\n public visitDecimal () { return type.Decimal; }\n public visitList () { return type.List; }\n public visitStruct () { return type.Struct; }\n public visitUnion () { return type.Union; }\n public visitDenseUnion () { return type.DenseUnion; }\n public visitSparseUnion () { return type.SparseUnion; }\n public visitDictionary () { return type.Dictionary; }\n public visitInterval () { return type.Interval; }\n public visitIntervalDayTime () { return type.IntervalDayTime; }\n public visitIntervalYearMonth () { return type.IntervalYearMonth; }\n public visitFixedSizeList () { return type.FixedSizeList; }\n public visitMap () { return type.Map_; }\n}\n\n/** @ignore */\nexport const instance = new GetDataTypeConstructor();\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/vectorassembler.d.ts b/frontend/node_modules/apache-arrow/visitor/vectorassembler.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1e1d26a395739245b7d4817ee8f80a200b4d3232 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/vectorassembler.d.ts @@ -0,0 +1,47 @@ +import { Data } from '../data'; +import { Vector } from '../vector'; +import { Visitor } from '../visitor'; +import { Type } from '../enum'; +import { RecordBatch } from '../recordbatch'; +import { VectorType as V } from '../interfaces'; +import { BufferRegion, FieldNode } from '../ipc/metadata/message'; +import { DataType, Dictionary, Float, Int, Date_, Interval, Time, Timestamp, Union, Bool, Null, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct } from '../type'; +/** @ignore */ +export interface VectorAssembler extends Visitor { + visit(node: T): this; + visitMany(nodes: T[]): this[]; + getVisitFn(node: T): (vector: V) => this; + getVisitFn(node: V | Data | T): (vector: V) => this; + visitBool(vector: V): this; + visitInt(vector: V): this; + visitFloat(vector: V): this; + visitUtf8(vector: V): this; + visitBinary(vector: V): this; + visitFixedSizeBinary(vector: V): this; + visitDate(vector: V): this; + visitTimestamp(vector: V): this; + visitTime(vector: V): this; + visitDecimal(vector: V): this; + visitList(vector: V): this; + visitStruct(vector: V): this; + visitUnion(vector: V): this; + visitInterval(vector: V): this; + visitFixedSizeList(vector: V): this; + visitMap(vector: V): this; +} +/** @ignore */ +export declare class VectorAssembler extends Visitor { + /** @nocollapse */ + static assemble(...args: (T | T[])[]): VectorAssembler; + private constructor(); + visitNull(_nullV: V): this; + visitDictionary(vector: V): this; + readonly nodes: FieldNode[]; + readonly buffers: ArrayBufferView[]; + readonly byteLength: number; + readonly bufferRegions: BufferRegion[]; + protected _byteLength: number; + protected _nodes: FieldNode[]; + protected _buffers: ArrayBufferView[]; + protected _bufferRegions: BufferRegion[]; +} diff --git a/frontend/node_modules/apache-arrow/visitor/vectorassembler.js b/frontend/node_modules/apache-arrow/visitor/vectorassembler.js new file mode 100644 index 0000000000000000000000000000000000000000..7de53ecf7c3c66558256c8aab7eaad5be5806cd1 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/vectorassembler.js @@ -0,0 +1,195 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const visitor_1 = require("../visitor"); +const enum_1 = require("../enum"); +const recordbatch_1 = require("../recordbatch"); +const buffer_1 = require("../util/buffer"); +const bit_1 = require("../util/bit"); +const args_1 = require("../util/args"); +const message_1 = require("../ipc/metadata/message"); +const type_1 = require("../type"); +/** @ignore */ +class VectorAssembler extends visitor_1.Visitor { + constructor() { + super(); + this._byteLength = 0; + this._nodes = []; + this._buffers = []; + this._bufferRegions = []; + } + /** @nocollapse */ + static assemble(...args) { + const assembler = new VectorAssembler(); + const vectorChildren = args_1.selectVectorChildrenArgs(recordbatch_1.RecordBatch, args); + const [assembleResult = assembler] = assembler.visitMany(vectorChildren); + return assembleResult; + } + visit(vector) { + if (!type_1.DataType.isDictionary(vector.type)) { + const { data, length, nullCount } = vector; + if (length > 2147483647) { + /* istanbul ignore next */ + throw new RangeError('Cannot write arrays larger than 2^31 - 1 in length'); + } + if (!type_1.DataType.isNull(vector.type)) { + addBuffer.call(this, nullCount <= 0 + ? new Uint8Array(0) // placeholder validity buffer + : bit_1.truncateBitmap(data.offset, length, data.nullBitmap)); + } + this.nodes.push(new message_1.FieldNode(length, nullCount)); + } + return super.visit(vector); + } + visitNull(_nullV) { + return this; + } + visitDictionary(vector) { + // Assemble the indices here, Dictionary assembled separately. + return this.visit(vector.indices); + } + get nodes() { return this._nodes; } + get buffers() { return this._buffers; } + get byteLength() { return this._byteLength; } + get bufferRegions() { return this._bufferRegions; } +} +exports.VectorAssembler = VectorAssembler; +/** @ignore */ +function addBuffer(values) { + const byteLength = (values.byteLength + 7) & ~7; // Round up to a multiple of 8 + this.buffers.push(values); + this.bufferRegions.push(new message_1.BufferRegion(this._byteLength, byteLength)); + this._byteLength += byteLength; + return this; +} +/** @ignore */ +function assembleUnion(vector) { + const { type, length, typeIds, valueOffsets } = vector; + // All Union Vectors have a typeIds buffer + addBuffer.call(this, typeIds); + // If this is a Sparse Union, treat it like all other Nested types + if (type.mode === enum_1.UnionMode.Sparse) { + return assembleNestedVector.call(this, vector); + } + else if (type.mode === enum_1.UnionMode.Dense) { + // If this is a Dense Union, add the valueOffsets buffer and potentially slice the children + if (vector.offset <= 0) { + // If the Vector hasn't been sliced, write the existing valueOffsets + addBuffer.call(this, valueOffsets); + // We can treat this like all other Nested types + return assembleNestedVector.call(this, vector); + } + else { + // A sliced Dense Union is an unpleasant case. Because the offsets are different for + // each child vector, we need to "rebase" the valueOffsets for each child + // Union typeIds are not necessary 0-indexed + const maxChildTypeId = typeIds.reduce((x, y) => Math.max(x, y), typeIds[0]); + const childLengths = new Int32Array(maxChildTypeId + 1); + // Set all to -1 to indicate that we haven't observed a first occurrence of a particular child yet + const childOffsets = new Int32Array(maxChildTypeId + 1).fill(-1); + const shiftedOffsets = new Int32Array(length); + // If we have a non-zero offset, then the value offsets do not start at + // zero. We must a) create a new offsets array with shifted offsets and + // b) slice the values array accordingly + const unshiftedOffsets = buffer_1.rebaseValueOffsets(-valueOffsets[0], length, valueOffsets); + for (let typeId, shift, index = -1; ++index < length;) { + if ((shift = childOffsets[typeId = typeIds[index]]) === -1) { + shift = childOffsets[typeId] = unshiftedOffsets[typeId]; + } + shiftedOffsets[index] = unshiftedOffsets[index] - shift; + ++childLengths[typeId]; + } + addBuffer.call(this, shiftedOffsets); + // Slice and visit children accordingly + for (let child, childIndex = -1, numChildren = type.children.length; ++childIndex < numChildren;) { + if (child = vector.getChildAt(childIndex)) { + const typeId = type.typeIds[childIndex]; + const childLength = Math.min(length, childLengths[typeId]); + this.visit(child.slice(childOffsets[typeId], childLength)); + } + } + } + } + return this; +} +/** @ignore */ +function assembleBoolVector(vector) { + // Bool vector is a special case of FlatVector, as its data buffer needs to stay packed + let values; + if (vector.nullCount >= vector.length) { + // If all values are null, just insert a placeholder empty data buffer (fastest path) + return addBuffer.call(this, new Uint8Array(0)); + } + else if ((values = vector.values) instanceof Uint8Array) { + // If values is already a Uint8Array, slice the bitmap (fast path) + return addBuffer.call(this, bit_1.truncateBitmap(vector.offset, vector.length, values)); + } + // Otherwise if the underlying data *isn't* a Uint8Array, enumerate the + // values as bools and re-pack them into a Uint8Array. This code isn't + // reachable unless you're trying to manipulate the Data internals, + // we we're only doing this for safety. + /* istanbul ignore next */ + return addBuffer.call(this, bit_1.packBools(vector)); +} +/** @ignore */ +function assembleFlatVector(vector) { + return addBuffer.call(this, vector.values.subarray(0, vector.length * vector.stride)); +} +/** @ignore */ +function assembleFlatListVector(vector) { + const { length, values, valueOffsets } = vector; + const firstOffset = valueOffsets[0]; + const lastOffset = valueOffsets[length]; + const byteLength = Math.min(lastOffset - firstOffset, values.byteLength - firstOffset); + // Push in the order FlatList types read their buffers + addBuffer.call(this, buffer_1.rebaseValueOffsets(-valueOffsets[0], length, valueOffsets)); // valueOffsets buffer first + addBuffer.call(this, values.subarray(firstOffset, firstOffset + byteLength)); // sliced values buffer second + return this; +} +/** @ignore */ +function assembleListVector(vector) { + const { length, valueOffsets } = vector; + // If we have valueOffsets (MapVector, ListVector), push that buffer first + if (valueOffsets) { + addBuffer.call(this, buffer_1.rebaseValueOffsets(valueOffsets[0], length, valueOffsets)); + } + // Then insert the List's values child + return this.visit(vector.getChildAt(0)); +} +/** @ignore */ +function assembleNestedVector(vector) { + return this.visitMany(vector.type.children.map((_, i) => vector.getChildAt(i)).filter(Boolean))[0]; +} +VectorAssembler.prototype.visitBool = assembleBoolVector; +VectorAssembler.prototype.visitInt = assembleFlatVector; +VectorAssembler.prototype.visitFloat = assembleFlatVector; +VectorAssembler.prototype.visitUtf8 = assembleFlatListVector; +VectorAssembler.prototype.visitBinary = assembleFlatListVector; +VectorAssembler.prototype.visitFixedSizeBinary = assembleFlatVector; +VectorAssembler.prototype.visitDate = assembleFlatVector; +VectorAssembler.prototype.visitTimestamp = assembleFlatVector; +VectorAssembler.prototype.visitTime = assembleFlatVector; +VectorAssembler.prototype.visitDecimal = assembleFlatVector; +VectorAssembler.prototype.visitList = assembleListVector; +VectorAssembler.prototype.visitStruct = assembleNestedVector; +VectorAssembler.prototype.visitUnion = assembleUnion; +VectorAssembler.prototype.visitInterval = assembleFlatVector; +VectorAssembler.prototype.visitFixedSizeList = assembleListVector; +VectorAssembler.prototype.visitMap = assembleListVector; + +//# sourceMappingURL=vectorassembler.js.map diff --git a/frontend/node_modules/apache-arrow/visitor/vectorassembler.js.map b/frontend/node_modules/apache-arrow/visitor/vectorassembler.js.map new file mode 100644 index 0000000000000000000000000000000000000000..85e60dd21529c6baf35ebb40f681b6d0d5d75bd6 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/vectorassembler.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor/vectorassembler.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAIrB,wCAAqC;AACrC,kCAA0C;AAC1C,gDAA6C;AAE7C,2CAAoD;AACpD,qCAAwD;AACxD,uCAAwD;AACxD,qDAAkE;AAClE,kCAIiB;AA2BjB,cAAc;AACd,MAAa,eAAgB,SAAQ,iBAAO;IAUxC;QAAwB,KAAK,EAAE,CAAC;QAiCtB,gBAAW,GAAG,CAAC,CAAC;QAChB,WAAM,GAAgB,EAAE,CAAC;QACzB,aAAQ,GAAsB,EAAE,CAAC;QACjC,mBAAc,GAAmB,EAAE,CAAC;IApCb,CAAC;IARlC,kBAAkB;IACX,MAAM,CAAC,QAAQ,CAAiC,GAAG,IAAiB;QACvE,MAAM,SAAS,GAAG,IAAI,eAAe,EAAE,CAAC;QACxC,MAAM,cAAc,GAAG,+BAAwB,CAAC,yBAAW,EAAE,IAAI,CAAC,CAAC;QACnE,MAAM,CAAC,cAAc,GAAG,SAAS,CAAC,GAAG,SAAS,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;QACzE,OAAO,cAAc,CAAC;IAC1B,CAAC;IAIM,KAAK,CAAmB,MAAS;QACpC,IAAI,CAAC,eAAQ,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;YACrC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;YAC3C,IAAI,MAAM,GAAG,UAAU,EAAE;gBACrB,0BAA0B;gBAC1B,MAAM,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,eAAe,CAAC,SAAS,CAAC,WAAW,GAAY,sBAAsB,CAAC;AACxE,eAAe,CAAC,SAAS,CAAC,oBAAoB,GAAO,kBAAkB,CAAC;AACxE,eAAe,CAAC,SAAS,CAAC,SAAS,GAAkB,kBAAkB,CAAC;AACxE,eAAe,CAAC,SAAS,CAAC,cAAc,GAAa,kBAAkB,CAAC;AACxE,eAAe,CAAC,SAAS,CAAC,SAAS,GAAkB,kBAAkB,CAAC;AACxE,eAAe,CAAC,SAAS,CAAC,YAAY,GAAe,kBAAkB,CAAC;AACxE,eAAe,CAAC,SAAS,CAAC,SAAS,GAAkB,kBAAkB,CAAC;AACxE,eAAe,CAAC,SAAS,CAAC,WAAW,GAAc,oBAAoB,CAAC;AACxE,eAAe,CAAC,SAAS,CAAC,UAAU,GAAsB,aAAa,CAAC;AACxE,eAAe,CAAC,SAAS,CAAC,aAAa,GAAc,kBAAkB,CAAC;AACxE,eAAe,CAAC,SAAS,CAAC,kBAAkB,GAAS,kBAAkB,CAAC;AACxE,eAAe,CAAC,SAAS,CAAC,QAAQ,GAAmB,kBAAkB,CAAC","file":"vectorassembler.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Vector } from '../vector';\nimport { Visitor } from '../visitor';\nimport { Type, UnionMode } from '../enum';\nimport { RecordBatch } from '../recordbatch';\nimport { VectorType as V } from '../interfaces';\nimport { rebaseValueOffsets } from '../util/buffer';\nimport { packBools, truncateBitmap } from '../util/bit';\nimport { selectVectorChildrenArgs } from '../util/args';\nimport { BufferRegion, FieldNode } from '../ipc/metadata/message';\nimport {\n DataType, Dictionary,\n Float, Int, Date_, Interval, Time, Timestamp, Union,\n Bool, Null, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct,\n} from '../type';\n\n/** @ignore */\nexport interface VectorAssembler extends Visitor {\n visit(node: T): this;\n visitMany(nodes: T[]): this[];\n getVisitFn(node: T): (vector: V) => this;\n getVisitFn(node: V | Data | T): (vector: V) => this;\n\n visitBool (vector: V): this;\n visitInt (vector: V): this;\n visitFloat (vector: V): this;\n visitUtf8 (vector: V): this;\n visitBinary (vector: V): this;\n visitFixedSizeBinary (vector: V): this;\n visitDate (vector: V): this;\n visitTimestamp (vector: V): this;\n visitTime (vector: V): this;\n visitDecimal (vector: V): this;\n visitList (vector: V): this;\n visitStruct (vector: V): this;\n visitUnion (vector: V): this;\n visitInterval (vector: V): this;\n visitFixedSizeList (vector: V): this;\n visitMap (vector: V): this;\n}\n\n/** @ignore */\nexport class VectorAssembler extends Visitor {\n\n /** @nocollapse */\n public static assemble(...args: (T | T[])[]) {\n const assembler = new VectorAssembler();\n const vectorChildren = selectVectorChildrenArgs(RecordBatch, args);\n const [assembleResult = assembler] = assembler.visitMany(vectorChildren);\n return assembleResult;\n }\n\n private constructor() { super(); }\n\n public visit(vector: T): this {\n if (!DataType.isDictionary(vector.type)) {\n const { data, length, nullCount } = vector;\n if (length > 2147483647) {\n /* istanbul ignore next */\n throw new RangeError('Cannot write arrays larger than 2^31 - 1 in length');\n }\n if (!DataType.isNull(vector.type)) {\n addBuffer.call(this, nullCount <= 0\n ? new Uint8Array(0) // placeholder validity buffer\n : truncateBitmap(data.offset, length, data.nullBitmap)\n );\n }\n this.nodes.push(new FieldNode(length, nullCount));\n }\n return super.visit(vector);\n }\n\n public visitNull(_nullV: V) {\n return this;\n }\n public visitDictionary(vector: V) {\n // Assemble the indices here, Dictionary assembled separately.\n return this.visit(vector.indices);\n }\n\n public get nodes() { return this._nodes; }\n public get buffers() { return this._buffers; }\n public get byteLength() { return this._byteLength; }\n public get bufferRegions() { return this._bufferRegions; }\n\n protected _byteLength = 0;\n protected _nodes: FieldNode[] = [];\n protected _buffers: ArrayBufferView[] = [];\n protected _bufferRegions: BufferRegion[] = [];\n}\n\n/** @ignore */\nfunction addBuffer(this: VectorAssembler, values: ArrayBufferView) {\n const byteLength = (values.byteLength + 7) & ~7; // Round up to a multiple of 8\n this.buffers.push(values);\n this.bufferRegions.push(new BufferRegion(this._byteLength, byteLength));\n this._byteLength += byteLength;\n return this;\n}\n\n/** @ignore */\nfunction assembleUnion(this: VectorAssembler, vector: V) {\n const { type, length, typeIds, valueOffsets } = vector;\n // All Union Vectors have a typeIds buffer\n addBuffer.call(this, typeIds);\n // If this is a Sparse Union, treat it like all other Nested types\n if (type.mode === UnionMode.Sparse) {\n return assembleNestedVector.call(this, vector);\n } else if (type.mode === UnionMode.Dense) {\n // If this is a Dense Union, add the valueOffsets buffer and potentially slice the children\n if (vector.offset <= 0) {\n // If the Vector hasn't been sliced, write the existing valueOffsets\n addBuffer.call(this, valueOffsets);\n // We can treat this like all other Nested types\n return assembleNestedVector.call(this, vector);\n } else {\n // A sliced Dense Union is an unpleasant case. Because the offsets are different for\n // each child vector, we need to \"rebase\" the valueOffsets for each child\n // Union typeIds are not necessary 0-indexed\n const maxChildTypeId = typeIds.reduce((x, y) => Math.max(x, y), typeIds[0]);\n const childLengths = new Int32Array(maxChildTypeId + 1);\n // Set all to -1 to indicate that we haven't observed a first occurrence of a particular child yet\n const childOffsets = new Int32Array(maxChildTypeId + 1).fill(-1);\n const shiftedOffsets = new Int32Array(length);\n // If we have a non-zero offset, then the value offsets do not start at\n // zero. We must a) create a new offsets array with shifted offsets and\n // b) slice the values array accordingly\n const unshiftedOffsets = rebaseValueOffsets(-valueOffsets[0], length, valueOffsets);\n for (let typeId, shift, index = -1; ++index < length;) {\n if ((shift = childOffsets[typeId = typeIds[index]]) === -1) {\n shift = childOffsets[typeId] = unshiftedOffsets[typeId];\n }\n shiftedOffsets[index] = unshiftedOffsets[index] - shift;\n ++childLengths[typeId];\n }\n addBuffer.call(this, shiftedOffsets);\n // Slice and visit children accordingly\n for (let child: Vector | null, childIndex = -1, numChildren = type.children.length; ++childIndex < numChildren;) {\n if (child = vector.getChildAt(childIndex)) {\n const typeId = type.typeIds[childIndex];\n const childLength = Math.min(length, childLengths[typeId]);\n this.visit(child.slice(childOffsets[typeId], childLength));\n }\n }\n }\n }\n return this;\n}\n\n/** @ignore */\nfunction assembleBoolVector(this: VectorAssembler, vector: V) {\n // Bool vector is a special case of FlatVector, as its data buffer needs to stay packed\n let values: Uint8Array;\n if (vector.nullCount >= vector.length) {\n // If all values are null, just insert a placeholder empty data buffer (fastest path)\n return addBuffer.call(this, new Uint8Array(0));\n } else if ((values = vector.values) instanceof Uint8Array) {\n // If values is already a Uint8Array, slice the bitmap (fast path)\n return addBuffer.call(this, truncateBitmap(vector.offset, vector.length, values));\n }\n // Otherwise if the underlying data *isn't* a Uint8Array, enumerate the\n // values as bools and re-pack them into a Uint8Array. This code isn't\n // reachable unless you're trying to manipulate the Data internals,\n // we we're only doing this for safety.\n /* istanbul ignore next */\n return addBuffer.call(this, packBools(vector));\n}\n\n/** @ignore */\nfunction assembleFlatVector(this: VectorAssembler, vector: V) {\n return addBuffer.call(this, vector.values.subarray(0, vector.length * vector.stride));\n}\n\n/** @ignore */\nfunction assembleFlatListVector(this: VectorAssembler, vector: V) {\n const { length, values, valueOffsets } = vector;\n const firstOffset = valueOffsets[0];\n const lastOffset = valueOffsets[length];\n const byteLength = Math.min(lastOffset - firstOffset, values.byteLength - firstOffset);\n // Push in the order FlatList types read their buffers\n addBuffer.call(this, rebaseValueOffsets(-valueOffsets[0], length, valueOffsets)); // valueOffsets buffer first\n addBuffer.call(this, values.subarray(firstOffset, firstOffset + byteLength)); // sliced values buffer second\n return this;\n}\n\n/** @ignore */\nfunction assembleListVector(this: VectorAssembler, vector: V) {\n const { length, valueOffsets } = vector;\n // If we have valueOffsets (MapVector, ListVector), push that buffer first\n if (valueOffsets) {\n addBuffer.call(this, rebaseValueOffsets(valueOffsets[0], length, valueOffsets));\n }\n // Then insert the List's values child\n return this.visit(vector.getChildAt(0)!);\n}\n\n/** @ignore */\nfunction assembleNestedVector(this: VectorAssembler, vector: V) {\n return this.visitMany(vector.type.children.map((_, i) => vector.getChildAt(i)!).filter(Boolean))[0];\n}\n\nVectorAssembler.prototype.visitBool = assembleBoolVector;\nVectorAssembler.prototype.visitInt = assembleFlatVector;\nVectorAssembler.prototype.visitFloat = assembleFlatVector;\nVectorAssembler.prototype.visitUtf8 = assembleFlatListVector;\nVectorAssembler.prototype.visitBinary = assembleFlatListVector;\nVectorAssembler.prototype.visitFixedSizeBinary = assembleFlatVector;\nVectorAssembler.prototype.visitDate = assembleFlatVector;\nVectorAssembler.prototype.visitTimestamp = assembleFlatVector;\nVectorAssembler.prototype.visitTime = assembleFlatVector;\nVectorAssembler.prototype.visitDecimal = assembleFlatVector;\nVectorAssembler.prototype.visitList = assembleListVector;\nVectorAssembler.prototype.visitStruct = assembleNestedVector;\nVectorAssembler.prototype.visitUnion = assembleUnion;\nVectorAssembler.prototype.visitInterval = assembleFlatVector;\nVectorAssembler.prototype.visitFixedSizeList = assembleListVector;\nVectorAssembler.prototype.visitMap = assembleListVector;\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/vectorassembler.mjs b/frontend/node_modules/apache-arrow/visitor/vectorassembler.mjs new file mode 100644 index 0000000000000000000000000000000000000000..a5974f15d5269c3ab77700467e3f2839ae7faab8 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/vectorassembler.mjs @@ -0,0 +1,192 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { Visitor } from '../visitor'; +import { UnionMode } from '../enum'; +import { RecordBatch } from '../recordbatch'; +import { rebaseValueOffsets } from '../util/buffer'; +import { packBools, truncateBitmap } from '../util/bit'; +import { selectVectorChildrenArgs } from '../util/args'; +import { BufferRegion, FieldNode } from '../ipc/metadata/message'; +import { DataType, } from '../type'; +/** @ignore */ +export class VectorAssembler extends Visitor { + constructor() { + super(); + this._byteLength = 0; + this._nodes = []; + this._buffers = []; + this._bufferRegions = []; + } + /** @nocollapse */ + static assemble(...args) { + const assembler = new VectorAssembler(); + const vectorChildren = selectVectorChildrenArgs(RecordBatch, args); + const [assembleResult = assembler] = assembler.visitMany(vectorChildren); + return assembleResult; + } + visit(vector) { + if (!DataType.isDictionary(vector.type)) { + const { data, length, nullCount } = vector; + if (length > 2147483647) { + /* istanbul ignore next */ + throw new RangeError('Cannot write arrays larger than 2^31 - 1 in length'); + } + if (!DataType.isNull(vector.type)) { + addBuffer.call(this, nullCount <= 0 + ? new Uint8Array(0) // placeholder validity buffer + : truncateBitmap(data.offset, length, data.nullBitmap)); + } + this.nodes.push(new FieldNode(length, nullCount)); + } + return super.visit(vector); + } + visitNull(_nullV) { + return this; + } + visitDictionary(vector) { + // Assemble the indices here, Dictionary assembled separately. + return this.visit(vector.indices); + } + get nodes() { return this._nodes; } + get buffers() { return this._buffers; } + get byteLength() { return this._byteLength; } + get bufferRegions() { return this._bufferRegions; } +} +/** @ignore */ +function addBuffer(values) { + const byteLength = (values.byteLength + 7) & ~7; // Round up to a multiple of 8 + this.buffers.push(values); + this.bufferRegions.push(new BufferRegion(this._byteLength, byteLength)); + this._byteLength += byteLength; + return this; +} +/** @ignore */ +function assembleUnion(vector) { + const { type, length, typeIds, valueOffsets } = vector; + // All Union Vectors have a typeIds buffer + addBuffer.call(this, typeIds); + // If this is a Sparse Union, treat it like all other Nested types + if (type.mode === UnionMode.Sparse) { + return assembleNestedVector.call(this, vector); + } + else if (type.mode === UnionMode.Dense) { + // If this is a Dense Union, add the valueOffsets buffer and potentially slice the children + if (vector.offset <= 0) { + // If the Vector hasn't been sliced, write the existing valueOffsets + addBuffer.call(this, valueOffsets); + // We can treat this like all other Nested types + return assembleNestedVector.call(this, vector); + } + else { + // A sliced Dense Union is an unpleasant case. Because the offsets are different for + // each child vector, we need to "rebase" the valueOffsets for each child + // Union typeIds are not necessary 0-indexed + const maxChildTypeId = typeIds.reduce((x, y) => Math.max(x, y), typeIds[0]); + const childLengths = new Int32Array(maxChildTypeId + 1); + // Set all to -1 to indicate that we haven't observed a first occurrence of a particular child yet + const childOffsets = new Int32Array(maxChildTypeId + 1).fill(-1); + const shiftedOffsets = new Int32Array(length); + // If we have a non-zero offset, then the value offsets do not start at + // zero. We must a) create a new offsets array with shifted offsets and + // b) slice the values array accordingly + const unshiftedOffsets = rebaseValueOffsets(-valueOffsets[0], length, valueOffsets); + for (let typeId, shift, index = -1; ++index < length;) { + if ((shift = childOffsets[typeId = typeIds[index]]) === -1) { + shift = childOffsets[typeId] = unshiftedOffsets[typeId]; + } + shiftedOffsets[index] = unshiftedOffsets[index] - shift; + ++childLengths[typeId]; + } + addBuffer.call(this, shiftedOffsets); + // Slice and visit children accordingly + for (let child, childIndex = -1, numChildren = type.children.length; ++childIndex < numChildren;) { + if (child = vector.getChildAt(childIndex)) { + const typeId = type.typeIds[childIndex]; + const childLength = Math.min(length, childLengths[typeId]); + this.visit(child.slice(childOffsets[typeId], childLength)); + } + } + } + } + return this; +} +/** @ignore */ +function assembleBoolVector(vector) { + // Bool vector is a special case of FlatVector, as its data buffer needs to stay packed + let values; + if (vector.nullCount >= vector.length) { + // If all values are null, just insert a placeholder empty data buffer (fastest path) + return addBuffer.call(this, new Uint8Array(0)); + } + else if ((values = vector.values) instanceof Uint8Array) { + // If values is already a Uint8Array, slice the bitmap (fast path) + return addBuffer.call(this, truncateBitmap(vector.offset, vector.length, values)); + } + // Otherwise if the underlying data *isn't* a Uint8Array, enumerate the + // values as bools and re-pack them into a Uint8Array. This code isn't + // reachable unless you're trying to manipulate the Data internals, + // we we're only doing this for safety. + /* istanbul ignore next */ + return addBuffer.call(this, packBools(vector)); +} +/** @ignore */ +function assembleFlatVector(vector) { + return addBuffer.call(this, vector.values.subarray(0, vector.length * vector.stride)); +} +/** @ignore */ +function assembleFlatListVector(vector) { + const { length, values, valueOffsets } = vector; + const firstOffset = valueOffsets[0]; + const lastOffset = valueOffsets[length]; + const byteLength = Math.min(lastOffset - firstOffset, values.byteLength - firstOffset); + // Push in the order FlatList types read their buffers + addBuffer.call(this, rebaseValueOffsets(-valueOffsets[0], length, valueOffsets)); // valueOffsets buffer first + addBuffer.call(this, values.subarray(firstOffset, firstOffset + byteLength)); // sliced values buffer second + return this; +} +/** @ignore */ +function assembleListVector(vector) { + const { length, valueOffsets } = vector; + // If we have valueOffsets (MapVector, ListVector), push that buffer first + if (valueOffsets) { + addBuffer.call(this, rebaseValueOffsets(valueOffsets[0], length, valueOffsets)); + } + // Then insert the List's values child + return this.visit(vector.getChildAt(0)); +} +/** @ignore */ +function assembleNestedVector(vector) { + return this.visitMany(vector.type.children.map((_, i) => vector.getChildAt(i)).filter(Boolean))[0]; +} +VectorAssembler.prototype.visitBool = assembleBoolVector; +VectorAssembler.prototype.visitInt = assembleFlatVector; +VectorAssembler.prototype.visitFloat = assembleFlatVector; +VectorAssembler.prototype.visitUtf8 = assembleFlatListVector; +VectorAssembler.prototype.visitBinary = assembleFlatListVector; +VectorAssembler.prototype.visitFixedSizeBinary = assembleFlatVector; +VectorAssembler.prototype.visitDate = assembleFlatVector; +VectorAssembler.prototype.visitTimestamp = assembleFlatVector; +VectorAssembler.prototype.visitTime = assembleFlatVector; +VectorAssembler.prototype.visitDecimal = assembleFlatVector; +VectorAssembler.prototype.visitList = assembleListVector; +VectorAssembler.prototype.visitStruct = assembleNestedVector; +VectorAssembler.prototype.visitUnion = assembleUnion; +VectorAssembler.prototype.visitInterval = assembleFlatVector; +VectorAssembler.prototype.visitFixedSizeList = assembleListVector; +VectorAssembler.prototype.visitMap = assembleListVector; + +//# sourceMappingURL=vectorassembler.mjs.map diff --git a/frontend/node_modules/apache-arrow/visitor/vectorassembler.mjs.map b/frontend/node_modules/apache-arrow/visitor/vectorassembler.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..59ce962e3a9c0397a4e3574dfb559d7aca1bc027 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/vectorassembler.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor/vectorassembler.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAIrB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAQ,SAAS,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EACH,QAAQ,GAGX,MAAM,SAAS,CAAC;AA2BjB,cAAc;AACd,MAAM,OAAO,eAAgB,SAAQ,OAAO;IAUxC;QAAwB,KAAK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,CAAC;AACxE,eAAe,CAAC,SAAS,CAAC,kBAAkB,GAAS,kBAAkB,CAAC;AACxE,eAAe,CAAC,SAAS,CAAC,QAAQ,GAAmB,kBAAkB,CAAC","file":"vectorassembler.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Vector } from '../vector';\nimport { Visitor } from '../visitor';\nimport { Type, UnionMode } from '../enum';\nimport { RecordBatch } from '../recordbatch';\nimport { VectorType as V } from '../interfaces';\nimport { rebaseValueOffsets } from '../util/buffer';\nimport { packBools, truncateBitmap } from '../util/bit';\nimport { selectVectorChildrenArgs } from '../util/args';\nimport { BufferRegion, FieldNode } from '../ipc/metadata/message';\nimport {\n DataType, Dictionary,\n Float, Int, Date_, Interval, Time, Timestamp, Union,\n Bool, Null, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct,\n} from '../type';\n\n/** @ignore */\nexport interface VectorAssembler extends Visitor {\n visit(node: T): this;\n visitMany(nodes: T[]): this[];\n getVisitFn(node: T): (vector: V) => this;\n getVisitFn(node: V | Data | T): (vector: V) => this;\n\n visitBool (vector: V): this;\n visitInt (vector: V): this;\n visitFloat (vector: V): this;\n visitUtf8 (vector: V): this;\n visitBinary (vector: V): this;\n visitFixedSizeBinary (vector: V): this;\n visitDate (vector: V): this;\n visitTimestamp (vector: V): this;\n visitTime (vector: V): this;\n visitDecimal (vector: V): this;\n visitList (vector: V): this;\n visitStruct (vector: V): this;\n visitUnion (vector: V): this;\n visitInterval (vector: V): this;\n visitFixedSizeList (vector: V): this;\n visitMap (vector: V): this;\n}\n\n/** @ignore */\nexport class VectorAssembler extends Visitor {\n\n /** @nocollapse */\n public static assemble(...args: (T | T[])[]) {\n const assembler = new VectorAssembler();\n const vectorChildren = selectVectorChildrenArgs(RecordBatch, args);\n const [assembleResult = assembler] = assembler.visitMany(vectorChildren);\n return assembleResult;\n }\n\n private constructor() { super(); }\n\n public visit(vector: T): this {\n if (!DataType.isDictionary(vector.type)) {\n const { data, length, nullCount } = vector;\n if (length > 2147483647) {\n /* istanbul ignore next */\n throw new RangeError('Cannot write arrays larger than 2^31 - 1 in length');\n }\n if (!DataType.isNull(vector.type)) {\n addBuffer.call(this, nullCount <= 0\n ? new Uint8Array(0) // placeholder validity buffer\n : truncateBitmap(data.offset, length, data.nullBitmap)\n );\n }\n this.nodes.push(new FieldNode(length, nullCount));\n }\n return super.visit(vector);\n }\n\n public visitNull(_nullV: V) {\n return this;\n }\n public visitDictionary(vector: V) {\n // Assemble the indices here, Dictionary assembled separately.\n return this.visit(vector.indices);\n }\n\n public get nodes() { return this._nodes; }\n public get buffers() { return this._buffers; }\n public get byteLength() { return this._byteLength; }\n public get bufferRegions() { return this._bufferRegions; }\n\n protected _byteLength = 0;\n protected _nodes: FieldNode[] = [];\n protected _buffers: ArrayBufferView[] = [];\n protected _bufferRegions: BufferRegion[] = [];\n}\n\n/** @ignore */\nfunction addBuffer(this: VectorAssembler, values: ArrayBufferView) {\n const byteLength = (values.byteLength + 7) & ~7; // Round up to a multiple of 8\n this.buffers.push(values);\n this.bufferRegions.push(new BufferRegion(this._byteLength, byteLength));\n this._byteLength += byteLength;\n return this;\n}\n\n/** @ignore */\nfunction assembleUnion(this: VectorAssembler, vector: V) {\n const { type, length, typeIds, valueOffsets } = vector;\n // All Union Vectors have a typeIds buffer\n addBuffer.call(this, typeIds);\n // If this is a Sparse Union, treat it like all other Nested types\n if (type.mode === UnionMode.Sparse) {\n return assembleNestedVector.call(this, vector);\n } else if (type.mode === UnionMode.Dense) {\n // If this is a Dense Union, add the valueOffsets buffer and potentially slice the children\n if (vector.offset <= 0) {\n // If the Vector hasn't been sliced, write the existing valueOffsets\n addBuffer.call(this, valueOffsets);\n // We can treat this like all other Nested types\n return assembleNestedVector.call(this, vector);\n } else {\n // A sliced Dense Union is an unpleasant case. Because the offsets are different for\n // each child vector, we need to \"rebase\" the valueOffsets for each child\n // Union typeIds are not necessary 0-indexed\n const maxChildTypeId = typeIds.reduce((x, y) => Math.max(x, y), typeIds[0]);\n const childLengths = new Int32Array(maxChildTypeId + 1);\n // Set all to -1 to indicate that we haven't observed a first occurrence of a particular child yet\n const childOffsets = new Int32Array(maxChildTypeId + 1).fill(-1);\n const shiftedOffsets = new Int32Array(length);\n // If we have a non-zero offset, then the value offsets do not start at\n // zero. We must a) create a new offsets array with shifted offsets and\n // b) slice the values array accordingly\n const unshiftedOffsets = rebaseValueOffsets(-valueOffsets[0], length, valueOffsets);\n for (let typeId, shift, index = -1; ++index < length;) {\n if ((shift = childOffsets[typeId = typeIds[index]]) === -1) {\n shift = childOffsets[typeId] = unshiftedOffsets[typeId];\n }\n shiftedOffsets[index] = unshiftedOffsets[index] - shift;\n ++childLengths[typeId];\n }\n addBuffer.call(this, shiftedOffsets);\n // Slice and visit children accordingly\n for (let child: Vector | null, childIndex = -1, numChildren = type.children.length; ++childIndex < numChildren;) {\n if (child = vector.getChildAt(childIndex)) {\n const typeId = type.typeIds[childIndex];\n const childLength = Math.min(length, childLengths[typeId]);\n this.visit(child.slice(childOffsets[typeId], childLength));\n }\n }\n }\n }\n return this;\n}\n\n/** @ignore */\nfunction assembleBoolVector(this: VectorAssembler, vector: V) {\n // Bool vector is a special case of FlatVector, as its data buffer needs to stay packed\n let values: Uint8Array;\n if (vector.nullCount >= vector.length) {\n // If all values are null, just insert a placeholder empty data buffer (fastest path)\n return addBuffer.call(this, new Uint8Array(0));\n } else if ((values = vector.values) instanceof Uint8Array) {\n // If values is already a Uint8Array, slice the bitmap (fast path)\n return addBuffer.call(this, truncateBitmap(vector.offset, vector.length, values));\n }\n // Otherwise if the underlying data *isn't* a Uint8Array, enumerate the\n // values as bools and re-pack them into a Uint8Array. This code isn't\n // reachable unless you're trying to manipulate the Data internals,\n // we we're only doing this for safety.\n /* istanbul ignore next */\n return addBuffer.call(this, packBools(vector));\n}\n\n/** @ignore */\nfunction assembleFlatVector(this: VectorAssembler, vector: V) {\n return addBuffer.call(this, vector.values.subarray(0, vector.length * vector.stride));\n}\n\n/** @ignore */\nfunction assembleFlatListVector(this: VectorAssembler, vector: V) {\n const { length, values, valueOffsets } = vector;\n const firstOffset = valueOffsets[0];\n const lastOffset = valueOffsets[length];\n const byteLength = Math.min(lastOffset - firstOffset, values.byteLength - firstOffset);\n // Push in the order FlatList types read their buffers\n addBuffer.call(this, rebaseValueOffsets(-valueOffsets[0], length, valueOffsets)); // valueOffsets buffer first\n addBuffer.call(this, values.subarray(firstOffset, firstOffset + byteLength)); // sliced values buffer second\n return this;\n}\n\n/** @ignore */\nfunction assembleListVector(this: VectorAssembler, vector: V) {\n const { length, valueOffsets } = vector;\n // If we have valueOffsets (MapVector, ListVector), push that buffer first\n if (valueOffsets) {\n addBuffer.call(this, rebaseValueOffsets(valueOffsets[0], length, valueOffsets));\n }\n // Then insert the List's values child\n return this.visit(vector.getChildAt(0)!);\n}\n\n/** @ignore */\nfunction assembleNestedVector(this: VectorAssembler, vector: V) {\n return this.visitMany(vector.type.children.map((_, i) => vector.getChildAt(i)!).filter(Boolean))[0];\n}\n\nVectorAssembler.prototype.visitBool = assembleBoolVector;\nVectorAssembler.prototype.visitInt = assembleFlatVector;\nVectorAssembler.prototype.visitFloat = assembleFlatVector;\nVectorAssembler.prototype.visitUtf8 = assembleFlatListVector;\nVectorAssembler.prototype.visitBinary = assembleFlatListVector;\nVectorAssembler.prototype.visitFixedSizeBinary = assembleFlatVector;\nVectorAssembler.prototype.visitDate = assembleFlatVector;\nVectorAssembler.prototype.visitTimestamp = assembleFlatVector;\nVectorAssembler.prototype.visitTime = assembleFlatVector;\nVectorAssembler.prototype.visitDecimal = assembleFlatVector;\nVectorAssembler.prototype.visitList = assembleListVector;\nVectorAssembler.prototype.visitStruct = assembleNestedVector;\nVectorAssembler.prototype.visitUnion = assembleUnion;\nVectorAssembler.prototype.visitInterval = assembleFlatVector;\nVectorAssembler.prototype.visitFixedSizeList = assembleListVector;\nVectorAssembler.prototype.visitMap = assembleListVector;\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/vectorctor.d.ts b/frontend/node_modules/apache-arrow/visitor/vectorctor.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ddaa71ed45b60b7a865e3330808ed8db8e030f2d --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/vectorctor.d.ts @@ -0,0 +1,78 @@ +import { Data } from '../data'; +import { Type } from '../enum'; +import { DataType } from '../type'; +import { Visitor } from '../visitor'; +import { VectorType, VectorCtor } from '../interfaces'; +import { BinaryVector } from '../vector/binary'; +import { BoolVector } from '../vector/bool'; +import { DateVector, DateDayVector, DateMillisecondVector } from '../vector/date'; +import { DecimalVector } from '../vector/decimal'; +import { DictionaryVector } from '../vector/dictionary'; +import { FixedSizeBinaryVector } from '../vector/fixedsizebinary'; +import { FixedSizeListVector } from '../vector/fixedsizelist'; +import { FloatVector, Float16Vector, Float32Vector, Float64Vector } from '../vector/float'; +import { IntervalVector, IntervalDayTimeVector, IntervalYearMonthVector } from '../vector/interval'; +import { IntVector, Int8Vector, Int16Vector, Int32Vector, Int64Vector, Uint8Vector, Uint16Vector, Uint32Vector, Uint64Vector } from '../vector/int'; +import { ListVector } from '../vector/list'; +import { MapVector } from '../vector/map'; +import { NullVector } from '../vector/null'; +import { StructVector } from '../vector/struct'; +import { TimestampVector, TimestampSecondVector, TimestampMillisecondVector, TimestampMicrosecondVector, TimestampNanosecondVector } from '../vector/timestamp'; +import { TimeVector, TimeSecondVector, TimeMillisecondVector, TimeMicrosecondVector, TimeNanosecondVector } from '../vector/time'; +import { UnionVector, DenseUnionVector, SparseUnionVector } from '../vector/union'; +import { Utf8Vector } from '../vector/utf8'; +/** @ignore */ +export interface GetVectorConstructor extends Visitor { + visit(node: T): VectorCtor; + visitMany(nodes: T[]): VectorCtor[]; + getVisitFn(node: T): () => VectorCtor; + getVisitFn(node: VectorType | Data | T): () => VectorCtor; +} +/** @ignore */ +export declare class GetVectorConstructor extends Visitor { + visitNull(): typeof NullVector; + visitBool(): typeof BoolVector; + visitInt(): typeof IntVector; + visitInt8(): typeof Int8Vector; + visitInt16(): typeof Int16Vector; + visitInt32(): typeof Int32Vector; + visitInt64(): typeof Int64Vector; + visitUint8(): typeof Uint8Vector; + visitUint16(): typeof Uint16Vector; + visitUint32(): typeof Uint32Vector; + visitUint64(): typeof Uint64Vector; + visitFloat(): typeof FloatVector; + visitFloat16(): typeof Float16Vector; + visitFloat32(): typeof Float32Vector; + visitFloat64(): typeof Float64Vector; + visitUtf8(): typeof Utf8Vector; + visitBinary(): typeof BinaryVector; + visitFixedSizeBinary(): typeof FixedSizeBinaryVector; + visitDate(): typeof DateVector; + visitDateDay(): typeof DateDayVector; + visitDateMillisecond(): typeof DateMillisecondVector; + visitTimestamp(): typeof TimestampVector; + visitTimestampSecond(): typeof TimestampSecondVector; + visitTimestampMillisecond(): typeof TimestampMillisecondVector; + visitTimestampMicrosecond(): typeof TimestampMicrosecondVector; + visitTimestampNanosecond(): typeof TimestampNanosecondVector; + visitTime(): typeof TimeVector; + visitTimeSecond(): typeof TimeSecondVector; + visitTimeMillisecond(): typeof TimeMillisecondVector; + visitTimeMicrosecond(): typeof TimeMicrosecondVector; + visitTimeNanosecond(): typeof TimeNanosecondVector; + visitDecimal(): typeof DecimalVector; + visitList(): typeof ListVector; + visitStruct(): typeof StructVector; + visitUnion(): typeof UnionVector; + visitDenseUnion(): typeof DenseUnionVector; + visitSparseUnion(): typeof SparseUnionVector; + visitDictionary(): typeof DictionaryVector; + visitInterval(): typeof IntervalVector; + visitIntervalDayTime(): typeof IntervalDayTimeVector; + visitIntervalYearMonth(): typeof IntervalYearMonthVector; + visitFixedSizeList(): typeof FixedSizeListVector; + visitMap(): typeof MapVector; +} +/** @ignore */ +export declare const instance: GetVectorConstructor; diff --git a/frontend/node_modules/apache-arrow/visitor/vectorctor.js b/frontend/node_modules/apache-arrow/visitor/vectorctor.js new file mode 100644 index 0000000000000000000000000000000000000000..e0ffddf993b74346ff32aa062d32e6c44543be1e --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/vectorctor.js @@ -0,0 +1,88 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const visitor_1 = require("../visitor"); +const binary_1 = require("../vector/binary"); +const bool_1 = require("../vector/bool"); +const date_1 = require("../vector/date"); +const decimal_1 = require("../vector/decimal"); +const dictionary_1 = require("../vector/dictionary"); +const fixedsizebinary_1 = require("../vector/fixedsizebinary"); +const fixedsizelist_1 = require("../vector/fixedsizelist"); +const float_1 = require("../vector/float"); +const interval_1 = require("../vector/interval"); +const int_1 = require("../vector/int"); +const list_1 = require("../vector/list"); +const map_1 = require("../vector/map"); +const null_1 = require("../vector/null"); +const struct_1 = require("../vector/struct"); +const timestamp_1 = require("../vector/timestamp"); +const time_1 = require("../vector/time"); +const union_1 = require("../vector/union"); +const utf8_1 = require("../vector/utf8"); +/** @ignore */ +class GetVectorConstructor extends visitor_1.Visitor { + visitNull() { return null_1.NullVector; } + visitBool() { return bool_1.BoolVector; } + visitInt() { return int_1.IntVector; } + visitInt8() { return int_1.Int8Vector; } + visitInt16() { return int_1.Int16Vector; } + visitInt32() { return int_1.Int32Vector; } + visitInt64() { return int_1.Int64Vector; } + visitUint8() { return int_1.Uint8Vector; } + visitUint16() { return int_1.Uint16Vector; } + visitUint32() { return int_1.Uint32Vector; } + visitUint64() { return int_1.Uint64Vector; } + visitFloat() { return float_1.FloatVector; } + visitFloat16() { return float_1.Float16Vector; } + visitFloat32() { return float_1.Float32Vector; } + visitFloat64() { return float_1.Float64Vector; } + visitUtf8() { return utf8_1.Utf8Vector; } + visitBinary() { return binary_1.BinaryVector; } + visitFixedSizeBinary() { return fixedsizebinary_1.FixedSizeBinaryVector; } + visitDate() { return date_1.DateVector; } + visitDateDay() { return date_1.DateDayVector; } + visitDateMillisecond() { return date_1.DateMillisecondVector; } + visitTimestamp() { return timestamp_1.TimestampVector; } + visitTimestampSecond() { return timestamp_1.TimestampSecondVector; } + visitTimestampMillisecond() { return timestamp_1.TimestampMillisecondVector; } + visitTimestampMicrosecond() { return timestamp_1.TimestampMicrosecondVector; } + visitTimestampNanosecond() { return timestamp_1.TimestampNanosecondVector; } + visitTime() { return time_1.TimeVector; } + visitTimeSecond() { return time_1.TimeSecondVector; } + visitTimeMillisecond() { return time_1.TimeMillisecondVector; } + visitTimeMicrosecond() { return time_1.TimeMicrosecondVector; } + visitTimeNanosecond() { return time_1.TimeNanosecondVector; } + visitDecimal() { return decimal_1.DecimalVector; } + visitList() { return list_1.ListVector; } + visitStruct() { return struct_1.StructVector; } + visitUnion() { return union_1.UnionVector; } + visitDenseUnion() { return union_1.DenseUnionVector; } + visitSparseUnion() { return union_1.SparseUnionVector; } + visitDictionary() { return dictionary_1.DictionaryVector; } + visitInterval() { return interval_1.IntervalVector; } + visitIntervalDayTime() { return interval_1.IntervalDayTimeVector; } + visitIntervalYearMonth() { return interval_1.IntervalYearMonthVector; } + visitFixedSizeList() { return fixedsizelist_1.FixedSizeListVector; } + visitMap() { return map_1.MapVector; } +} +exports.GetVectorConstructor = GetVectorConstructor; +/** @ignore */ +exports.instance = new GetVectorConstructor(); + +//# sourceMappingURL=vectorctor.js.map diff --git a/frontend/node_modules/apache-arrow/visitor/vectorctor.js.map b/frontend/node_modules/apache-arrow/visitor/vectorctor.js.map new file mode 100644 index 0000000000000000000000000000000000000000..8961644c255d12eeb11308178a160dd0a5132012 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/vectorctor.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor/vectorctor.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAKrB,wCAAqC;AAGrC,6CAAgD;AAChD,yCAA4C;AAC5C,yCAAkF;AAClF,+CAAkD;AAClD,qDAAwD;AACxD,+DAAkE;AAClE,2DAA8D;AAC9D,2CAA2F;AAC3F,iDAAoG;AACpG,uCAAoJ;AACpJ,yCAA4C;AAC5C,uCAA0C;AAC1C,yCAA4C;AAC5C,6CAAgD;AAChD,mDAAgK;AAChK,yCAAkI;AAClI,2CAAmF;AACnF,yCAA4C;AAU5C,cAAc;AACd,MAAa,oBAAqB,SAAQ,iBAAO;IACtC,SAAS,KAAsB,OAAO,iBAAU,CAAC,CAAC,CAAC;IACnD,SAAS,KAAsB,OAAO,iBAAU,CAAC,CAAC,CAAC;IACnD,QAAQ,KAAuB,OAAO,eAAS,CAAC,CAAC,CAAC;IAClD,SAAS,KAAsB,OAAO,gBAAU,CAAC,CAAC,CAAC;IACnD,UAAU,KAAqB,OAAO,iBAAW,CAAC,CAAC,CAAC;IACpD,UAAU,KAAqB,OAAO,iBAAW,C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AqB,CAAC,CAAC,CAAC;IAC9D,mBAAmB,KAAY,OAAO,2BAAoB,CAAC,CAAC,CAAC;IAC7D,YAAY,KAAmB,OAAO,uBAAa,CAAC,CAAC,CAAC;IACtD,SAAS,KAAsB,OAAO,iBAAU,CAAC,CAAC,CAAC;IACnD,WAAW,KAAoB,OAAO,qBAAY,CAAC,CAAC,CAAC;IACrD,UAAU,KAAqB,OAAO,mBAAW,CAAC,CAAC,CAAC;IACpD,eAAe,KAAgB,OAAO,wBAAgB,CAAC,CAAC,CAAC;IACzD,gBAAgB,KAAe,OAAO,yBAAiB,CAAC,CAAC,CAAC;IAC1D,eAAe,KAAgB,OAAO,6BAAgB,CAAC,CAAC,CAAC;IACzD,aAAa,KAAkB,OAAO,yBAAc,CAAC,CAAC,CAAC;IACvD,oBAAoB,KAAW,OAAO,gCAAqB,CAAC,CAAC,CAAC;IAC9D,sBAAsB,KAAS,OAAO,kCAAuB,CAAC,CAAC,CAAC;IAChE,kBAAkB,KAAa,OAAO,mCAAmB,CAAC,CAAC,CAAC;IAC5D,QAAQ,KAAuB,OAAO,eAAS,CAAC,CAAC,CAAC;CAC5D;AA5CD,oDA4CC;AAED,cAAc;AACD,QAAA,QAAQ,GAAG,IAAI,oBAAoB,EAAE,CAAC","file":"vectorctor.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Type } from '../enum';\nimport { DataType } from '../type';\nimport { Visitor } from '../visitor';\nimport { VectorType, VectorCtor } from '../interfaces';\n\nimport { BinaryVector } from '../vector/binary';\nimport { BoolVector } from '../vector/bool';\nimport { DateVector, DateDayVector, DateMillisecondVector } from '../vector/date';\nimport { DecimalVector } from '../vector/decimal';\nimport { DictionaryVector } from '../vector/dictionary';\nimport { FixedSizeBinaryVector } from '../vector/fixedsizebinary';\nimport { FixedSizeListVector } from '../vector/fixedsizelist';\nimport { FloatVector, Float16Vector, Float32Vector, Float64Vector } from '../vector/float';\nimport { IntervalVector, IntervalDayTimeVector, IntervalYearMonthVector } from '../vector/interval';\nimport { IntVector, Int8Vector, Int16Vector, Int32Vector, Int64Vector, Uint8Vector, Uint16Vector, Uint32Vector, Uint64Vector } from '../vector/int';\nimport { ListVector } from '../vector/list';\nimport { MapVector } from '../vector/map';\nimport { NullVector } from '../vector/null';\nimport { StructVector } from '../vector/struct';\nimport { TimestampVector, TimestampSecondVector, TimestampMillisecondVector, TimestampMicrosecondVector, TimestampNanosecondVector } from '../vector/timestamp';\nimport { TimeVector, TimeSecondVector, TimeMillisecondVector, TimeMicrosecondVector, TimeNanosecondVector } from '../vector/time';\nimport { UnionVector, DenseUnionVector, SparseUnionVector } from '../vector/union';\nimport { Utf8Vector } from '../vector/utf8';\n\n/** @ignore */\nexport interface GetVectorConstructor extends Visitor {\n visit(node: T): VectorCtor;\n visitMany (nodes: T[]): VectorCtor[];\n getVisitFn(node: T): () => VectorCtor;\n getVisitFn(node: VectorType | Data | T): () => VectorCtor;\n}\n\n/** @ignore */\nexport class GetVectorConstructor extends Visitor {\n public visitNull () { return NullVector; }\n public visitBool () { return BoolVector; }\n public visitInt () { return IntVector; }\n public visitInt8 () { return Int8Vector; }\n public visitInt16 () { return Int16Vector; }\n public visitInt32 () { return Int32Vector; }\n public visitInt64 () { return Int64Vector; }\n public visitUint8 () { return Uint8Vector; }\n public visitUint16 () { return Uint16Vector; }\n public visitUint32 () { return Uint32Vector; }\n public visitUint64 () { return Uint64Vector; }\n public visitFloat () { return FloatVector; }\n public visitFloat16 () { return Float16Vector; }\n public visitFloat32 () { return Float32Vector; }\n public visitFloat64 () { return Float64Vector; }\n public visitUtf8 () { return Utf8Vector; }\n public visitBinary () { return BinaryVector; }\n public visitFixedSizeBinary () { return FixedSizeBinaryVector; }\n public visitDate () { return DateVector; }\n public visitDateDay () { return DateDayVector; }\n public visitDateMillisecond () { return DateMillisecondVector; }\n public visitTimestamp () { return TimestampVector; }\n public visitTimestampSecond () { return TimestampSecondVector; }\n public visitTimestampMillisecond () { return TimestampMillisecondVector; }\n public visitTimestampMicrosecond () { return TimestampMicrosecondVector; }\n public visitTimestampNanosecond () { return TimestampNanosecondVector; }\n public visitTime () { return TimeVector; }\n public visitTimeSecond () { return TimeSecondVector; }\n public visitTimeMillisecond () { return TimeMillisecondVector; }\n public visitTimeMicrosecond () { return TimeMicrosecondVector; }\n public visitTimeNanosecond () { return TimeNanosecondVector; }\n public visitDecimal () { return DecimalVector; }\n public visitList () { return ListVector; }\n public visitStruct () { return StructVector; }\n public visitUnion () { return UnionVector; }\n public visitDenseUnion () { return DenseUnionVector; }\n public visitSparseUnion () { return SparseUnionVector; }\n public visitDictionary () { return DictionaryVector; }\n public visitInterval () { return IntervalVector; }\n public visitIntervalDayTime () { return IntervalDayTimeVector; }\n public visitIntervalYearMonth () { return IntervalYearMonthVector; }\n public visitFixedSizeList () { return FixedSizeListVector; }\n public visitMap () { return MapVector; }\n}\n\n/** @ignore */\nexport const instance = new GetVectorConstructor();\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/vectorctor.mjs b/frontend/node_modules/apache-arrow/visitor/vectorctor.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f02d549142d11600f7912cf33fe67d0d34f2b635 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/vectorctor.mjs @@ -0,0 +1,85 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { Visitor } from '../visitor'; +import { BinaryVector } from '../vector/binary'; +import { BoolVector } from '../vector/bool'; +import { DateVector, DateDayVector, DateMillisecondVector } from '../vector/date'; +import { DecimalVector } from '../vector/decimal'; +import { DictionaryVector } from '../vector/dictionary'; +import { FixedSizeBinaryVector } from '../vector/fixedsizebinary'; +import { FixedSizeListVector } from '../vector/fixedsizelist'; +import { FloatVector, Float16Vector, Float32Vector, Float64Vector } from '../vector/float'; +import { IntervalVector, IntervalDayTimeVector, IntervalYearMonthVector } from '../vector/interval'; +import { IntVector, Int8Vector, Int16Vector, Int32Vector, Int64Vector, Uint8Vector, Uint16Vector, Uint32Vector, Uint64Vector } from '../vector/int'; +import { ListVector } from '../vector/list'; +import { MapVector } from '../vector/map'; +import { NullVector } from '../vector/null'; +import { StructVector } from '../vector/struct'; +import { TimestampVector, TimestampSecondVector, TimestampMillisecondVector, TimestampMicrosecondVector, TimestampNanosecondVector } from '../vector/timestamp'; +import { TimeVector, TimeSecondVector, TimeMillisecondVector, TimeMicrosecondVector, TimeNanosecondVector } from '../vector/time'; +import { UnionVector, DenseUnionVector, SparseUnionVector } from '../vector/union'; +import { Utf8Vector } from '../vector/utf8'; +/** @ignore */ +export class GetVectorConstructor extends Visitor { + visitNull() { return NullVector; } + visitBool() { return BoolVector; } + visitInt() { return IntVector; } + visitInt8() { return Int8Vector; } + visitInt16() { return Int16Vector; } + visitInt32() { return Int32Vector; } + visitInt64() { return Int64Vector; } + visitUint8() { return Uint8Vector; } + visitUint16() { return Uint16Vector; } + visitUint32() { return Uint32Vector; } + visitUint64() { return Uint64Vector; } + visitFloat() { return FloatVector; } + visitFloat16() { return Float16Vector; } + visitFloat32() { return Float32Vector; } + visitFloat64() { return Float64Vector; } + visitUtf8() { return Utf8Vector; } + visitBinary() { return BinaryVector; } + visitFixedSizeBinary() { return FixedSizeBinaryVector; } + visitDate() { return DateVector; } + visitDateDay() { return DateDayVector; } + visitDateMillisecond() { return DateMillisecondVector; } + visitTimestamp() { return TimestampVector; } + visitTimestampSecond() { return TimestampSecondVector; } + visitTimestampMillisecond() { return TimestampMillisecondVector; } + visitTimestampMicrosecond() { return TimestampMicrosecondVector; } + visitTimestampNanosecond() { return TimestampNanosecondVector; } + visitTime() { return TimeVector; } + visitTimeSecond() { return TimeSecondVector; } + visitTimeMillisecond() { return TimeMillisecondVector; } + visitTimeMicrosecond() { return TimeMicrosecondVector; } + visitTimeNanosecond() { return TimeNanosecondVector; } + visitDecimal() { return DecimalVector; } + visitList() { return ListVector; } + visitStruct() { return StructVector; } + visitUnion() { return UnionVector; } + visitDenseUnion() { return DenseUnionVector; } + visitSparseUnion() { return SparseUnionVector; } + visitDictionary() { return DictionaryVector; } + visitInterval() { return IntervalVector; } + visitIntervalDayTime() { return IntervalDayTimeVector; } + visitIntervalYearMonth() { return IntervalYearMonthVector; } + visitFixedSizeList() { return FixedSizeListVector; } + visitMap() { return MapVector; } +} +/** @ignore */ +export const instance = new GetVectorConstructor(); + +//# sourceMappingURL=vectorctor.mjs.map diff --git a/frontend/node_modules/apache-arrow/visitor/vectorctor.mjs.map b/frontend/node_modules/apache-arrow/visitor/vectorctor.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..b9c8f1d1dae5922ffcab3b3aed29054537b5ecd8 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/vectorctor.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor/vectorctor.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;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MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,oBAAoB,EAAE,CAAC","file":"vectorctor.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport { Type } from '../enum';\nimport { DataType } from '../type';\nimport { Visitor } from '../visitor';\nimport { VectorType, VectorCtor } from '../interfaces';\n\nimport { BinaryVector } from '../vector/binary';\nimport { BoolVector } from '../vector/bool';\nimport { DateVector, DateDayVector, DateMillisecondVector } from '../vector/date';\nimport { DecimalVector } from '../vector/decimal';\nimport { DictionaryVector } from '../vector/dictionary';\nimport { FixedSizeBinaryVector } from '../vector/fixedsizebinary';\nimport { FixedSizeListVector } from '../vector/fixedsizelist';\nimport { FloatVector, Float16Vector, Float32Vector, Float64Vector } from '../vector/float';\nimport { IntervalVector, IntervalDayTimeVector, IntervalYearMonthVector } from '../vector/interval';\nimport { IntVector, Int8Vector, Int16Vector, Int32Vector, Int64Vector, Uint8Vector, Uint16Vector, Uint32Vector, Uint64Vector } from '../vector/int';\nimport { ListVector } from '../vector/list';\nimport { MapVector } from '../vector/map';\nimport { NullVector } from '../vector/null';\nimport { StructVector } from '../vector/struct';\nimport { TimestampVector, TimestampSecondVector, TimestampMillisecondVector, TimestampMicrosecondVector, TimestampNanosecondVector } from '../vector/timestamp';\nimport { TimeVector, TimeSecondVector, TimeMillisecondVector, TimeMicrosecondVector, TimeNanosecondVector } from '../vector/time';\nimport { UnionVector, DenseUnionVector, SparseUnionVector } from '../vector/union';\nimport { Utf8Vector } from '../vector/utf8';\n\n/** @ignore */\nexport interface GetVectorConstructor extends Visitor {\n visit(node: T): VectorCtor;\n visitMany (nodes: T[]): VectorCtor[];\n getVisitFn(node: T): () => VectorCtor;\n getVisitFn(node: VectorType | Data | T): () => VectorCtor;\n}\n\n/** @ignore */\nexport class GetVectorConstructor extends Visitor {\n public visitNull () { return NullVector; }\n public visitBool () { return BoolVector; }\n public visitInt () { return IntVector; }\n public visitInt8 () { return Int8Vector; }\n public visitInt16 () { return Int16Vector; }\n public visitInt32 () { return Int32Vector; }\n public visitInt64 () { return Int64Vector; }\n public visitUint8 () { return Uint8Vector; }\n public visitUint16 () { return Uint16Vector; }\n public visitUint32 () { return Uint32Vector; }\n public visitUint64 () { return Uint64Vector; }\n public visitFloat () { return FloatVector; }\n public visitFloat16 () { return Float16Vector; }\n public visitFloat32 () { return Float32Vector; }\n public visitFloat64 () { return Float64Vector; }\n public visitUtf8 () { return Utf8Vector; }\n public visitBinary () { return BinaryVector; }\n public visitFixedSizeBinary () { return FixedSizeBinaryVector; }\n public visitDate () { return DateVector; }\n public visitDateDay () { return DateDayVector; }\n public visitDateMillisecond () { return DateMillisecondVector; }\n public visitTimestamp () { return TimestampVector; }\n public visitTimestampSecond () { return TimestampSecondVector; }\n public visitTimestampMillisecond () { return TimestampMillisecondVector; }\n public visitTimestampMicrosecond () { return TimestampMicrosecondVector; }\n public visitTimestampNanosecond () { return TimestampNanosecondVector; }\n public visitTime () { return TimeVector; }\n public visitTimeSecond () { return TimeSecondVector; }\n public visitTimeMillisecond () { return TimeMillisecondVector; }\n public visitTimeMicrosecond () { return TimeMicrosecondVector; }\n public visitTimeNanosecond () { return TimeNanosecondVector; }\n public visitDecimal () { return DecimalVector; }\n public visitList () { return ListVector; }\n public visitStruct () { return StructVector; }\n public visitUnion () { return UnionVector; }\n public visitDenseUnion () { return DenseUnionVector; }\n public visitSparseUnion () { return SparseUnionVector; }\n public visitDictionary () { return DictionaryVector; }\n public visitInterval () { return IntervalVector; }\n public visitIntervalDayTime () { return IntervalDayTimeVector; }\n public visitIntervalYearMonth () { return IntervalYearMonthVector; }\n public visitFixedSizeList () { return FixedSizeListVector; }\n public visitMap () { return MapVector; }\n}\n\n/** @ignore */\nexport const instance = new GetVectorConstructor();\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/vectorloader.d.ts b/frontend/node_modules/apache-arrow/visitor/vectorloader.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6d892089c9a4f9d6b78d3717fb1be09ecb512c20 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/vectorloader.d.ts @@ -0,0 +1,58 @@ +import { Data } from '../data'; +import * as type from '../type'; +import { Field } from '../schema'; +import { Vector } from '../vector'; +import { DataType } from '../type'; +import { Visitor } from '../visitor'; +import { BufferRegion, FieldNode } from '../ipc/metadata/message'; +/** @ignore */ +export interface VectorLoader extends Visitor { + visit(node: Field | T): Data; + visitMany(nodes: (Field | T)[]): Data[]; +} +/** @ignore */ +export declare class VectorLoader extends Visitor { + private bytes; + private nodes; + private nodesIndex; + private buffers; + private buffersIndex; + private dictionaries; + constructor(bytes: Uint8Array, nodes: FieldNode[], buffers: BufferRegion[], dictionaries: Map>); + visitNull(type: T, { length, }?: FieldNode): Data; + visitBool(type: T, { length, nullCount }?: FieldNode): Data; + visitInt(type: T, { length, nullCount }?: FieldNode): Data; + visitFloat(type: T, { length, nullCount }?: FieldNode): Data; + visitUtf8(type: T, { length, nullCount }?: FieldNode): Data; + visitBinary(type: T, { length, nullCount }?: FieldNode): Data; + visitFixedSizeBinary(type: T, { length, nullCount }?: FieldNode): Data; + visitDate(type: T, { length, nullCount }?: FieldNode): Data; + visitTimestamp(type: T, { length, nullCount }?: FieldNode): Data; + visitTime(type: T, { length, nullCount }?: FieldNode): Data; + visitDecimal(type: T, { length, nullCount }?: FieldNode): Data; + visitList(type: T, { length, nullCount }?: FieldNode): Data; + visitStruct(type: T, { length, nullCount }?: FieldNode): Data; + visitUnion(type: T): Data | Data; + visitDenseUnion(type: T, { length, nullCount }?: FieldNode): Data; + visitSparseUnion(type: T, { length, nullCount }?: FieldNode): Data; + visitDictionary(type: T, { length, nullCount }?: FieldNode): Data; + visitInterval(type: T, { length, nullCount }?: FieldNode): Data; + visitFixedSizeList(type: T, { length, nullCount }?: FieldNode): Data; + visitMap(type: T, { length, nullCount }?: FieldNode): Data; + protected nextFieldNode(): FieldNode; + protected nextBufferRange(): BufferRegion; + protected readNullBitmap(type: T, nullCount: number, buffer?: BufferRegion): Uint8Array; + protected readOffsets(type: T, buffer?: BufferRegion): Uint8Array; + protected readTypeIds(type: T, buffer?: BufferRegion): Uint8Array; + protected readData(_type: T, { length, offset }?: BufferRegion): Uint8Array; + protected readDictionary(type: T): Vector; +} +/** @ignore */ +export declare class JSONVectorLoader extends VectorLoader { + private sources; + constructor(sources: any[][], nodes: FieldNode[], buffers: BufferRegion[], dictionaries: Map>); + protected readNullBitmap(_type: T, nullCount: number, { offset }?: BufferRegion): Uint8Array; + protected readOffsets(_type: T, { offset }?: BufferRegion): Uint8Array; + protected readTypeIds(type: T, { offset }?: BufferRegion): Uint8Array; + protected readData(type: T, { offset }?: BufferRegion): Uint8Array; +} diff --git a/frontend/node_modules/apache-arrow/visitor/vectorloader.js b/frontend/node_modules/apache-arrow/visitor/vectorloader.js new file mode 100644 index 0000000000000000000000000000000000000000..8ce356a5a4d7886ab32a180c7da0e372bcab5984 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/vectorloader.js @@ -0,0 +1,132 @@ +"use strict"; +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +Object.defineProperty(exports, "__esModule", { value: true }); +const data_1 = require("../data"); +const schema_1 = require("../schema"); +const type_1 = require("../type"); +const visitor_1 = require("../visitor"); +const bit_1 = require("../util/bit"); +const utf8_1 = require("../util/utf8"); +const int_1 = require("../util/int"); +const enum_1 = require("../enum"); +const buffer_1 = require("../util/buffer"); +/** @ignore */ +class VectorLoader extends visitor_1.Visitor { + constructor(bytes, nodes, buffers, dictionaries) { + super(); + this.nodesIndex = -1; + this.buffersIndex = -1; + this.bytes = bytes; + this.nodes = nodes; + this.buffers = buffers; + this.dictionaries = dictionaries; + } + visit(node) { + return super.visit(node instanceof schema_1.Field ? node.type : node); + } + visitNull(type, { length, } = this.nextFieldNode()) { return data_1.Data.Null(type, 0, length); } + visitBool(type, { length, nullCount } = this.nextFieldNode()) { return data_1.Data.Bool(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); } + visitInt(type, { length, nullCount } = this.nextFieldNode()) { return data_1.Data.Int(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); } + visitFloat(type, { length, nullCount } = this.nextFieldNode()) { return data_1.Data.Float(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); } + visitUtf8(type, { length, nullCount } = this.nextFieldNode()) { return data_1.Data.Utf8(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readOffsets(type), this.readData(type)); } + visitBinary(type, { length, nullCount } = this.nextFieldNode()) { return data_1.Data.Binary(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readOffsets(type), this.readData(type)); } + visitFixedSizeBinary(type, { length, nullCount } = this.nextFieldNode()) { return data_1.Data.FixedSizeBinary(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); } + visitDate(type, { length, nullCount } = this.nextFieldNode()) { return data_1.Data.Date(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); } + visitTimestamp(type, { length, nullCount } = this.nextFieldNode()) { return data_1.Data.Timestamp(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); } + visitTime(type, { length, nullCount } = this.nextFieldNode()) { return data_1.Data.Time(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); } + visitDecimal(type, { length, nullCount } = this.nextFieldNode()) { return data_1.Data.Decimal(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); } + visitList(type, { length, nullCount } = this.nextFieldNode()) { return data_1.Data.List(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readOffsets(type), this.visit(type.children[0])); } + visitStruct(type, { length, nullCount } = this.nextFieldNode()) { return data_1.Data.Struct(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.visitMany(type.children)); } + visitUnion(type) { return type.mode === enum_1.UnionMode.Sparse ? this.visitSparseUnion(type) : this.visitDenseUnion(type); } + visitDenseUnion(type, { length, nullCount } = this.nextFieldNode()) { return data_1.Data.Union(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readTypeIds(type), this.readOffsets(type), this.visitMany(type.children)); } + visitSparseUnion(type, { length, nullCount } = this.nextFieldNode()) { return data_1.Data.Union(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readTypeIds(type), this.visitMany(type.children)); } + visitDictionary(type, { length, nullCount } = this.nextFieldNode()) { return data_1.Data.Dictionary(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type.indices), this.readDictionary(type)); } + visitInterval(type, { length, nullCount } = this.nextFieldNode()) { return data_1.Data.Interval(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); } + visitFixedSizeList(type, { length, nullCount } = this.nextFieldNode()) { return data_1.Data.FixedSizeList(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.visit(type.children[0])); } + visitMap(type, { length, nullCount } = this.nextFieldNode()) { return data_1.Data.Map(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readOffsets(type), this.visit(type.children[0])); } + nextFieldNode() { return this.nodes[++this.nodesIndex]; } + nextBufferRange() { return this.buffers[++this.buffersIndex]; } + readNullBitmap(type, nullCount, buffer = this.nextBufferRange()) { + return nullCount > 0 && this.readData(type, buffer) || new Uint8Array(0); + } + readOffsets(type, buffer) { return this.readData(type, buffer); } + readTypeIds(type, buffer) { return this.readData(type, buffer); } + readData(_type, { length, offset } = this.nextBufferRange()) { + return this.bytes.subarray(offset, offset + length); + } + readDictionary(type) { + return this.dictionaries.get(type.id); + } +} +exports.VectorLoader = VectorLoader; +/** @ignore */ +class JSONVectorLoader extends VectorLoader { + constructor(sources, nodes, buffers, dictionaries) { + super(new Uint8Array(0), nodes, buffers, dictionaries); + this.sources = sources; + } + readNullBitmap(_type, nullCount, { offset } = this.nextBufferRange()) { + return nullCount <= 0 ? new Uint8Array(0) : bit_1.packBools(this.sources[offset]); + } + readOffsets(_type, { offset } = this.nextBufferRange()) { + return buffer_1.toArrayBufferView(Uint8Array, buffer_1.toArrayBufferView(Int32Array, this.sources[offset])); + } + readTypeIds(type, { offset } = this.nextBufferRange()) { + return buffer_1.toArrayBufferView(Uint8Array, buffer_1.toArrayBufferView(type.ArrayType, this.sources[offset])); + } + readData(type, { offset } = this.nextBufferRange()) { + const { sources } = this; + if (type_1.DataType.isTimestamp(type)) { + return buffer_1.toArrayBufferView(Uint8Array, int_1.Int64.convertArray(sources[offset])); + } + else if ((type_1.DataType.isInt(type) || type_1.DataType.isTime(type)) && type.bitWidth === 64) { + return buffer_1.toArrayBufferView(Uint8Array, int_1.Int64.convertArray(sources[offset])); + } + else if (type_1.DataType.isDate(type) && type.unit === enum_1.DateUnit.MILLISECOND) { + return buffer_1.toArrayBufferView(Uint8Array, int_1.Int64.convertArray(sources[offset])); + } + else if (type_1.DataType.isDecimal(type)) { + return buffer_1.toArrayBufferView(Uint8Array, int_1.Int128.convertArray(sources[offset])); + } + else if (type_1.DataType.isBinary(type) || type_1.DataType.isFixedSizeBinary(type)) { + return binaryDataFromJSON(sources[offset]); + } + else if (type_1.DataType.isBool(type)) { + return bit_1.packBools(sources[offset]); + } + else if (type_1.DataType.isUtf8(type)) { + return utf8_1.encodeUtf8(sources[offset].join('')); + } + return buffer_1.toArrayBufferView(Uint8Array, buffer_1.toArrayBufferView(type.ArrayType, sources[offset].map((x) => +x))); + } +} +exports.JSONVectorLoader = JSONVectorLoader; +/** @ignore */ +function binaryDataFromJSON(values) { + // "DATA": ["49BC7D5B6C47D2","3F5FB6D9322026"] + // There are definitely more efficient ways to do this... but it gets the + // job done. + const joined = values.join(''); + const data = new Uint8Array(joined.length / 2); + for (let i = 0; i < joined.length; i += 2) { + data[i >> 1] = parseInt(joined.substr(i, 2), 16); + } + return data; +} + +//# sourceMappingURL=vectorloader.js.map diff --git a/frontend/node_modules/apache-arrow/visitor/vectorloader.js.map b/frontend/node_modules/apache-arrow/visitor/vectorloader.js.map new file mode 100644 index 0000000000000000000000000000000000000000..b3d5ce85c40fa298fa1eda0b9a86bde8eb27c58a --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/vectorloader.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor/vectorloader.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,kCAA+B;AAE/B,sCAAkC;AAElC,kCAAmC;AACnC,wCAAqC;AACrC,qCAAwC;AACxC,uCAA0C;AAC1C,qCAA4C;AAC5C,kCAA8C;AAC9C,2CAAmD;AASnD,cAAc;AACd,MAAa,YAAa,SAAQ,iBAAO;IAOrC,YAAY,KAAiB,EAAE,KAAkB,EAAE,OAAuB,EAAE,YAAsC;QAC9G,K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,OAAO,CAAC,MAAM,CAAc,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;SAC7D;QACD,OAAO,0BAAiB,CAAC,UAAU,EAAE,0BAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5G,CAAC;CACJ;AAlCD,4CAkCC;AAED,cAAc;AACd,SAAS,kBAAkB,CAAC,MAAgB;IACxC,8CAA8C;IAC9C,yEAAyE;IACzE,YAAY;IACZ,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC/B,MAAM,IAAI,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC/C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;QACvC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;KACpD;IACD,OAAO,IAAI,CAAC;AAChB,CAAC","file":"vectorloader.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport * as type from '../type';\nimport { Field } from '../schema';\nimport { Vector } from '../vector';\nimport { DataType } from '../type';\nimport { Visitor } from '../visitor';\nimport { packBools } from '../util/bit';\nimport { encodeUtf8 } from '../util/utf8';\nimport { Int64, Int128 } from '../util/int';\nimport { UnionMode, DateUnit } from '../enum';\nimport { toArrayBufferView } from '../util/buffer';\nimport { BufferRegion, FieldNode } from '../ipc/metadata/message';\n\n/** @ignore */\nexport interface VectorLoader extends Visitor {\n visit(node: Field | T): Data;\n visitMany(nodes: (Field | T)[]): Data[];\n}\n\n/** @ignore */\nexport class VectorLoader extends Visitor {\n private bytes: Uint8Array;\n private nodes: FieldNode[];\n private nodesIndex: number = -1;\n private buffers: BufferRegion[];\n private buffersIndex: number = -1;\n private dictionaries: Map>;\n constructor(bytes: Uint8Array, nodes: FieldNode[], buffers: BufferRegion[], dictionaries: Map>) {\n super();\n this.bytes = bytes;\n this.nodes = nodes;\n this.buffers = buffers;\n this.dictionaries = dictionaries;\n }\n\n public visit(node: Field | T): Data {\n return super.visit(node instanceof Field ? node.type : node);\n }\n\n public visitNull (type: T, { length, } = this.nextFieldNode()) { return Data.Null(type, 0, length); }\n public visitBool (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Bool(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); }\n public visitInt (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Int(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); }\n public visitFloat (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Float(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); }\n public visitUtf8 (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Utf8(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readOffsets(type), this.readData(type)); }\n public visitBinary (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Binary(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readOffsets(type), this.readData(type)); }\n public visitFixedSizeBinary (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.FixedSizeBinary(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); }\n public visitDate (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Date(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); }\n public visitTimestamp (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Timestamp(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); }\n public visitTime (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Time(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); }\n public visitDecimal (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Decimal(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); }\n public visitList (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.List(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readOffsets(type), this.visit(type.children[0])); }\n public visitStruct (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Struct(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.visitMany(type.children)); }\n public visitUnion (type: T ) { return type.mode === UnionMode.Sparse ? this.visitSparseUnion(type as type.SparseUnion) : this.visitDenseUnion(type as type.DenseUnion); }\n public visitDenseUnion (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Union(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readTypeIds(type), this.readOffsets(type), this.visitMany(type.children)); }\n public visitSparseUnion (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Union(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readTypeIds(type), this.visitMany(type.children)); }\n public visitDictionary (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Dictionary(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type.indices), this.readDictionary(type)); }\n public visitInterval (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Interval(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); }\n public visitFixedSizeList (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.FixedSizeList(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.visit(type.children[0])); }\n public visitMap (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Map(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readOffsets(type), this.visit(type.children[0])); }\n\n protected nextFieldNode() { return this.nodes[++this.nodesIndex]; }\n protected nextBufferRange() { return this.buffers[++this.buffersIndex]; }\n protected readNullBitmap(type: T, nullCount: number, buffer = this.nextBufferRange()) {\n return nullCount > 0 && this.readData(type, buffer) || new Uint8Array(0);\n }\n protected readOffsets(type: T, buffer?: BufferRegion) { return this.readData(type, buffer); }\n protected readTypeIds(type: T, buffer?: BufferRegion) { return this.readData(type, buffer); }\n protected readData(_type: T, { length, offset } = this.nextBufferRange()) {\n return this.bytes.subarray(offset, offset + length);\n }\n protected readDictionary(type: T): Vector {\n return this.dictionaries.get(type.id)!;\n }\n}\n\n/** @ignore */\nexport class JSONVectorLoader extends VectorLoader {\n private sources: any[][];\n constructor(sources: any[][], nodes: FieldNode[], buffers: BufferRegion[], dictionaries: Map>) {\n super(new Uint8Array(0), nodes, buffers, dictionaries);\n this.sources = sources;\n }\n protected readNullBitmap(_type: T, nullCount: number, { offset } = this.nextBufferRange()) {\n return nullCount <= 0 ? new Uint8Array(0) : packBools(this.sources[offset]);\n }\n protected readOffsets(_type: T, { offset } = this.nextBufferRange()) {\n return toArrayBufferView(Uint8Array, toArrayBufferView(Int32Array, this.sources[offset]));\n }\n protected readTypeIds(type: T, { offset } = this.nextBufferRange()) {\n return toArrayBufferView(Uint8Array, toArrayBufferView(type.ArrayType, this.sources[offset]));\n }\n protected readData(type: T, { offset } = this.nextBufferRange()) {\n const { sources } = this;\n if (DataType.isTimestamp(type)) {\n return toArrayBufferView(Uint8Array, Int64.convertArray(sources[offset] as string[]));\n } else if ((DataType.isInt(type) || DataType.isTime(type)) && type.bitWidth === 64) {\n return toArrayBufferView(Uint8Array, Int64.convertArray(sources[offset] as string[]));\n } else if (DataType.isDate(type) && type.unit === DateUnit.MILLISECOND) {\n return toArrayBufferView(Uint8Array, Int64.convertArray(sources[offset] as string[]));\n } else if (DataType.isDecimal(type)) {\n return toArrayBufferView(Uint8Array, Int128.convertArray(sources[offset] as string[]));\n } else if (DataType.isBinary(type) || DataType.isFixedSizeBinary(type)) {\n return binaryDataFromJSON(sources[offset] as string[]);\n } else if (DataType.isBool(type)) {\n return packBools(sources[offset] as number[]);\n } else if (DataType.isUtf8(type)) {\n return encodeUtf8((sources[offset] as string[]).join(''));\n }\n return toArrayBufferView(Uint8Array, toArrayBufferView(type.ArrayType, sources[offset].map((x) => +x)));\n }\n}\n\n/** @ignore */\nfunction binaryDataFromJSON(values: string[]) {\n // \"DATA\": [\"49BC7D5B6C47D2\",\"3F5FB6D9322026\"]\n // There are definitely more efficient ways to do this... but it gets the\n // job done.\n const joined = values.join('');\n const data = new Uint8Array(joined.length / 2);\n for (let i = 0; i < joined.length; i += 2) {\n data[i >> 1] = parseInt(joined.substr(i, 2), 16);\n }\n return data;\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/apache-arrow/visitor/vectorloader.mjs b/frontend/node_modules/apache-arrow/visitor/vectorloader.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b8cb2eee6743b7c7dc52071996c403d46160cf92 --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/vectorloader.mjs @@ -0,0 +1,128 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +import { Data } from '../data'; +import { Field } from '../schema'; +import { DataType } from '../type'; +import { Visitor } from '../visitor'; +import { packBools } from '../util/bit'; +import { encodeUtf8 } from '../util/utf8'; +import { Int64, Int128 } from '../util/int'; +import { UnionMode, DateUnit } from '../enum'; +import { toArrayBufferView } from '../util/buffer'; +/** @ignore */ +export class VectorLoader extends Visitor { + constructor(bytes, nodes, buffers, dictionaries) { + super(); + this.nodesIndex = -1; + this.buffersIndex = -1; + this.bytes = bytes; + this.nodes = nodes; + this.buffers = buffers; + this.dictionaries = dictionaries; + } + visit(node) { + return super.visit(node instanceof Field ? node.type : node); + } + visitNull(type, { length, } = this.nextFieldNode()) { return Data.Null(type, 0, length); } + visitBool(type, { length, nullCount } = this.nextFieldNode()) { return Data.Bool(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); } + visitInt(type, { length, nullCount } = this.nextFieldNode()) { return Data.Int(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); } + visitFloat(type, { length, nullCount } = this.nextFieldNode()) { return Data.Float(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); } + visitUtf8(type, { length, nullCount } = this.nextFieldNode()) { return Data.Utf8(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readOffsets(type), this.readData(type)); } + visitBinary(type, { length, nullCount } = this.nextFieldNode()) { return Data.Binary(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readOffsets(type), this.readData(type)); } + visitFixedSizeBinary(type, { length, nullCount } = this.nextFieldNode()) { return Data.FixedSizeBinary(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); } + visitDate(type, { length, nullCount } = this.nextFieldNode()) { return Data.Date(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); } + visitTimestamp(type, { length, nullCount } = this.nextFieldNode()) { return Data.Timestamp(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); } + visitTime(type, { length, nullCount } = this.nextFieldNode()) { return Data.Time(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); } + visitDecimal(type, { length, nullCount } = this.nextFieldNode()) { return Data.Decimal(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); } + visitList(type, { length, nullCount } = this.nextFieldNode()) { return Data.List(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readOffsets(type), this.visit(type.children[0])); } + visitStruct(type, { length, nullCount } = this.nextFieldNode()) { return Data.Struct(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.visitMany(type.children)); } + visitUnion(type) { return type.mode === UnionMode.Sparse ? this.visitSparseUnion(type) : this.visitDenseUnion(type); } + visitDenseUnion(type, { length, nullCount } = this.nextFieldNode()) { return Data.Union(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readTypeIds(type), this.readOffsets(type), this.visitMany(type.children)); } + visitSparseUnion(type, { length, nullCount } = this.nextFieldNode()) { return Data.Union(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readTypeIds(type), this.visitMany(type.children)); } + visitDictionary(type, { length, nullCount } = this.nextFieldNode()) { return Data.Dictionary(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type.indices), this.readDictionary(type)); } + visitInterval(type, { length, nullCount } = this.nextFieldNode()) { return Data.Interval(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); } + visitFixedSizeList(type, { length, nullCount } = this.nextFieldNode()) { return Data.FixedSizeList(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.visit(type.children[0])); } + visitMap(type, { length, nullCount } = this.nextFieldNode()) { return Data.Map(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readOffsets(type), this.visit(type.children[0])); } + nextFieldNode() { return this.nodes[++this.nodesIndex]; } + nextBufferRange() { return this.buffers[++this.buffersIndex]; } + readNullBitmap(type, nullCount, buffer = this.nextBufferRange()) { + return nullCount > 0 && this.readData(type, buffer) || new Uint8Array(0); + } + readOffsets(type, buffer) { return this.readData(type, buffer); } + readTypeIds(type, buffer) { return this.readData(type, buffer); } + readData(_type, { length, offset } = this.nextBufferRange()) { + return this.bytes.subarray(offset, offset + length); + } + readDictionary(type) { + return this.dictionaries.get(type.id); + } +} +/** @ignore */ +export class JSONVectorLoader extends VectorLoader { + constructor(sources, nodes, buffers, dictionaries) { + super(new Uint8Array(0), nodes, buffers, dictionaries); + this.sources = sources; + } + readNullBitmap(_type, nullCount, { offset } = this.nextBufferRange()) { + return nullCount <= 0 ? new Uint8Array(0) : packBools(this.sources[offset]); + } + readOffsets(_type, { offset } = this.nextBufferRange()) { + return toArrayBufferView(Uint8Array, toArrayBufferView(Int32Array, this.sources[offset])); + } + readTypeIds(type, { offset } = this.nextBufferRange()) { + return toArrayBufferView(Uint8Array, toArrayBufferView(type.ArrayType, this.sources[offset])); + } + readData(type, { offset } = this.nextBufferRange()) { + const { sources } = this; + if (DataType.isTimestamp(type)) { + return toArrayBufferView(Uint8Array, Int64.convertArray(sources[offset])); + } + else if ((DataType.isInt(type) || DataType.isTime(type)) && type.bitWidth === 64) { + return toArrayBufferView(Uint8Array, Int64.convertArray(sources[offset])); + } + else if (DataType.isDate(type) && type.unit === DateUnit.MILLISECOND) { + return toArrayBufferView(Uint8Array, Int64.convertArray(sources[offset])); + } + else if (DataType.isDecimal(type)) { + return toArrayBufferView(Uint8Array, Int128.convertArray(sources[offset])); + } + else if (DataType.isBinary(type) || DataType.isFixedSizeBinary(type)) { + return binaryDataFromJSON(sources[offset]); + } + else if (DataType.isBool(type)) { + return packBools(sources[offset]); + } + else if (DataType.isUtf8(type)) { + return encodeUtf8(sources[offset].join('')); + } + return toArrayBufferView(Uint8Array, toArrayBufferView(type.ArrayType, sources[offset].map((x) => +x))); + } +} +/** @ignore */ +function binaryDataFromJSON(values) { + // "DATA": ["49BC7D5B6C47D2","3F5FB6D9322026"] + // There are definitely more efficient ways to do this... but it gets the + // job done. + const joined = values.join(''); + const data = new Uint8Array(joined.length / 2); + for (let i = 0; i < joined.length; i += 2) { + data[i >> 1] = parseInt(joined.substr(i, 2), 16); + } + return data; +} + +//# sourceMappingURL=vectorloader.mjs.map diff --git a/frontend/node_modules/apache-arrow/visitor/vectorloader.mjs.map b/frontend/node_modules/apache-arrow/visitor/vectorloader.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..917d3beac464a9b07041cf4d8ad9b7461529e2ee --- /dev/null +++ b/frontend/node_modules/apache-arrow/visitor/vectorloader.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["visitor/vectorloader.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAErB,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AASnD,cAAc;AACd,MAAM,OAAO,YAAa,SAAQ,OAAO;IAOrC,YAAY,KAAiB,EAAE,KAAkB,EAAE,OAAuB,EAAE,YAAsC;QAC9G,KAAK,EAAE,CAAC;QALJ,eAAU,GAAW,CAAC,CAAC,CAAC;QAExB,iBAAY,GA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OAAO,iBAAiB,CAAC,UAAU,EAAE,iBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5G,CAAC;CACJ;AAED,cAAc;AACd,SAAS,kBAAkB,CAAC,MAAgB;IACxC,8CAA8C;IAC9C,yEAAyE;IACzE,YAAY;IACZ,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC/B,MAAM,IAAI,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC/C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;QACvC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;KACpD;IACD,OAAO,IAAI,CAAC;AAChB,CAAC","file":"vectorloader.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from '../data';\nimport * as type from '../type';\nimport { Field } from '../schema';\nimport { Vector } from '../vector';\nimport { DataType } from '../type';\nimport { Visitor } from '../visitor';\nimport { packBools } from '../util/bit';\nimport { encodeUtf8 } from '../util/utf8';\nimport { Int64, Int128 } from '../util/int';\nimport { UnionMode, DateUnit } from '../enum';\nimport { toArrayBufferView } from '../util/buffer';\nimport { BufferRegion, FieldNode } from '../ipc/metadata/message';\n\n/** @ignore */\nexport interface VectorLoader extends Visitor {\n visit(node: Field | T): Data;\n visitMany(nodes: (Field | T)[]): Data[];\n}\n\n/** @ignore */\nexport class VectorLoader extends Visitor {\n private bytes: Uint8Array;\n private nodes: FieldNode[];\n private nodesIndex: number = -1;\n private buffers: BufferRegion[];\n private buffersIndex: number = -1;\n private dictionaries: Map>;\n constructor(bytes: Uint8Array, nodes: FieldNode[], buffers: BufferRegion[], dictionaries: Map>) {\n super();\n this.bytes = bytes;\n this.nodes = nodes;\n this.buffers = buffers;\n this.dictionaries = dictionaries;\n }\n\n public visit(node: Field | T): Data {\n return super.visit(node instanceof Field ? node.type : node);\n }\n\n public visitNull (type: T, { length, } = this.nextFieldNode()) { return Data.Null(type, 0, length); }\n public visitBool (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Bool(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); }\n public visitInt (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Int(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); }\n public visitFloat (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Float(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); }\n public visitUtf8 (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Utf8(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readOffsets(type), this.readData(type)); }\n public visitBinary (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Binary(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readOffsets(type), this.readData(type)); }\n public visitFixedSizeBinary (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.FixedSizeBinary(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); }\n public visitDate (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Date(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); }\n public visitTimestamp (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Timestamp(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); }\n public visitTime (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Time(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); }\n public visitDecimal (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Decimal(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); }\n public visitList (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.List(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readOffsets(type), this.visit(type.children[0])); }\n public visitStruct (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Struct(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.visitMany(type.children)); }\n public visitUnion (type: T ) { return type.mode === UnionMode.Sparse ? this.visitSparseUnion(type as type.SparseUnion) : this.visitDenseUnion(type as type.DenseUnion); }\n public visitDenseUnion (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Union(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readTypeIds(type), this.readOffsets(type), this.visitMany(type.children)); }\n public visitSparseUnion (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Union(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readTypeIds(type), this.visitMany(type.children)); }\n public visitDictionary (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Dictionary(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type.indices), this.readDictionary(type)); }\n public visitInterval (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Interval(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); }\n public visitFixedSizeList (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.FixedSizeList(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.visit(type.children[0])); }\n public visitMap (type: T, { length, nullCount } = this.nextFieldNode()) { return Data.Map(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readOffsets(type), this.visit(type.children[0])); }\n\n protected nextFieldNode() { return this.nodes[++this.nodesIndex]; }\n protected nextBufferRange() { return this.buffers[++this.buffersIndex]; }\n protected readNullBitmap(type: T, nullCount: number, buffer = this.nextBufferRange()) {\n return nullCount > 0 && this.readData(type, buffer) || new Uint8Array(0);\n }\n protected readOffsets(type: T, buffer?: BufferRegion) { return this.readData(type, buffer); }\n protected readTypeIds(type: T, buffer?: BufferRegion) { return this.readData(type, buffer); }\n protected readData(_type: T, { length, offset } = this.nextBufferRange()) {\n return this.bytes.subarray(offset, offset + length);\n }\n protected readDictionary(type: T): Vector {\n return this.dictionaries.get(type.id)!;\n }\n}\n\n/** @ignore */\nexport class JSONVectorLoader extends VectorLoader {\n private sources: any[][];\n constructor(sources: any[][], nodes: FieldNode[], buffers: BufferRegion[], dictionaries: Map>) {\n super(new Uint8Array(0), nodes, buffers, dictionaries);\n this.sources = sources;\n }\n protected readNullBitmap(_type: T, nullCount: number, { offset } = this.nextBufferRange()) {\n return nullCount <= 0 ? new Uint8Array(0) : packBools(this.sources[offset]);\n }\n protected readOffsets(_type: T, { offset } = this.nextBufferRange()) {\n return toArrayBufferView(Uint8Array, toArrayBufferView(Int32Array, this.sources[offset]));\n }\n protected readTypeIds(type: T, { offset } = this.nextBufferRange()) {\n return toArrayBufferView(Uint8Array, toArrayBufferView(type.ArrayType, this.sources[offset]));\n }\n protected readData(type: T, { offset } = this.nextBufferRange()) {\n const { sources } = this;\n if (DataType.isTimestamp(type)) {\n return toArrayBufferView(Uint8Array, Int64.convertArray(sources[offset] as string[]));\n } else if ((DataType.isInt(type) || DataType.isTime(type)) && type.bitWidth === 64) {\n return toArrayBufferView(Uint8Array, Int64.convertArray(sources[offset] as string[]));\n } else if (DataType.isDate(type) && type.unit === DateUnit.MILLISECOND) {\n return toArrayBufferView(Uint8Array, Int64.convertArray(sources[offset] as string[]));\n } else if (DataType.isDecimal(type)) {\n return toArrayBufferView(Uint8Array, Int128.convertArray(sources[offset] as string[]));\n } else if (DataType.isBinary(type) || DataType.isFixedSizeBinary(type)) {\n return binaryDataFromJSON(sources[offset] as string[]);\n } else if (DataType.isBool(type)) {\n return packBools(sources[offset] as number[]);\n } else if (DataType.isUtf8(type)) {\n return encodeUtf8((sources[offset] as string[]).join(''));\n }\n return toArrayBufferView(Uint8Array, toArrayBufferView(type.ArrayType, sources[offset].map((x) => +x)));\n }\n}\n\n/** @ignore */\nfunction binaryDataFromJSON(values: string[]) {\n // \"DATA\": [\"49BC7D5B6C47D2\",\"3F5FB6D9322026\"]\n // There are definitely more efficient ways to do this... but it gets the\n // job done.\n const joined = values.join('');\n const data = new Uint8Array(joined.length / 2);\n for (let i = 0; i < joined.length; i += 2) {\n data[i >> 1] = parseInt(joined.substr(i, 2), 16);\n }\n return data;\n}\n"]} \ No newline at end of file diff --git a/frontend/node_modules/argv-tools/LICENSE b/frontend/node_modules/argv-tools/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..dbf3e8f720f9e34baf975e7ddace3bb74415fbbf --- /dev/null +++ b/frontend/node_modules/argv-tools/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018-19 Lloyd Brookes <75pound@gmail.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/frontend/node_modules/argv-tools/README.hbs b/frontend/node_modules/argv-tools/README.hbs new file mode 100644 index 0000000000000000000000000000000000000000..bb9a72794f58614b4ceed400b90d5060787eb411 --- /dev/null +++ b/frontend/node_modules/argv-tools/README.hbs @@ -0,0 +1,11 @@ +[![view on npm](https://img.shields.io/npm/v/argv-tools.svg)](https://www.npmjs.org/package/argv-tools) +[![npm module downloads](https://img.shields.io/npm/dt/argv-tools.svg)](https://www.npmjs.org/package/argv-tools) +[![Build Status](https://travis-ci.org/75lb/argv-tools.svg?branch=master)](https://travis-ci.org/75lb/argv-tools) +[![Dependency Status](https://badgen.net/david/dep/75lb/argv-tools)](https://david-dm.org/75lb/argv-tools) +[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard) + +{{>main}} + +* * * + +© 2018-19 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/75lb/jsdoc-to-markdown). diff --git a/frontend/node_modules/argv-tools/README.md b/frontend/node_modules/argv-tools/README.md new file mode 100644 index 0000000000000000000000000000000000000000..7a20127edd7deb7476dd58273737ab03450e70ca --- /dev/null +++ b/frontend/node_modules/argv-tools/README.md @@ -0,0 +1,144 @@ +[![view on npm](https://img.shields.io/npm/v/argv-tools.svg)](https://www.npmjs.org/package/argv-tools) +[![npm module downloads](https://img.shields.io/npm/dt/argv-tools.svg)](https://www.npmjs.org/package/argv-tools) +[![Build Status](https://travis-ci.org/75lb/argv-tools.svg?branch=master)](https://travis-ci.org/75lb/argv-tools) +[![Dependency Status](https://badgen.net/david/dep/75lb/argv-tools)](https://david-dm.org/75lb/argv-tools) +[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard) + + + +## argv-tools +Some useful tools for working with `process.argv`. + +**Example** +```js +const argvTools = require('argv-tools') +``` + +* [argv-tools](#module_argv-tools) + * [.ArgvArray](#module_argv-tools.ArgvArray) + * [.load(argv)](#module_argv-tools.ArgvArray+load) + * [.clear()](#module_argv-tools.ArgvArray+clear) + * [.expandOptionEqualsNotation()](#module_argv-tools.ArgvArray+expandOptionEqualsNotation) + * [.expandGetoptNotation()](#module_argv-tools.ArgvArray+expandGetoptNotation) + * [.hasCombinedShortOptions()](#module_argv-tools.ArgvArray+hasCombinedShortOptions) ⇒ boolean + * [.re](#module_argv-tools.re) + * [.expandCombinedShortArg(arg)](#module_argv-tools.expandCombinedShortArg) ⇒ Array.<string> + * [.isOptionEqualsNotation(arg)](#module_argv-tools.isOptionEqualsNotation) ⇒ boolean + * [.isOption(arg)](#module_argv-tools.isOption) ⇒ boolean + * [.isLongOption(arg)](#module_argv-tools.isLongOption) ⇒ boolean + * [.getOptionName(arg)](#module_argv-tools.getOptionName) ⇒ string + + + +### argvTools.ArgvArray +Array subclass encapsulating common operations on `process.argv`. + +**Kind**: static class of [argv-tools](#module_argv-tools) + +* [.ArgvArray](#module_argv-tools.ArgvArray) + * [.load(argv)](#module_argv-tools.ArgvArray+load) + * [.clear()](#module_argv-tools.ArgvArray+clear) + * [.expandOptionEqualsNotation()](#module_argv-tools.ArgvArray+expandOptionEqualsNotation) + * [.expandGetoptNotation()](#module_argv-tools.ArgvArray+expandGetoptNotation) + * [.hasCombinedShortOptions()](#module_argv-tools.ArgvArray+hasCombinedShortOptions) ⇒ boolean + + + +#### argvArray.load(argv) +Clears the array has loads the supplied input. + +**Kind**: instance method of [ArgvArray](#module_argv-tools.ArgvArray) + +| Param | Type | Description | +| --- | --- | --- | +| argv | Array.<string> | The argv list to load. Defaults to `process.argv`. | + + + +#### argvArray.clear() +Clear the array. + +**Kind**: instance method of [ArgvArray](#module_argv-tools.ArgvArray) + + +#### argvArray.expandOptionEqualsNotation() +expand ``--option=value` style args. + +**Kind**: instance method of [ArgvArray](#module_argv-tools.ArgvArray) + + +#### argvArray.expandGetoptNotation() +expand getopt-style combinedShort options. + +**Kind**: instance method of [ArgvArray](#module_argv-tools.ArgvArray) + + +#### argvArray.hasCombinedShortOptions() ⇒ boolean +Returns true if the array contains combined short options (e.g. `-ab`). + +**Kind**: instance method of [ArgvArray](#module_argv-tools.ArgvArray) + + +### argvTools.re +Regular expressions for matching option formats. + +**Kind**: static constant of [argv-tools](#module_argv-tools) + + +### argvTools.expandCombinedShortArg(arg) ⇒ Array.<string> +Expand a combined short option. + +**Kind**: static method of [argv-tools](#module_argv-tools) + +| Param | Type | Description | +| --- | --- | --- | +| arg | string | the string to expand, e.g. `-ab` | + + + +### argvTools.isOptionEqualsNotation(arg) ⇒ boolean +Returns true if the supplied arg matches `--option=value` notation. + +**Kind**: static method of [argv-tools](#module_argv-tools) + +| Param | Type | Description | +| --- | --- | --- | +| arg | string | the arg to test, e.g. `--one=something` | + + + +### argvTools.isOption(arg) ⇒ boolean +Returns true if the supplied arg is in either long (`--one`) or short (`-o`) format. + +**Kind**: static method of [argv-tools](#module_argv-tools) + +| Param | Type | Description | +| --- | --- | --- | +| arg | string | the arg to test, e.g. `--one` | + + + +### argvTools.isLongOption(arg) ⇒ boolean +Returns true if the supplied arg is in long (`--one`) format. + +**Kind**: static method of [argv-tools](#module_argv-tools) + +| Param | Type | Description | +| --- | --- | --- | +| arg | string | the arg to test, e.g. `--one` | + + + +### argvTools.getOptionName(arg) ⇒ string +Returns the name from a long, short or `--options=value` arg. + +**Kind**: static method of [argv-tools](#module_argv-tools) + +| Param | Type | Description | +| --- | --- | --- | +| arg | string | the arg to inspect, e.g. `--one` | + + +* * * + +© 2018-19 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/75lb/jsdoc-to-markdown). diff --git a/frontend/node_modules/argv-tools/index.js b/frontend/node_modules/argv-tools/index.js new file mode 100644 index 0000000000000000000000000000000000000000..6d12b1118004e0ab241a21ef3a7aea11e9442a4e --- /dev/null +++ b/frontend/node_modules/argv-tools/index.js @@ -0,0 +1,163 @@ +'use strict' + +/** + * Some useful tools for working with `process.argv`. + * + * @module argv-tools + * @typicalName argvTools + * @example + * const argvTools = require('argv-tools') + */ + +/** + * Regular expressions for matching option formats. + * @static + */ +const re = { + short: /^-([^\d-])$/, + long: /^--(\S+)/, + combinedShort: /^-[^\d-]{2,}$/, + optEquals: /^(--\S+?)=(.*)/ +} + +/** + * Array subclass encapsulating common operations on `process.argv`. + * @static + */ +class ArgvArray extends Array { + /** + * Clears the array has loads the supplied input. + * @param {string[]} argv - The argv list to load. Defaults to `process.argv`. + */ + load (argv) { + const arrayify = require('array-back') + this.clear() + if (argv && argv !== process.argv) { + argv = arrayify(argv) + } else { + /* if no argv supplied, assume we are parsing process.argv */ + argv = process.argv.slice(0) + argv.splice(0, 2) + } + argv.forEach(arg => this.push(String(arg))) + } + + /** + * Clear the array. + */ + clear () { + this.length = 0 + } + + /** + * expand ``--option=value` style args. + */ + expandOptionEqualsNotation () { + if (this.some(arg => re.optEquals.test(arg))) { + const expandedArgs = [] + this.forEach(arg => { + const matches = arg.match(re.optEquals) + if (matches) { + expandedArgs.push(matches[1], matches[2]) + } else { + expandedArgs.push(arg) + } + }) + this.clear() + this.load(expandedArgs) + } + } + + /** + * expand getopt-style combinedShort options. + */ + expandGetoptNotation () { + if (this.hasCombinedShortOptions()) { + const findReplace = require('find-replace') + findReplace(this, re.combinedShort, expandCombinedShortArg) + } + } + + /** + * Returns true if the array contains combined short options (e.g. `-ab`). + * @returns {boolean} + */ + hasCombinedShortOptions () { + return this.some(arg => re.combinedShort.test(arg)) + } + + static from (argv) { + const result = new this() + result.load(argv) + return result + } +} + +/** + * Expand a combined short option. + * @param {string} - the string to expand, e.g. `-ab` + * @returns {string[]} + * @static + */ +function expandCombinedShortArg (arg) { + /* remove initial hypen */ + arg = arg.slice(1) + return arg.split('').map(letter => '-' + letter) +} + +/** + * Returns true if the supplied arg matches `--option=value` notation. + * @param {string} - the arg to test, e.g. `--one=something` + * @returns {boolean} + * @static + */ +function isOptionEqualsNotation (arg) { + return re.optEquals.test(arg) +} + +/** + * Returns true if the supplied arg is in either long (`--one`) or short (`-o`) format. + * @param {string} - the arg to test, e.g. `--one` + * @returns {boolean} + * @static + */ +function isOption (arg) { + return (re.short.test(arg) || re.long.test(arg)) && !re.optEquals.test(arg) +} + +/** + * Returns true if the supplied arg is in long (`--one`) format. + * @param {string} - the arg to test, e.g. `--one` + * @returns {boolean} + * @static + */ +function isLongOption (arg) { + return re.long.test(arg) && !isOptionEqualsNotation(arg) +} + +/** + * Returns the name from a long, short or `--options=value` arg. + * @param {string} - the arg to inspect, e.g. `--one` + * @returns {string} + * @static + */ +function getOptionName (arg) { + if (re.short.test(arg)) { + return arg.match(re.short)[1] + } else if (isLongOption(arg)) { + return arg.match(re.long)[1] + } else if (isOptionEqualsNotation(arg)) { + return arg.match(re.optEquals)[1].replace(/^--/, '') + } else { + return null + } +} + +exports.expandCombinedShortArg = expandCombinedShortArg +exports.re = re +exports.ArgvArray = ArgvArray +exports.getOptionName = getOptionName +exports.isOption = isOption +exports.isLongOption = isLongOption +exports.isOptionEqualsNotation = isOptionEqualsNotation +exports.isValue = arg => !(isOption(arg) || re.combinedShort.test(arg) || re.optEquals.test(arg)) diff --git a/frontend/node_modules/argv-tools/package.json b/frontend/node_modules/argv-tools/package.json new file mode 100644 index 0000000000000000000000000000000000000000..9fadc17dd6665d94104efef7696416d480a61450 --- /dev/null +++ b/frontend/node_modules/argv-tools/package.json @@ -0,0 +1,39 @@ +{ + "name": "argv-tools", + "version": "0.1.2", + "description": "Some useful tools for working with process.argv", + "repository": "https://github.com/75lb/argv-tools", + "scripts": { + "test": "test-runner test.js", + "docs": "jsdoc2md --template README.hbs index.js > README.md" + }, + "keywords": [ + "argv", + "parse", + "argument", + "args", + "option", + "options", + "parser", + "parsing", + "cli", + "command", + "line" + ], + "author": "Lloyd Brookes <75pound@gmail.com>", + "license": "MIT", + "engines": { + "node": ">=4.0.0" + }, + "devDependencies": { + "jsdoc-to-markdown": "^5.0.1", + "test-runner": "^0.5.0-1" + }, + "dependencies": { + "array-back": "^2.0.0", + "find-replace": "^2.0.1" + }, + "files": [ + "index.js" + ] +} diff --git a/frontend/node_modules/array-back/.coveralls.yml b/frontend/node_modules/array-back/.coveralls.yml new file mode 100644 index 0000000000000000000000000000000000000000..5c8cb4eefa525d1fed5536de73ab6e71db31204d --- /dev/null +++ b/frontend/node_modules/array-back/.coveralls.yml @@ -0,0 +1 @@ +repo_token: S6p2PWnbIwJPOfO3XRVsAM5z4tNMh9hgr diff --git a/frontend/node_modules/array-back/.npmignore b/frontend/node_modules/array-back/.npmignore new file mode 100644 index 0000000000000000000000000000000000000000..713862c36ca5e434840cb3b4bc0c6c95c8886ac0 --- /dev/null +++ b/frontend/node_modules/array-back/.npmignore @@ -0,0 +1,2 @@ +tmp +out diff --git a/frontend/node_modules/array-back/.travis.yml b/frontend/node_modules/array-back/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..6c6362d365763f87432e01b230906e6106360119 --- /dev/null +++ b/frontend/node_modules/array-back/.travis.yml @@ -0,0 +1,7 @@ +language: node_js +node_js: + - 8 + - 7 + - 6 + - 5 + - 4 diff --git a/frontend/node_modules/array-back/LICENSE b/frontend/node_modules/array-back/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a8f6b979dc6126ad6624ffdd0f62cc77eb94c4e1 --- /dev/null +++ b/frontend/node_modules/array-back/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-17 Lloyd Brookes <75pound@gmail.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/frontend/node_modules/array-back/README.hbs b/frontend/node_modules/array-back/README.hbs new file mode 100644 index 0000000000000000000000000000000000000000..3acff7c180e3bbd808a6ee8362029b59cd696cb1 --- /dev/null +++ b/frontend/node_modules/array-back/README.hbs @@ -0,0 +1,12 @@ +[![view on npm](https://img.shields.io/npm/v/array-back.svg)](https://www.npmjs.org/package/array-back) +[![npm module downloads](https://img.shields.io/npm/dt/array-back.svg)](https://www.npmjs.org/package/array-back) +[![Build Status](https://travis-ci.org/75lb/array-back.svg?branch=master)](https://travis-ci.org/75lb/array-back) +[![Coverage Status](https://coveralls.io/repos/github/75lb/array-back/badge.svg?branch=master)](https://coveralls.io/github/75lb/array-back?branch=master) +[![Dependency Status](https://david-dm.org/75lb/array-back.svg)](https://david-dm.org/75lb/array-back) +[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard) + +{{>main}} + +* * * + +© 2015-17 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/75lb/jsdoc-to-markdown). \ No newline at end of file diff --git a/frontend/node_modules/array-back/README.md b/frontend/node_modules/array-back/README.md new file mode 100644 index 0000000000000000000000000000000000000000..86a757bdbee5901b93b38eff2687422f082baaaf --- /dev/null +++ b/frontend/node_modules/array-back/README.md @@ -0,0 +1,52 @@ +[![view on npm](https://img.shields.io/npm/v/array-back.svg)](https://www.npmjs.org/package/array-back) +[![npm module downloads](https://img.shields.io/npm/dt/array-back.svg)](https://www.npmjs.org/package/array-back) +[![Build Status](https://travis-ci.org/75lb/array-back.svg?branch=master)](https://travis-ci.org/75lb/array-back) +[![Coverage Status](https://coveralls.io/repos/github/75lb/array-back/badge.svg?branch=master)](https://coveralls.io/github/75lb/array-back?branch=master) +[![Dependency Status](https://david-dm.org/75lb/array-back.svg)](https://david-dm.org/75lb/array-back) +[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard) + + + +## array-back +**Example** +```js +const arrayify = require('array-back') +``` + + +### arrayify(input) ⇒ Array ⏏ +Takes any input and guarantees an array back. + +- converts array-like objects (e.g. `arguments`) to a real array +- converts `undefined` to an empty array +- converts any another other, singular value (including `null`) into an array containing that value +- ignores input which is already an array + +**Kind**: Exported function + +| Param | Type | Description | +| --- | --- | --- | +| input | \* | the input value to convert to an array | + +**Example** +```js +> a.arrayify(undefined) +[] + +> a.arrayify(null) +[ null ] + +> a.arrayify(0) +[ 0 ] + +> a.arrayify([ 1, 2 ]) +[ 1, 2 ] + +> function f(){ return a.arrayify(arguments); } +> f(1,2,3) +[ 1, 2, 3 ] +``` + +* * * + +© 2015-17 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/75lb/jsdoc-to-markdown). \ No newline at end of file diff --git a/frontend/node_modules/array-back/coverage/coverage.json b/frontend/node_modules/array-back/coverage/coverage.json new file mode 100644 index 0000000000000000000000000000000000000000..9c4e5908018b9fd4ba845dad18d243ae39f2ec13 --- /dev/null +++ b/frontend/node_modules/array-back/coverage/coverage.json @@ -0,0 +1 @@ +{"/Users/lloydb/Documents/75lb/array-back/test.js":{"path":"/Users/lloydb/Documents/75lb/array-back/test.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1,"12":1,"13":1,"14":1,"15":1,"16":1},"b":{},"f":{"1":1,"2":1,"3":1},"fnMap":{"1":{"name":"(anonymous_1)","line":8,"loc":{"start":{"line":8,"column":44},"end":{"line":8,"column":56}}},"2":{"name":"(anonymous_2)","line":14,"loc":{"start":{"line":14,"column":26},"end":{"line":14,"column":38}}},"3":{"name":"func","line":20,"loc":{"start":{"line":20,"column":2},"end":{"line":20,"column":19}}}},"statementMap":{"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":41}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":30}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":27}},"4":{"start":{"line":6,"column":0},"end":{"line":6,"column":31}},"5":{"start":{"line":8,"column":0},"end":{"line":12,"column":2}},"6":{"start":{"line":9,"column":2},"end":{"line":9,"column":23}},"7":{"start":{"line":10,"column":2},"end":{"line":10,"column":30}},"8":{"start":{"line":11,"column":2},"end":{"line":11,"column":28}},"9":{"start":{"line":14,"column":0},"end":{"line":24,"column":2}},"10":{"start":{"line":15,"column":2},"end":{"line":15,"column":44}},"11":{"start":{"line":16,"column":2},"end":{"line":16,"column":45}},"12":{"start":{"line":17,"column":2},"end":{"line":17,"column":39}},"13":{"start":{"line":18,"column":2},"end":{"line":18,"column":49}},"14":{"start":{"line":20,"column":2},"end":{"line":22,"column":3}},"15":{"start":{"line":21,"column":4},"end":{"line":21,"column":55}},"16":{"start":{"line":23,"column":2},"end":{"line":23,"column":15}}},"branchMap":{}},"/Users/lloydb/Documents/75lb/array-back/index.js":{"path":"/Users/lloydb/Documents/75lb/array-back/index.js","s":{"1":1,"2":1,"3":6,"4":6,"5":2,"6":4,"7":1,"8":3,"9":1,"10":2},"b":{"1":[2,4],"2":[1,3],"3":[1,2]},"f":{"1":6},"fnMap":{"1":{"name":"arrayify","line":36,"loc":{"start":{"line":36,"column":0},"end":{"line":36,"column":26}}}},"statementMap":{"1":{"start":{"line":6,"column":0},"end":{"line":6,"column":25}},"2":{"start":{"line":36,"column":0},"end":{"line":49,"column":1}},"3":{"start":{"line":37,"column":2},"end":{"line":37,"column":30}},"4":{"start":{"line":38,"column":2},"end":{"line":48,"column":3}},"5":{"start":{"line":39,"column":4},"end":{"line":39,"column":16}},"6":{"start":{"line":41,"column":4},"end":{"line":47,"column":5}},"7":{"start":{"line":42,"column":6},"end":{"line":42,"column":15}},"8":{"start":{"line":43,"column":11},"end":{"line":47,"column":5}},"9":{"start":{"line":44,"column":6},"end":{"line":44,"column":46}},"10":{"start":{"line":46,"column":6},"end":{"line":46,"column":22}}},"branchMap":{"1":{"line":38,"type":"if","locations":[{"start":{"line":38,"column":2},"end":{"line":38,"column":2}},{"start":{"line":38,"column":2},"end":{"line":38,"column":2}}]},"2":{"line":41,"type":"if","locations":[{"start":{"line":41,"column":4},"end":{"line":41,"column":4}},{"start":{"line":41,"column":4},"end":{"line":41,"column":4}}]},"3":{"line":43,"type":"if","locations":[{"start":{"line":43,"column":11},"end":{"line":43,"column":11}},{"start":{"line":43,"column":11},"end":{"line":43,"column":11}}]}}}} \ No newline at end of file diff --git a/frontend/node_modules/array-back/coverage/lcov-report/array-back/index.html b/frontend/node_modules/array-back/coverage/lcov-report/array-back/index.html new file mode 100644 index 0000000000000000000000000000000000000000..6884dec7be3c2169e0b4602156a4dc5901f10f92 --- /dev/null +++ b/frontend/node_modules/array-back/coverage/lcov-report/array-back/index.html @@ -0,0 +1,106 @@ + + + + Code coverage report for array-back/ + + + + + + + +
+
+

+ all files array-back/ +

+
+
+ 100% + Statements + 26/26 +
+
+ 100% + Branches + 6/6 +
+
+ 100% + Functions + 4/4 +
+
+ 100% + Lines + 26/26 +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
index.js
100%10/10100%6/6100%1/1100%10/10
test.js
100%16/16100%0/0100%3/3100%16/16
+
+
+ + + + + + + diff --git a/frontend/node_modules/array-back/coverage/lcov-report/array-back/index.js.html b/frontend/node_modules/array-back/coverage/lcov-report/array-back/index.js.html new file mode 100644 index 0000000000000000000000000000000000000000..785f7d95d5195102d4aa12a57aea8e92913aad71 --- /dev/null +++ b/frontend/node_modules/array-back/coverage/lcov-report/array-back/index.js.html @@ -0,0 +1,212 @@ + + + + Code coverage report for array-back/index.js + + + + + + + +
+
+

+ all files / array-back/ index.js +

+
+
+ 100% + Statements + 10/10 +
+
+ 100% + Branches + 6/6 +
+
+ 100% + Functions + 1/1 +
+
+ 100% + Lines + 10/10 +
+
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50  +  +  +  +  + +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + + + + +  + + + + +  + +  +  +  + 
/**
+ * @module array-back
+ * @example
+ * const arrayify = require('array-back')
+ */
+module.exports = arrayify
+ 
+/**
+ * Takes any input and guarantees an array back.
+ *
+ * - converts array-like objects (e.g. `arguments`) to a real array
+ * - converts `undefined` to an empty array
+ * - converts any another other, singular value (including `null`) into an array containing that value
+ * - ignores input which is already an array
+ *
+ * @param {*} - the input value to convert to an array
+ * @returns {Array}
+ * @alias module:array-back
+ * @example
+ * > a.arrayify(undefined)
+ * []
+ *
+ * > a.arrayify(null)
+ * [ null ]
+ *
+ * > a.arrayify(0)
+ * [ 0 ]
+ *
+ * > a.arrayify([ 1, 2 ])
+ * [ 1, 2 ]
+ *
+ * > function f(){ return a.arrayify(arguments); }
+ * > f(1,2,3)
+ * [ 1, 2, 3 ]
+ */
+function arrayify (input) {
+  const t = require('typical')
+  if (Array.isArray(input)) {
+    return input
+  } else {
+    if (input === undefined) {
+      return []
+    } else if (t.isArrayLike(input)) {
+      return Array.prototype.slice.call(input)
+    } else {
+      return [ input ]
+    }
+  }
+}
+ 
+
+
+ + + + + + + diff --git a/frontend/node_modules/array-back/coverage/lcov-report/array-back/test.js.html b/frontend/node_modules/array-back/coverage/lcov-report/array-back/test.js.html new file mode 100644 index 0000000000000000000000000000000000000000..f1f98ad51cb703618b34f706ef280333df0b9338 --- /dev/null +++ b/frontend/node_modules/array-back/coverage/lcov-report/array-back/test.js.html @@ -0,0 +1,137 @@ + + + + Code coverage report for array-back/test.js + + + + + + + +
+
+

+ all files / array-back/ test.js +

+
+
+ 100% + Statements + 16/16 +
+
+ 100% + Branches + 0/0 +
+
+ 100% + Functions + 3/3 +
+
+ 100% + Lines + 16/16 +
+
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25  + + + +  + +  + + + + +  +  + + + + + +  + + +  + +  + 
'use strict'
+const TestRunner = require('test-runner')
+const arrayify = require('./')
+const a = require('assert')
+ 
+const runner = new TestRunner()
+ 
+runner.test('if already array, do nothing', function () {
+  const arr = [ 1,2,3 ]
+  const result = arrayify(arr)
+  a.strictEqual(arr, result)
+})
+ 
+runner.test('arrayify()', function () {
+  a.deepStrictEqual(arrayify(undefined), [])
+  a.deepStrictEqual(arrayify(null), [ null ])
+  a.deepStrictEqual(arrayify(0), [ 0 ])
+  a.deepStrictEqual(arrayify([ 1, 2 ]), [ 1, 2 ])
+ 
+  function func () {
+    a.deepStrictEqual(arrayify(arguments), [ 1, 2, 3 ])
+  }
+  func(1, 2, 3)
+})
+ 
+
+
+ + + + + + + diff --git a/frontend/node_modules/array-back/coverage/lcov-report/base.css b/frontend/node_modules/array-back/coverage/lcov-report/base.css new file mode 100644 index 0000000000000000000000000000000000000000..29737bcb07fdbd725cbfd1d0d7ba0492af356aca --- /dev/null +++ b/frontend/node_modules/array-back/coverage/lcov-report/base.css @@ -0,0 +1,213 @@ +body, html { + margin:0; padding: 0; + height: 100%; +} +body { + font-family: Helvetica Neue, Helvetica, Arial; + font-size: 14px; + color:#333; +} +.small { font-size: 12px; } +*, *:after, *:before { + -webkit-box-sizing:border-box; + -moz-box-sizing:border-box; + box-sizing:border-box; + } +h1 { font-size: 20px; margin: 0;} +h2 { font-size: 14px; } +pre { + font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace; + margin: 0; + padding: 0; + -moz-tab-size: 2; + -o-tab-size: 2; + tab-size: 2; +} +a { color:#0074D9; text-decoration:none; } +a:hover { text-decoration:underline; } +.strong { font-weight: bold; } +.space-top1 { padding: 10px 0 0 0; } +.pad2y { padding: 20px 0; } +.pad1y { padding: 10px 0; } +.pad2x { padding: 0 20px; } +.pad2 { padding: 20px; } +.pad1 { padding: 10px; } +.space-left2 { padding-left:55px; } +.space-right2 { padding-right:20px; } +.center { text-align:center; } +.clearfix { display:block; } +.clearfix:after { + content:''; + display:block; + height:0; + clear:both; + visibility:hidden; + } +.fl { float: left; } +@media only screen and (max-width:640px) { + .col3 { width:100%; max-width:100%; } + .hide-mobile { display:none!important; } +} + +.quiet { + color: #7f7f7f; + color: rgba(0,0,0,0.5); +} +.quiet a { opacity: 0.7; } + +.fraction { + font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; + font-size: 10px; + color: #555; + background: #E8E8E8; + padding: 4px 5px; + border-radius: 3px; + vertical-align: middle; +} + +div.path a:link, div.path a:visited { color: #333; } +table.coverage { + border-collapse: collapse; + margin: 10px 0 0 0; + padding: 0; +} + +table.coverage td { + margin: 0; + padding: 0; + vertical-align: top; +} +table.coverage td.line-count { + text-align: right; + padding: 0 5px 0 20px; +} +table.coverage td.line-coverage { + text-align: right; + padding-right: 10px; + min-width:20px; +} + +table.coverage td span.cline-any { + display: inline-block; + padding: 0 5px; + width: 100%; +} +.missing-if-branch { + display: inline-block; + margin-right: 5px; + border-radius: 3px; + position: relative; + padding: 0 4px; + background: #333; + color: yellow; +} + +.skip-if-branch { + display: none; + margin-right: 10px; + position: relative; + padding: 0 4px; + background: #ccc; + color: white; +} +.missing-if-branch .typ, .skip-if-branch .typ { + color: inherit !important; +} +.coverage-summary { + border-collapse: collapse; + width: 100%; +} +.coverage-summary tr { border-bottom: 1px solid #bbb; } +.keyline-all { border: 1px solid #ddd; } +.coverage-summary td, .coverage-summary th { padding: 10px; } +.coverage-summary tbody { border: 1px solid #bbb; } +.coverage-summary td { border-right: 1px solid #bbb; } +.coverage-summary td:last-child { border-right: none; } +.coverage-summary th { + text-align: left; + font-weight: normal; + white-space: nowrap; +} +.coverage-summary th.file { border-right: none !important; } +.coverage-summary th.pct { } +.coverage-summary th.pic, +.coverage-summary th.abs, +.coverage-summary td.pct, +.coverage-summary td.abs { text-align: right; } +.coverage-summary td.file { white-space: nowrap; } +.coverage-summary td.pic { min-width: 120px !important; } +.coverage-summary tfoot td { } + +.coverage-summary .sorter { + height: 10px; + width: 7px; + display: inline-block; + margin-left: 0.5em; + background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; +} +.coverage-summary .sorted .sorter { + background-position: 0 -20px; +} +.coverage-summary .sorted-desc .sorter { + background-position: 0 -10px; +} +.status-line { height: 10px; } +/* dark red */ +.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 } +.low .chart { border:1px solid #C21F39 } +/* medium red */ +.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE } +/* light red */ +.low, .cline-no { background:#FCE1E5 } +/* light green */ +.high, .cline-yes { background:rgb(230,245,208) } +/* medium green */ +.cstat-yes { background:rgb(161,215,106) } +/* dark green */ +.status-line.high, .high .cover-fill { background:rgb(77,146,33) } +.high .chart { border:1px solid rgb(77,146,33) } +/* dark yellow (gold) */ +.medium .chart { border:1px solid #f9cd0b; } +.status-line.medium, .medium .cover-fill { background: #f9cd0b; } +/* light yellow */ +.medium { background: #fff4c2; } +/* light gray */ +span.cline-neutral { background: #eaeaea; } + +.cbranch-no { background: yellow !important; color: #111; } + +.cstat-skip { background: #ddd; color: #111; } +.fstat-skip { background: #ddd; color: #111 !important; } +.cbranch-skip { background: #ddd !important; color: #111; } + + +.cover-fill, .cover-empty { + display:inline-block; + height: 12px; +} +.chart { + line-height: 0; +} +.cover-empty { + background: white; +} +.cover-full { + border-right: none !important; +} +pre.prettyprint { + border: none !important; + padding: 0 !important; + margin: 0 !important; +} +.com { color: #999 !important; } +.ignore-none { color: #999; font-weight: normal; } + +.wrapper { + min-height: 100%; + height: auto !important; + height: 100%; + margin: 0 auto -48px; +} +.footer, .push { + height: 48px; +} diff --git a/frontend/node_modules/array-back/coverage/lcov-report/index.html b/frontend/node_modules/array-back/coverage/lcov-report/index.html new file mode 100644 index 0000000000000000000000000000000000000000..5f6112e57fdef946971bd688d01294546de44b7c --- /dev/null +++ b/frontend/node_modules/array-back/coverage/lcov-report/index.html @@ -0,0 +1,93 @@ + + + + Code coverage report for All files + + + + + + + +
+
+

+ / +

+
+
+ 100% + Statements + 26/26 +
+
+ 100% + Branches + 6/6 +
+
+ 100% + Functions + 4/4 +
+
+ 100% + Lines + 26/26 +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
array-back/
100%26/26100%6/6100%4/4100%26/26
+
+
+ + + + + + + diff --git a/frontend/node_modules/array-back/coverage/lcov-report/prettify.css b/frontend/node_modules/array-back/coverage/lcov-report/prettify.css new file mode 100644 index 0000000000000000000000000000000000000000..b317a7cda31a440fbd47540297ee3c68d51f343e --- /dev/null +++ b/frontend/node_modules/array-back/coverage/lcov-report/prettify.css @@ -0,0 +1 @@ +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/frontend/node_modules/array-back/coverage/lcov-report/prettify.js b/frontend/node_modules/array-back/coverage/lcov-report/prettify.js new file mode 100644 index 0000000000000000000000000000000000000000..ef51e03866898f709d2bed6f55ed10bfb9840e6f --- /dev/null +++ b/frontend/node_modules/array-back/coverage/lcov-report/prettify.js @@ -0,0 +1 @@ +window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/frontend/node_modules/array-back/coverage/lcov-report/sort-arrow-sprite.png b/frontend/node_modules/array-back/coverage/lcov-report/sort-arrow-sprite.png new file mode 100644 index 0000000000000000000000000000000000000000..03f704a609c6fd0dbfdac63466a7d7c958b5cbf3 Binary files /dev/null and b/frontend/node_modules/array-back/coverage/lcov-report/sort-arrow-sprite.png differ diff --git a/frontend/node_modules/array-back/coverage/lcov-report/sorter.js b/frontend/node_modules/array-back/coverage/lcov-report/sorter.js new file mode 100644 index 0000000000000000000000000000000000000000..6c5034e403c70935ae766bfb940f945b04b2595b --- /dev/null +++ b/frontend/node_modules/array-back/coverage/lcov-report/sorter.js @@ -0,0 +1,158 @@ +var addSorting = (function () { + "use strict"; + var cols, + currentSort = { + index: 0, + desc: false + }; + + // returns the summary table element + function getTable() { return document.querySelector('.coverage-summary'); } + // returns the thead element of the summary table + function getTableHeader() { return getTable().querySelector('thead tr'); } + // returns the tbody element of the summary table + function getTableBody() { return getTable().querySelector('tbody'); } + // returns the th element for nth column + function getNthColumn(n) { return getTableHeader().querySelectorAll('th')[n]; } + + // loads all columns + function loadColumns() { + var colNodes = getTableHeader().querySelectorAll('th'), + colNode, + cols = [], + col, + i; + + for (i = 0; i < colNodes.length; i += 1) { + colNode = colNodes[i]; + col = { + key: colNode.getAttribute('data-col'), + sortable: !colNode.getAttribute('data-nosort'), + type: colNode.getAttribute('data-type') || 'string' + }; + cols.push(col); + if (col.sortable) { + col.defaultDescSort = col.type === 'number'; + colNode.innerHTML = colNode.innerHTML + ''; + } + } + return cols; + } + // attaches a data attribute to every tr element with an object + // of data values keyed by column name + function loadRowData(tableRow) { + var tableCols = tableRow.querySelectorAll('td'), + colNode, + col, + data = {}, + i, + val; + for (i = 0; i < tableCols.length; i += 1) { + colNode = tableCols[i]; + col = cols[i]; + val = colNode.getAttribute('data-value'); + if (col.type === 'number') { + val = Number(val); + } + data[col.key] = val; + } + return data; + } + // loads all row data + function loadData() { + var rows = getTableBody().querySelectorAll('tr'), + i; + + for (i = 0; i < rows.length; i += 1) { + rows[i].data = loadRowData(rows[i]); + } + } + // sorts the table using the data for the ith column + function sortByIndex(index, desc) { + var key = cols[index].key, + sorter = function (a, b) { + a = a.data[key]; + b = b.data[key]; + return a < b ? -1 : a > b ? 1 : 0; + }, + finalSorter = sorter, + tableBody = document.querySelector('.coverage-summary tbody'), + rowNodes = tableBody.querySelectorAll('tr'), + rows = [], + i; + + if (desc) { + finalSorter = function (a, b) { + return -1 * sorter(a, b); + }; + } + + for (i = 0; i < rowNodes.length; i += 1) { + rows.push(rowNodes[i]); + tableBody.removeChild(rowNodes[i]); + } + + rows.sort(finalSorter); + + for (i = 0; i < rows.length; i += 1) { + tableBody.appendChild(rows[i]); + } + } + // removes sort indicators for current column being sorted + function removeSortIndicators() { + var col = getNthColumn(currentSort.index), + cls = col.className; + + cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, ''); + col.className = cls; + } + // adds sort indicators for current column being sorted + function addSortIndicators() { + getNthColumn(currentSort.index).className += currentSort.desc ? ' sorted-desc' : ' sorted'; + } + // adds event listeners for all sorter widgets + function enableUI() { + var i, + el, + ithSorter = function ithSorter(i) { + var col = cols[i]; + + return function () { + var desc = col.defaultDescSort; + + if (currentSort.index === i) { + desc = !currentSort.desc; + } + sortByIndex(i, desc); + removeSortIndicators(); + currentSort.index = i; + currentSort.desc = desc; + addSortIndicators(); + }; + }; + for (i =0 ; i < cols.length; i += 1) { + if (cols[i].sortable) { + // add the click event handler on the th so users + // dont have to click on those tiny arrows + el = getNthColumn(i).querySelector('.sorter').parentElement; + if (el.addEventListener) { + el.addEventListener('click', ithSorter(i)); + } else { + el.attachEvent('onclick', ithSorter(i)); + } + } + } + } + // adds sorting functionality to the UI + return function () { + if (!getTable()) { + return; + } + cols = loadColumns(); + loadData(cols); + addSortIndicators(); + enableUI(); + }; +})(); + +window.addEventListener('load', addSorting); diff --git a/frontend/node_modules/array-back/coverage/lcov.info b/frontend/node_modules/array-back/coverage/lcov.info new file mode 100644 index 0000000000000000000000000000000000000000..6e4a30132b8ae0483501d84848c26cf88f099741 --- /dev/null +++ b/frontend/node_modules/array-back/coverage/lcov.info @@ -0,0 +1,58 @@ +TN: +SF:/Users/lloydb/Documents/75lb/array-back/test.js +FN:8,(anonymous_1) +FN:14,(anonymous_2) +FN:20,func +FNF:3 +FNH:3 +FNDA:1,(anonymous_1) +FNDA:1,(anonymous_2) +FNDA:1,func +DA:2,1 +DA:3,1 +DA:4,1 +DA:6,1 +DA:8,1 +DA:9,1 +DA:10,1 +DA:11,1 +DA:14,1 +DA:15,1 +DA:16,1 +DA:17,1 +DA:18,1 +DA:20,1 +DA:21,1 +DA:23,1 +LF:16 +LH:16 +BRF:0 +BRH:0 +end_of_record +TN: +SF:/Users/lloydb/Documents/75lb/array-back/index.js +FN:36,arrayify +FNF:1 +FNH:1 +FNDA:6,arrayify +DA:6,1 +DA:36,1 +DA:37,6 +DA:38,6 +DA:39,2 +DA:41,4 +DA:42,1 +DA:43,3 +DA:44,1 +DA:46,2 +LF:10 +LH:10 +BRDA:38,1,0,2 +BRDA:38,1,1,4 +BRDA:41,2,0,1 +BRDA:41,2,1,3 +BRDA:43,3,0,1 +BRDA:43,3,1,2 +BRF:6 +BRH:6 +end_of_record diff --git a/frontend/node_modules/array-back/index.js b/frontend/node_modules/array-back/index.js new file mode 100644 index 0000000000000000000000000000000000000000..b30ac0f9edb1f526b0d224c3883387a133fecfba --- /dev/null +++ b/frontend/node_modules/array-back/index.js @@ -0,0 +1,49 @@ +/** + * @module array-back + * @example + * const arrayify = require('array-back') + */ +module.exports = arrayify + +/** + * Takes any input and guarantees an array back. + * + * - converts array-like objects (e.g. `arguments`) to a real array + * - converts `undefined` to an empty array + * - converts any another other, singular value (including `null`) into an array containing that value + * - ignores input which is already an array + * + * @param {*} - the input value to convert to an array + * @returns {Array} + * @alias module:array-back + * @example + * > a.arrayify(undefined) + * [] + * + * > a.arrayify(null) + * [ null ] + * + * > a.arrayify(0) + * [ 0 ] + * + * > a.arrayify([ 1, 2 ]) + * [ 1, 2 ] + * + * > function f(){ return a.arrayify(arguments); } + * > f(1,2,3) + * [ 1, 2, 3 ] + */ +function arrayify (input) { + const t = require('typical') + if (Array.isArray(input)) { + return input + } else { + if (input === undefined) { + return [] + } else if (t.isArrayLike(input)) { + return Array.prototype.slice.call(input) + } else { + return [ input ] + } + } +} diff --git a/frontend/node_modules/array-back/package.json b/frontend/node_modules/array-back/package.json new file mode 100644 index 0000000000000000000000000000000000000000..95373bf54ebbef29ee586dbfcee3f48540c773f1 --- /dev/null +++ b/frontend/node_modules/array-back/package.json @@ -0,0 +1,31 @@ +{ + "name": "array-back", + "author": "Lloyd Brookes <75pound@gmail.com>", + "version": "2.0.0", + "description": "Guarantees an array back", + "repository": "https://github.com/75lb/array-back.git", + "license": "MIT", + "keywords": [ + "to", + "convert", + "return", + "array", + "arrayify" + ], + "engines": { + "node": ">=4" + }, + "scripts": { + "test": "test-runner test.js", + "docs": "jsdoc2md -t README.hbs index.js > README.md; echo", + "cover": "istanbul cover ./node_modules/.bin/test-runner test.js && cat coverage/lcov.info | ./node_modules/.bin/coveralls; echo" + }, + "dependencies": { + "typical": "^2.6.1" + }, + "devDependencies": { + "coveralls": "^2.13.1", + "jsdoc-to-markdown": "^3.0.0", + "test-runner": "^0.4.0" + } +} diff --git a/frontend/node_modules/array-back/test.js b/frontend/node_modules/array-back/test.js new file mode 100644 index 0000000000000000000000000000000000000000..8c6f3407e159edd21c34a1ab39f7744e1ec21a0d --- /dev/null +++ b/frontend/node_modules/array-back/test.js @@ -0,0 +1,24 @@ +'use strict' +const TestRunner = require('test-runner') +const arrayify = require('./') +const a = require('assert') + +const runner = new TestRunner() + +runner.test('if already array, do nothing', function () { + const arr = [ 1,2,3 ] + const result = arrayify(arr) + a.strictEqual(arr, result) +}) + +runner.test('arrayify()', function () { + a.deepStrictEqual(arrayify(undefined), []) + a.deepStrictEqual(arrayify(null), [ null ]) + a.deepStrictEqual(arrayify(0), [ 0 ]) + a.deepStrictEqual(arrayify([ 1, 2 ]), [ 1, 2 ]) + + function func () { + a.deepStrictEqual(arrayify(arguments), [ 1, 2, 3 ]) + } + func(1, 2, 3) +}) diff --git a/frontend/node_modules/array-back/yarn.lock b/frontend/node_modules/array-back/yarn.lock new file mode 100644 index 0000000000000000000000000000000000000000..6ed623568824aac30ab1cecb1e86404ed9fcbcc7 --- /dev/null +++ b/frontend/node_modules/array-back/yarn.lock @@ -0,0 +1,911 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +acorn-jsx@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" + dependencies: + acorn "^3.0.4" + +acorn@^3.0.4, acorn@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + +ansi-escape-sequences@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-escape-sequences/-/ansi-escape-sequences-3.0.0.tgz#1c18394b6af9b76ff9a63509fa497669fd2ce53e" + dependencies: + array-back "^1.0.3" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +app-usage-stats@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/app-usage-stats/-/app-usage-stats-0.5.1.tgz#6547c5db9bab0aa5f5b2c560eacc8af20d0ab13b" + dependencies: + array-back "^1.0.4" + home-path "^1.0.3" + test-value "^2.1.0" + usage-stats "^0.9.0" + +argparse@^1.0.7: + version "1.0.9" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" + dependencies: + sprintf-js "~1.0.2" + +array-back@^1.0.2, array-back@^1.0.3, array-back@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-1.0.4.tgz#644ba7f095f7ffcf7c43b5f0dc39d3c1f03c063b" + dependencies: + typical "^2.6.0" + +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +assert-plus@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + +async@~0.2.6: + version "0.2.10" + resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +aws-sign2@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + +aws4@^1.2.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + +bcrypt-pbkdf@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" + dependencies: + tweetnacl "^0.14.3" + +bluebird@~3.4.6: + version "3.4.7" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.4.7.tgz#f72d760be09b7f76d08ed8fae98b289a8d05fab3" + +boom@2.x.x: + version "2.10.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + dependencies: + hoek "2.x.x" + +brace-expansion@^1.1.7: + version "1.1.8" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +cache-point@^0.4.0, cache-point@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/cache-point/-/cache-point-0.4.0.tgz#2797f68055970757c87e89b464978e74e11047b0" + dependencies: + array-back "^1.0.4" + fs-then-native "^2.0.0" + mkdirp "~0.5.1" + +caseless@~0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" + +catharsis@~0.8.8: + version "0.8.8" + resolved "https://registry.yarnpkg.com/catharsis/-/catharsis-0.8.8.tgz#693479f43aac549d806bd73e924cd0d944951a06" + dependencies: + underscore-contrib "~0.3.0" + +chalk@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +collect-all@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/collect-all/-/collect-all-1.0.3.tgz#1abcc20448b58a1447487fcf34130e9512b0acf8" + dependencies: + stream-connect "^1.0.2" + stream-via "^1.0.4" + +combined-stream@^1.0.5, combined-stream@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" + dependencies: + delayed-stream "~1.0.0" + +command-line-args@^4.0.1, command-line-args@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-4.0.6.tgz#0ff87a1dd159890dcaeb2a005abdae71e55059fc" + dependencies: + array-back "^1.0.4" + find-replace "^1.0.3" + typical "^2.6.1" + +command-line-tool@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/command-line-tool/-/command-line-tool-0.7.0.tgz#ca80792ae2069cf7caa562c0cbc2cd11811122a0" + dependencies: + ansi-escape-sequences "^3.0.0" + array-back "^1.0.4" + command-line-args "^4.0.1" + command-line-usage "^4.0.0" + typical "^2.6.0" + +command-line-usage@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/command-line-usage/-/command-line-usage-4.0.0.tgz#816b32788b58f9feba44d1e6dac60fcaeb29b5ea" + dependencies: + ansi-escape-sequences "^3.0.0" + array-back "^1.0.4" + table-layout "^0.4.0" + typical "^2.6.0" + +commander@^2.9.0: + version "2.10.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.10.0.tgz#e1f5d3245de246d1a5ca04702fa1ad1bd7e405fe" + dependencies: + graceful-readlink ">= 1.0.0" + +common-sequence@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/common-sequence/-/common-sequence-1.0.2.tgz#30e07f3f8f6f7f9b3dee854f20b2d39eee086de8" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +config-master@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/config-master/-/config-master-3.1.0.tgz#667663590505a283bf26a484d68489d74c5485da" + dependencies: + walk-back "^2.0.1" + +coveralls@^2.13.1: + version "2.13.1" + resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-2.13.1.tgz#d70bb9acc1835ec4f063ff9dac5423c17b11f178" + dependencies: + js-yaml "3.6.1" + lcov-parse "0.0.10" + log-driver "1.2.5" + minimist "1.2.0" + request "2.79.0" + +cryptiles@2.x.x: + version "2.0.5" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + dependencies: + boom "2.x.x" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + +deep-extend@~0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" + +defer-promise@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/defer-promise/-/defer-promise-1.0.1.tgz#1ca6ffeddbcef1715dd7aae25c7616f9ae22932f" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +dmd@^3.0.0: + version "3.0.6" + resolved "https://registry.yarnpkg.com/dmd/-/dmd-3.0.6.tgz#94c0e0fb88d1cb6b82837595053de7919c753c25" + dependencies: + array-back "^1.0.4" + cache-point "^0.4.0" + common-sequence "^1.0.2" + file-set "^1.1.1" + handlebars "3.0.3" + marked "^0.3.6" + object-get "^2.1.0" + reduce-flatten "^1.0.1" + reduce-unique "^1.0.0" + reduce-without "^1.0.1" + test-value "^2.1.0" + walk-back "^3.0.0" + +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + +escape-string-regexp@^1.0.2, escape-string-regexp@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +espree@~3.1.7: + version "3.1.7" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.1.7.tgz#fd5deec76a97a5120a9cd3a7cb1177a0923b11d2" + dependencies: + acorn "^3.3.0" + acorn-jsx "^3.0.0" + +esprima@^2.6.0: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + +extend@~3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" + +extsprintf@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" + +feature-detect-es6@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/feature-detect-es6/-/feature-detect-es6-1.3.1.tgz#f888736af9cb0c91f55663bfa4762eb96ee7047f" + dependencies: + array-back "^1.0.3" + +file-set@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/file-set/-/file-set-1.1.1.tgz#d3ec70c080ec8f18f204ba1de106780c9056926b" + dependencies: + array-back "^1.0.3" + glob "^7.1.0" + +find-replace@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-1.0.3.tgz#b88e7364d2d9c959559f388c66670d6130441fa0" + dependencies: + array-back "^1.0.4" + test-value "^2.1.0" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +form-data@~2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + +fs-then-native@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fs-then-native/-/fs-then-native-2.0.0.tgz#19a124d94d90c22c8e045f2e8dd6ebea36d48c67" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +generate-function@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" + +generate-object-property@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" + dependencies: + is-property "^1.0.0" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + dependencies: + assert-plus "^1.0.0" + +glob@^7.1.0: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +graceful-fs@^4.1.9: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +"graceful-readlink@>= 1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" + +handlebars@3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-3.0.3.tgz#0e09651a2f0fb3c949160583710d551f92e6d2ad" + dependencies: + optimist "^0.6.1" + source-map "^0.1.40" + optionalDependencies: + uglify-js "~2.3" + +har-validator@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" + dependencies: + chalk "^1.1.1" + commander "^2.9.0" + is-my-json-valid "^2.12.4" + pinkie-promise "^2.0.0" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +hawk@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + dependencies: + boom "2.x.x" + cryptiles "2.x.x" + hoek "2.x.x" + sntp "1.x.x" + +hoek@2.x.x: + version "2.16.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + +home-path@^1.0.3, home-path@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/home-path/-/home-path-1.0.5.tgz#788b29815b12d53bacf575648476e6f9041d133f" + +http-signature@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +is-my-json-valid@^2.12.4: + version "2.16.0" + resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz#f079dd9bfdae65ee2038aae8acbc86ab109e3693" + dependencies: + generate-function "^2.0.0" + generate-object-property "^1.1.0" + jsonpointer "^4.0.0" + xtend "^4.0.0" + +is-property@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +js-yaml@3.6.1: + version "3.6.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.6.1.tgz#6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30" + dependencies: + argparse "^1.0.7" + esprima "^2.6.0" + +js2xmlparser@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/js2xmlparser/-/js2xmlparser-1.0.0.tgz#5a170f2e8d6476ce45405e04823242513782fe30" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + +jsdoc-75lb@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/jsdoc-75lb/-/jsdoc-75lb-3.6.0.tgz#a807119528b4009ccbcab49b7522f63fec6cd0bd" + dependencies: + bluebird "~3.4.6" + catharsis "~0.8.8" + escape-string-regexp "~1.0.5" + espree "~3.1.7" + js2xmlparser "~1.0.0" + klaw "~1.3.0" + marked "~0.3.6" + mkdirp "~0.5.1" + requizzle "~0.2.1" + strip-json-comments "~2.0.1" + taffydb "2.6.2" + underscore "~1.8.3" + +jsdoc-api@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/jsdoc-api/-/jsdoc-api-3.0.0.tgz#0d52700235f865bd4a8bad5ebc1efb562fc8ad2a" + dependencies: + array-back "^1.0.4" + cache-point "~0.4.0" + collect-all "^1.0.2" + file-set "^1.1.1" + fs-then-native "^2.0.0" + jsdoc-75lb "^3.6.0" + object-to-spawn-args "^1.1.0" + temp-path "^1.0.0" + walk-back "^2.0.1" + +jsdoc-parse@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/jsdoc-parse/-/jsdoc-parse-3.0.0.tgz#271531d88f19df2520b1632a7f6c989441a87fde" + dependencies: + array-back "^1.0.4" + lodash.omit "^4.5.0" + lodash.pick "^4.4.0" + reduce-extract "^1.0.0" + sort-array "^1.1.1" + test-value "^2.1.0" + +jsdoc-to-markdown@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/jsdoc-to-markdown/-/jsdoc-to-markdown-3.0.0.tgz#cc8a94f1f412ac1da4bac1657475b0975ee8161a" + dependencies: + array-back "^1.0.4" + command-line-tool "^0.7.0" + config-master "^3.0.0" + dmd "^3.0.0" + jsdoc-api "^3.0.0" + jsdoc-parse "^3.0.0" + jsdoc2md-stats "^2.0.0" + walk-back "^2.0.1" + +jsdoc2md-stats@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/jsdoc2md-stats/-/jsdoc2md-stats-2.0.1.tgz#bd8343734cfe69ea8050a17931251293f0d9047b" + dependencies: + app-usage-stats "^0.5.0" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +jsonpointer@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" + +jsprim@^1.2.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.0.tgz#a3b87e40298d8c380552d8cc7628a0bb95a22918" + dependencies: + assert-plus "1.0.0" + extsprintf "1.0.2" + json-schema "0.2.3" + verror "1.3.6" + +klaw@~1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" + optionalDependencies: + graceful-fs "^4.1.9" + +lcov-parse@0.0.10: + version "0.0.10" + resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3" + +lodash.omit@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.omit/-/lodash.omit-4.5.0.tgz#6eb19ae5a1ee1dd9df0b969e66ce0b7fa30b5e60" + +lodash.padend@^4.6.1: + version "4.6.1" + resolved "https://registry.yarnpkg.com/lodash.padend/-/lodash.padend-4.6.1.tgz#53ccba047d06e158d311f45da625f4e49e6f166e" + +lodash.pick@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" + +log-driver@1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.5.tgz#7ae4ec257302fd790d557cb10c97100d857b0056" + +marked@^0.3.6, marked@~0.3.6: + version "0.3.6" + resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.6.tgz#b2c6c618fccece4ef86c4fc6cb8a7cbf5aeda8d7" + +mime-db@~1.27.0: + version "1.27.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.27.0.tgz#820f572296bbd20ec25ed55e5b5de869e5436eb1" + +mime-types@^2.1.12, mime-types@~2.1.7: + version "2.1.15" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.15.tgz#a4ebf5064094569237b8cf70046776d09fc92aed" + dependencies: + mime-db "~1.27.0" + +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8, minimist@~0.0.1: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +mkdirp2@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/mkdirp2/-/mkdirp2-1.0.3.tgz#cc8dd8265f1f06e2d8f5b10b6e52f4e050bed21b" + +mkdirp@~0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +oauth-sign@~0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + +object-get@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/object-get/-/object-get-2.1.0.tgz#722bbdb60039efa47cad3c6dc2ce51a85c02c5ae" + +object-to-spawn-args@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-to-spawn-args/-/object-to-spawn-args-1.1.1.tgz#77da8827f073d011c9e1b173f895781470246785" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +optimist@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + +optimist@~0.3.5: + version "0.3.7" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.3.7.tgz#c90941ad59e4273328923074d2cf2e7cbc6ec0d9" + dependencies: + wordwrap "~0.0.2" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +qs@~6.3.0: + version "6.3.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.2.tgz#e75bd5f6e268122a2a0e0bda630b2550c166502c" + +reduce-extract@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/reduce-extract/-/reduce-extract-1.0.0.tgz#67f2385beda65061b5f5f4312662e8b080ca1525" + dependencies: + test-value "^1.0.1" + +reduce-flatten@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/reduce-flatten/-/reduce-flatten-1.0.1.tgz#258c78efd153ddf93cb561237f61184f3696e327" + +reduce-unique@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/reduce-unique/-/reduce-unique-1.0.0.tgz#7e586bcf87a4e32b6d7abd8277fad6cdec9f4803" + +reduce-without@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/reduce-without/-/reduce-without-1.0.1.tgz#68ad0ead11855c9a37d4e8256c15bbf87972fc8c" + dependencies: + test-value "^2.0.0" + +req-then@^0.6.1: + version "0.6.2" + resolved "https://registry.yarnpkg.com/req-then/-/req-then-0.6.2.tgz#7f9e6ebbcab327adc9280aa92b3698d3fc1c5b0d" + dependencies: + array-back "^1.0.4" + defer-promise "^1.0.1" + lodash.pick "^4.4.0" + stream-read-all "^0.1.0" + typical "^2.6.1" + +request@2.79.0: + version "2.79.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.11.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~2.0.6" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + qs "~6.3.0" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "~0.4.1" + uuid "^3.0.0" + +requizzle@~0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/requizzle/-/requizzle-0.2.1.tgz#6943c3530c4d9a7e46f1cddd51c158fc670cdbde" + dependencies: + underscore "~1.6.0" + +sntp@1.x.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + dependencies: + hoek "2.x.x" + +sort-array@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/sort-array/-/sort-array-1.1.2.tgz#b88986053c0170a7f9de63f18a49ec79c24c3e64" + dependencies: + array-back "^1.0.4" + object-get "^2.1.0" + typical "^2.6.0" + +source-map@^0.1.40, source-map@~0.1.7: + version "0.1.43" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" + dependencies: + amdefine ">=0.0.4" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + +sshpk@^1.7.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + +stream-connect@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/stream-connect/-/stream-connect-1.0.2.tgz#18bc81f2edb35b8b5d9a8009200a985314428a97" + dependencies: + array-back "^1.0.2" + +stream-read-all@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/stream-read-all/-/stream-read-all-0.1.0.tgz#04fd4498d4f29717f5b7f316354425cf318c6385" + dependencies: + test-runner "^0.4.0" + +stream-via@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/stream-via/-/stream-via-1.0.4.tgz#8dccbb0ac909328eb8bc8e2a4bd3934afdaf606c" + +stringstream@~0.0.4: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + +strip-ansi@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +table-layout@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/table-layout/-/table-layout-0.4.0.tgz#c70ff0455d9add63b91f7c15a77926295c0e0e7d" + dependencies: + array-back "^1.0.4" + deep-extend "~0.4.1" + lodash.padend "^4.6.1" + typical "^2.6.0" + wordwrapjs "^2.0.0" + +taffydb@2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/taffydb/-/taffydb-2.6.2.tgz#7cbcb64b5a141b6a2efc2c5d2c67b4e150b2a268" + +temp-path@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/temp-path/-/temp-path-1.0.0.tgz#24b1543973ab442896d9ad367dd9cbdbfafe918b" + +test-runner@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/test-runner/-/test-runner-0.4.0.tgz#41426f9b3dfff4bcda2cb23f3b7df73d67d6b8a2" + dependencies: + ansi-escape-sequences "^3.0.0" + array-back "^1.0.4" + command-line-args "^4.0.6" + command-line-usage "^4.0.0" + file-set "^1.1.1" + reduce-flatten "^1.0.1" + +test-value@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/test-value/-/test-value-1.1.0.tgz#a09136f72ec043d27c893707c2b159bfad7de93f" + dependencies: + array-back "^1.0.2" + typical "^2.4.2" + +test-value@^2.0.0, test-value@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/test-value/-/test-value-2.1.0.tgz#11da6ff670f3471a73b625ca4f3fdcf7bb748291" + dependencies: + array-back "^1.0.3" + typical "^2.6.0" + +tough-cookie@~2.3.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" + dependencies: + punycode "^1.4.1" + +tunnel-agent@~0.4.1: + version "0.4.3" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + +typical@^2.4.2, typical@^2.6.0, typical@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/typical/-/typical-2.6.1.tgz#5c080e5d661cbbe38259d2e70a3c7253e873881d" + +uglify-js@~2.3: + version "2.3.6" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.3.6.tgz#fa0984770b428b7a9b2a8058f46355d14fef211a" + dependencies: + async "~0.2.6" + optimist "~0.3.5" + source-map "~0.1.7" + +underscore-contrib@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/underscore-contrib/-/underscore-contrib-0.3.0.tgz#665b66c24783f8fa2b18c9f8cbb0e2c7d48c26c7" + dependencies: + underscore "1.6.0" + +underscore@1.6.0, underscore@~1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.6.0.tgz#8b38b10cacdef63337b8b24e4ff86d45aea529a8" + +underscore@~1.8.3: + version "1.8.3" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.8.3.tgz#4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022" + +usage-stats@^0.9.0: + version "0.9.1" + resolved "https://registry.yarnpkg.com/usage-stats/-/usage-stats-0.9.1.tgz#3b34997dbef1e151f48a118a93a5c595e1d4269a" + dependencies: + array-back "^1.0.4" + home-path "^1.0.5" + mkdirp2 "^1.0.2" + req-then "^0.6.1" + typical "^2.6.0" + uuid "^3.0.1" + +uuid@^3.0.0, uuid@^3.0.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" + +verror@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" + dependencies: + extsprintf "1.0.2" + +walk-back@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/walk-back/-/walk-back-2.0.1.tgz#554e2a9d874fac47a8cb006bf44c2f0c4998a0a4" + +walk-back@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/walk-back/-/walk-back-3.0.0.tgz#2358787a35da91032dad5e92f80b12370d8795c5" + +wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + +wordwrapjs@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/wordwrapjs/-/wordwrapjs-2.0.0.tgz#ab55f695e6118da93858fdd70c053d1c5e01ac20" + dependencies: + array-back "^1.0.3" + feature-detect-es6 "^1.3.1" + reduce-flatten "^1.0.1" + typical "^2.6.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +xtend@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" diff --git a/frontend/node_modules/balanced-match/.github/FUNDING.yml b/frontend/node_modules/balanced-match/.github/FUNDING.yml new file mode 100644 index 0000000000000000000000000000000000000000..cea8b16e9edc40b78b839e97f7d4b174ada0b41f --- /dev/null +++ b/frontend/node_modules/balanced-match/.github/FUNDING.yml @@ -0,0 +1,2 @@ +tidelift: "npm/balanced-match" +patreon: juliangruber diff --git a/frontend/node_modules/balanced-match/LICENSE.md b/frontend/node_modules/balanced-match/LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..2cdc8e4148cc0aa1f788b25dbec4b22878644cdf --- /dev/null +++ b/frontend/node_modules/balanced-match/LICENSE.md @@ -0,0 +1,21 @@ +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/frontend/node_modules/balanced-match/README.md b/frontend/node_modules/balanced-match/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d2a48b6b49f2cf17358262f911b997121d1c2a31 --- /dev/null +++ b/frontend/node_modules/balanced-match/README.md @@ -0,0 +1,97 @@ +# balanced-match + +Match balanced string pairs, like `{` and `}` or `` and ``. Supports regular expressions as well! + +[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match) +[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match) + +[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match) + +## Example + +Get the first matching pair of braces: + +```js +var balanced = require('balanced-match'); + +console.log(balanced('{', '}', 'pre{in{nested}}post')); +console.log(balanced('{', '}', 'pre{first}between{second}post')); +console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post')); +``` + +The matches are: + +```bash +$ node example.js +{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' } +{ start: 3, + end: 9, + pre: 'pre', + body: 'first', + post: 'between{second}post' } +{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' } +``` + +## API + +### var m = balanced(a, b, str) + +For the first non-nested matching pair of `a` and `b` in `str`, return an +object with those keys: + +* **start** the index of the first match of `a` +* **end** the index of the matching `b` +* **pre** the preamble, `a` and `b` not included +* **body** the match, `a` and `b` not included +* **post** the postscript, `a` and `b` not included + +If there's no match, `undefined` will be returned. + +If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`. + +### var r = balanced.range(a, b, str) + +For the first non-nested matching pair of `a` and `b` in `str`, return an +array with indexes: `[ , ]`. + +If there's no match, `undefined` will be returned. + +If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`. + +## Installation + +With [npm](https://npmjs.org) do: + +```bash +npm install balanced-match +``` + +## Security contact information + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). +Tidelift will coordinate the fix and disclosure. + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/frontend/node_modules/balanced-match/index.js b/frontend/node_modules/balanced-match/index.js new file mode 100644 index 0000000000000000000000000000000000000000..c67a64608df7f4d8e126c0a8eff2cc4a3d837e71 --- /dev/null +++ b/frontend/node_modules/balanced-match/index.js @@ -0,0 +1,62 @@ +'use strict'; +module.exports = balanced; +function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + + var r = range(a, b, str); + + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; +} + +function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; +} + +balanced.range = range; +function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + + if (ai >= 0 && bi > 0) { + if(a===b) { + return [ai, bi]; + } + begs = []; + left = str.length; + + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [ begs.pop(), bi ]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + + bi = str.indexOf(b, i + 1); + } + + i = ai < bi && ai >= 0 ? ai : bi; + } + + if (begs.length) { + result = [ left, right ]; + } + } + + return result; +} diff --git a/frontend/node_modules/balanced-match/package.json b/frontend/node_modules/balanced-match/package.json new file mode 100644 index 0000000000000000000000000000000000000000..ce6073e0403b5a9aeef19a91624ad0256f5e61b8 --- /dev/null +++ b/frontend/node_modules/balanced-match/package.json @@ -0,0 +1,48 @@ +{ + "name": "balanced-match", + "description": "Match balanced character pairs, like \"{\" and \"}\"", + "version": "1.0.2", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/balanced-match.git" + }, + "homepage": "https://github.com/juliangruber/balanced-match", + "main": "index.js", + "scripts": { + "test": "tape test/test.js", + "bench": "matcha test/bench.js" + }, + "devDependencies": { + "matcha": "^0.7.0", + "tape": "^4.6.0" + }, + "keywords": [ + "match", + "regexp", + "test", + "balanced", + "parse" + ], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT", + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/20..latest", + "firefox/nightly", + "chrome/25..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + } +} diff --git a/frontend/node_modules/binary-extensions/binary-extensions.json b/frontend/node_modules/binary-extensions/binary-extensions.json new file mode 100644 index 0000000000000000000000000000000000000000..4aab3837893a2c70f31f9dd4d5fa856a69fd481c --- /dev/null +++ b/frontend/node_modules/binary-extensions/binary-extensions.json @@ -0,0 +1,260 @@ +[ + "3dm", + "3ds", + "3g2", + "3gp", + "7z", + "a", + "aac", + "adp", + "ai", + "aif", + "aiff", + "alz", + "ape", + "apk", + "appimage", + "ar", + "arj", + "asf", + "au", + "avi", + "bak", + "baml", + "bh", + "bin", + "bk", + "bmp", + "btif", + "bz2", + "bzip2", + "cab", + "caf", + "cgm", + "class", + "cmx", + "cpio", + "cr2", + "cur", + "dat", + "dcm", + "deb", + "dex", + "djvu", + "dll", + "dmg", + "dng", + "doc", + "docm", + "docx", + "dot", + "dotm", + "dra", + "DS_Store", + "dsk", + "dts", + "dtshd", + "dvb", + "dwg", + "dxf", + "ecelp4800", + "ecelp7470", + "ecelp9600", + "egg", + "eol", + "eot", + "epub", + "exe", + "f4v", + "fbs", + "fh", + "fla", + "flac", + "flatpak", + "fli", + "flv", + "fpx", + "fst", + "fvt", + "g3", + "gh", + "gif", + "graffle", + "gz", + "gzip", + "h261", + "h263", + "h264", + "icns", + "ico", + "ief", + "img", + "ipa", + "iso", + "jar", + "jpeg", + "jpg", + "jpgv", + "jpm", + "jxr", + "key", + "ktx", + "lha", + "lib", + "lvp", + "lz", + "lzh", + "lzma", + "lzo", + "m3u", + "m4a", + "m4v", + "mar", + "mdi", + "mht", + "mid", + "midi", + "mj2", + "mka", + "mkv", + "mmr", + "mng", + "mobi", + "mov", + "movie", + "mp3", + "mp4", + "mp4a", + "mpeg", + "mpg", + "mpga", + "mxu", + "nef", + "npx", + "numbers", + "nupkg", + "o", + "odp", + "ods", + "odt", + "oga", + "ogg", + "ogv", + "otf", + "ott", + "pages", + "pbm", + "pcx", + "pdb", + "pdf", + "pea", + "pgm", + "pic", + "png", + "pnm", + "pot", + "potm", + "potx", + "ppa", + "ppam", + "ppm", + "pps", + "ppsm", + "ppsx", + "ppt", + "pptm", + "pptx", + "psd", + "pya", + "pyc", + "pyo", + "pyv", + "qt", + "rar", + "ras", + "raw", + "resources", + "rgb", + "rip", + "rlc", + "rmf", + "rmvb", + "rpm", + "rtf", + "rz", + "s3m", + "s7z", + "scpt", + "sgi", + "shar", + "snap", + "sil", + "sketch", + "slk", + "smv", + "snk", + "so", + "stl", + "suo", + "sub", + "swf", + "tar", + "tbz", + "tbz2", + "tga", + "tgz", + "thmx", + "tif", + "tiff", + "tlz", + "ttc", + "ttf", + "txz", + "udf", + "uvh", + "uvi", + "uvm", + "uvp", + "uvs", + "uvu", + "viv", + "vob", + "war", + "wav", + "wax", + "wbmp", + "wdp", + "weba", + "webm", + "webp", + "whl", + "wim", + "wm", + "wma", + "wmv", + "wmx", + "woff", + "woff2", + "wrm", + "wvx", + "xbm", + "xif", + "xla", + "xlam", + "xls", + "xlsb", + "xlsm", + "xlsx", + "xlt", + "xltm", + "xltx", + "xm", + "xmind", + "xpi", + "xpm", + "xwd", + "xz", + "z", + "zip", + "zipx" +] diff --git a/frontend/node_modules/binary-extensions/binary-extensions.json.d.ts b/frontend/node_modules/binary-extensions/binary-extensions.json.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..94a248c2bcff7d66060ed1968cd12897d340b4a0 --- /dev/null +++ b/frontend/node_modules/binary-extensions/binary-extensions.json.d.ts @@ -0,0 +1,3 @@ +declare const binaryExtensionsJson: readonly string[]; + +export = binaryExtensionsJson; diff --git a/frontend/node_modules/binary-extensions/index.d.ts b/frontend/node_modules/binary-extensions/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f469ac5fb0fe5fd6cbd8816db9257c718d8d2c85 --- /dev/null +++ b/frontend/node_modules/binary-extensions/index.d.ts @@ -0,0 +1,14 @@ +/** +List of binary file extensions. + +@example +``` +import binaryExtensions = require('binary-extensions'); + +console.log(binaryExtensions); +//=> ['3ds', '3g2', …] +``` +*/ +declare const binaryExtensions: readonly string[]; + +export = binaryExtensions; diff --git a/frontend/node_modules/binary-extensions/index.js b/frontend/node_modules/binary-extensions/index.js new file mode 100644 index 0000000000000000000000000000000000000000..d46e46886711415a0a1064443c20e8a3704714c3 --- /dev/null +++ b/frontend/node_modules/binary-extensions/index.js @@ -0,0 +1 @@ +module.exports = require('./binary-extensions.json'); diff --git a/frontend/node_modules/binary-extensions/license b/frontend/node_modules/binary-extensions/license new file mode 100644 index 0000000000000000000000000000000000000000..401b1c731bcd3ed3193b94d7cbb81bd3b4a1dd47 --- /dev/null +++ b/frontend/node_modules/binary-extensions/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2019 Sindre Sorhus (https://sindresorhus.com), Paul Miller (https://paulmillr.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/frontend/node_modules/binary-extensions/package.json b/frontend/node_modules/binary-extensions/package.json new file mode 100644 index 0000000000000000000000000000000000000000..c4d3641735b91bde0b706bf4f039436934e4fb0c --- /dev/null +++ b/frontend/node_modules/binary-extensions/package.json @@ -0,0 +1,38 @@ +{ + "name": "binary-extensions", + "version": "2.2.0", + "description": "List of binary file extensions", + "license": "MIT", + "repository": "sindresorhus/binary-extensions", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts", + "binary-extensions.json", + "binary-extensions.json.d.ts" + ], + "keywords": [ + "binary", + "extensions", + "extension", + "file", + "json", + "list", + "array" + ], + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + } +} diff --git a/frontend/node_modules/binary-extensions/readme.md b/frontend/node_modules/binary-extensions/readme.md new file mode 100644 index 0000000000000000000000000000000000000000..3e25dd835e08b67c15d935a7cf2182865a61bc5f --- /dev/null +++ b/frontend/node_modules/binary-extensions/readme.md @@ -0,0 +1,41 @@ +# binary-extensions + +> List of binary file extensions + +The list is just a [JSON file](binary-extensions.json) and can be used anywhere. + + +## Install + +``` +$ npm install binary-extensions +``` + + +## Usage + +```js +const binaryExtensions = require('binary-extensions'); + +console.log(binaryExtensions); +//=> ['3ds', '3g2', …] +``` + + +## Related + +- [is-binary-path](https://github.com/sindresorhus/is-binary-path) - Check if a filepath is a binary file +- [text-extensions](https://github.com/sindresorhus/text-extensions) - List of text file extensions + + +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/frontend/node_modules/brace-expansion/LICENSE b/frontend/node_modules/brace-expansion/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..de3226673c3874b1c6506db022393c753495655c --- /dev/null +++ b/frontend/node_modules/brace-expansion/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/frontend/node_modules/brace-expansion/README.md b/frontend/node_modules/brace-expansion/README.md new file mode 100644 index 0000000000000000000000000000000000000000..6b4e0e16409152451eb2b55e083a88e3396c23b1 --- /dev/null +++ b/frontend/node_modules/brace-expansion/README.md @@ -0,0 +1,129 @@ +# brace-expansion + +[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), +as known from sh/bash, in JavaScript. + +[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion) +[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion) +[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/) + +[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion) + +## Example + +```js +var expand = require('brace-expansion'); + +expand('file-{a,b,c}.jpg') +// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] + +expand('-v{,,}') +// => ['-v', '-v', '-v'] + +expand('file{0..2}.jpg') +// => ['file0.jpg', 'file1.jpg', 'file2.jpg'] + +expand('file-{a..c}.jpg') +// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] + +expand('file{2..0}.jpg') +// => ['file2.jpg', 'file1.jpg', 'file0.jpg'] + +expand('file{0..4..2}.jpg') +// => ['file0.jpg', 'file2.jpg', 'file4.jpg'] + +expand('file-{a..e..2}.jpg') +// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg'] + +expand('file{00..10..5}.jpg') +// => ['file00.jpg', 'file05.jpg', 'file10.jpg'] + +expand('{{A..C},{a..c}}') +// => ['A', 'B', 'C', 'a', 'b', 'c'] + +expand('ppp{,config,oe{,conf}}') +// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf'] +``` + +## API + +```js +var expand = require('brace-expansion'); +``` + +### var expanded = expand(str) + +Return an array of all possible and valid expansions of `str`. If none are +found, `[str]` is returned. + +Valid expansions are: + +```js +/^(.*,)+(.+)?$/ +// {a,b,...} +``` + +A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. + +```js +/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +// {x..y[..incr]} +``` + +A numeric sequence from `x` to `y` inclusive, with optional increment. +If `x` or `y` start with a leading `0`, all the numbers will be padded +to have equal length. Negative numbers and backwards iteration work too. + +```js +/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +// {x..y[..incr]} +``` + +An alphabetic sequence from `x` to `y` inclusive, with optional increment. +`x` and `y` must be exactly one character, and if given, `incr` must be a +number. + +For compatibility reasons, the string `${` is not eligible for brace expansion. + +## Installation + +With [npm](https://npmjs.org) do: + +```bash +npm install brace-expansion +``` + +## Contributors + +- [Julian Gruber](https://github.com/juliangruber) +- [Isaac Z. Schlueter](https://github.com/isaacs) + +## Sponsors + +This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)! + +Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)! + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/frontend/node_modules/brace-expansion/index.js b/frontend/node_modules/brace-expansion/index.js new file mode 100644 index 0000000000000000000000000000000000000000..0478be81eabc2b140c2405999e46ba98214461eb --- /dev/null +++ b/frontend/node_modules/brace-expansion/index.js @@ -0,0 +1,201 @@ +var concatMap = require('concat-map'); +var balanced = require('balanced-match'); + +module.exports = expandTop; + +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; + +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} + +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} + + +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; + + var parts = []; + var m = balanced('{', '}', str); + + if (!m) + return str.split(','); + + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); + } + + parts.push.apply(parts, p); + + return parts; +} + +function expandTop(str) { + if (!str) + return []; + + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } + + return expand(escapeBraces(str), true).map(unescapeBraces); +} + +function identity(e) { + return e; +} + +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} + +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} + +function expand(str, isTop) { + var expansions = []; + + var m = balanced('{', '}', str); + if (!m || /\$$/.test(m.pre)) return [str]; + + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length + ? expand(m.post, false) + : ['']; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; + + var N; + + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length) + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { return expand(el, false) }); + } + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + + return expansions; +} + diff --git a/frontend/node_modules/brace-expansion/package.json b/frontend/node_modules/brace-expansion/package.json new file mode 100644 index 0000000000000000000000000000000000000000..a18faa8fd67b8265a4c01909f8f16d55a46bec32 --- /dev/null +++ b/frontend/node_modules/brace-expansion/package.json @@ -0,0 +1,47 @@ +{ + "name": "brace-expansion", + "description": "Brace expansion as known from sh/bash", + "version": "1.1.11", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/brace-expansion.git" + }, + "homepage": "https://github.com/juliangruber/brace-expansion", + "main": "index.js", + "scripts": { + "test": "tape test/*.js", + "gentest": "bash test/generate.sh", + "bench": "matcha test/perf/bench.js" + }, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + }, + "devDependencies": { + "matcha": "^0.7.0", + "tape": "^4.6.0" + }, + "keywords": [], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT", + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/20..latest", + "firefox/nightly", + "chrome/25..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + } +} diff --git a/frontend/node_modules/braces/CHANGELOG.md b/frontend/node_modules/braces/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..36f798b004e0df3fdd0edd130fbe87849739c1e4 --- /dev/null +++ b/frontend/node_modules/braces/CHANGELOG.md @@ -0,0 +1,184 @@ +# Release history + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +
+ Guiding Principles + +- Changelogs are for humans, not machines. +- There should be an entry for every single version. +- The same types of changes should be grouped. +- Versions and sections should be linkable. +- The latest version comes first. +- The release date of each versions is displayed. +- Mention whether you follow Semantic Versioning. + +
+ +
+ Types of changes + +Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_): + +- `Added` for new features. +- `Changed` for changes in existing functionality. +- `Deprecated` for soon-to-be removed features. +- `Removed` for now removed features. +- `Fixed` for any bug fixes. +- `Security` in case of vulnerabilities. + +
+ +## [3.0.0] - 2018-04-08 + +v3.0 is a complete refactor, resulting in a faster, smaller codebase, with fewer deps, and a more accurate parser and compiler. + +**Breaking Changes** + +- The undocumented `.makeRe` method was removed + +**Non-breaking changes** + +- Caching was removed + +## [2.3.2] - 2018-04-08 + +- start refactoring +- cover sets +- better range handling + +## [2.3.1] - 2018-02-17 + +- Remove unnecessary escape in Regex. (#14) + +## [2.3.0] - 2017-10-19 + +- minor code reorganization +- optimize regex +- expose `maxLength` option + +## [2.2.1] - 2017-05-30 + +- don't condense when braces contain extglobs + +## [2.2.0] - 2017-05-28 + +- ensure word boundaries are preserved +- fixes edge case where extglob characters precede a brace pattern + +## [2.1.1] - 2017-04-27 + +- use snapdragon-node +- handle edge case +- optimizations, lint + +## [2.0.4] - 2017-04-11 + +- pass opts to compiler +- minor optimization in create method +- re-write parser handlers to remove negation regex + +## [2.0.3] - 2016-12-10 + +- use split-string +- clear queue at the end +- adds sequences example +- add unit tests + +## [2.0.2] - 2016-10-21 + +- fix comma handling in nested extglobs + +## [2.0.1] - 2016-10-20 + +- add comments +- more tests, ensure quotes are stripped + +## [2.0.0] - 2016-10-19 + +- don't expand braces inside character classes +- add quantifier pattern + +## [1.8.5] - 2016-05-21 + +- Refactor (#10) + +## [1.8.4] - 2016-04-20 + +- fixes https://github.com/jonschlinkert/micromatch/issues/66 + +## [1.8.0] - 2015-03-18 + +- adds exponent examples, tests +- fixes the first example in https://github.com/jonschlinkert/micromatch/issues/38 + +## [1.6.0] - 2015-01-30 + +- optimizations, `bash` mode: +- improve path escaping + +## [1.5.0] - 2015-01-28 + +- Merge pull request #5 from eush77/lib-files + +## [1.4.0] - 2015-01-24 + +- add extglob tests +- externalize exponent function +- better whitespace handling + +## [1.3.0] - 2015-01-24 + +- make regex patterns explicity + +## [1.1.0] - 2015-01-11 + +- don't create a match group with `makeRe` + +## [1.0.0] - 2014-12-23 + +- Merge commit '97b05f5544f8348736a8efaecf5c32bbe3e2ad6e' +- support empty brace syntax +- better bash coverage +- better support for regex strings + +## [0.1.4] - 2014-11-14 + +- improve recognition of bad args, recognize mismatched argument types +- support escaping +- remove pathname-expansion +- support whitespace in patterns + +## [0.1.0] + +- first commit + +[2.3.2]: https://github.com/micromatch/braces/compare/2.3.1...2.3.2 +[2.3.1]: https://github.com/micromatch/braces/compare/2.3.0...2.3.1 +[2.3.0]: https://github.com/micromatch/braces/compare/2.2.1...2.3.0 +[2.2.1]: https://github.com/micromatch/braces/compare/2.2.0...2.2.1 +[2.2.0]: https://github.com/micromatch/braces/compare/2.1.1...2.2.0 +[2.1.1]: https://github.com/micromatch/braces/compare/2.1.0...2.1.1 +[2.1.0]: https://github.com/micromatch/braces/compare/2.0.4...2.1.0 +[2.0.4]: https://github.com/micromatch/braces/compare/2.0.3...2.0.4 +[2.0.3]: https://github.com/micromatch/braces/compare/2.0.2...2.0.3 +[2.0.2]: https://github.com/micromatch/braces/compare/2.0.1...2.0.2 +[2.0.1]: https://github.com/micromatch/braces/compare/2.0.0...2.0.1 +[2.0.0]: https://github.com/micromatch/braces/compare/1.8.5...2.0.0 +[1.8.5]: https://github.com/micromatch/braces/compare/1.8.4...1.8.5 +[1.8.4]: https://github.com/micromatch/braces/compare/1.8.0...1.8.4 +[1.8.0]: https://github.com/micromatch/braces/compare/1.6.0...1.8.0 +[1.6.0]: https://github.com/micromatch/braces/compare/1.5.0...1.6.0 +[1.5.0]: https://github.com/micromatch/braces/compare/1.4.0...1.5.0 +[1.4.0]: https://github.com/micromatch/braces/compare/1.3.0...1.4.0 +[1.3.0]: https://github.com/micromatch/braces/compare/1.2.0...1.3.0 +[1.2.0]: https://github.com/micromatch/braces/compare/1.1.0...1.2.0 +[1.1.0]: https://github.com/micromatch/braces/compare/1.0.0...1.1.0 +[1.0.0]: https://github.com/micromatch/braces/compare/0.1.4...1.0.0 +[0.1.4]: https://github.com/micromatch/braces/compare/0.1.0...0.1.4 + +[Unreleased]: https://github.com/micromatch/braces/compare/0.1.0...HEAD +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog \ No newline at end of file diff --git a/frontend/node_modules/braces/LICENSE b/frontend/node_modules/braces/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..d32ab4426a5f6bd7986ed80df4073bbf997903d1 --- /dev/null +++ b/frontend/node_modules/braces/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2018, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/frontend/node_modules/braces/README.md b/frontend/node_modules/braces/README.md new file mode 100644 index 0000000000000000000000000000000000000000..cba2f600d2e6efad9cb14279a04d7e3ac6cd6cce --- /dev/null +++ b/frontend/node_modules/braces/README.md @@ -0,0 +1,593 @@ +# braces [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/braces.svg?style=flat)](https://www.npmjs.com/package/braces) [![NPM monthly downloads](https://img.shields.io/npm/dm/braces.svg?style=flat)](https://npmjs.org/package/braces) [![NPM total downloads](https://img.shields.io/npm/dt/braces.svg?style=flat)](https://npmjs.org/package/braces) [![Linux Build Status](https://img.shields.io/travis/micromatch/braces.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/braces) + +> Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save braces +``` + +## v3.0.0 Released!! + +See the [changelog](CHANGELOG.md) for details. + +## Why use braces? + +Brace patterns make globs more powerful by adding the ability to match specific ranges and sequences of characters. + +* **Accurate** - complete support for the [Bash 4.3 Brace Expansion](www.gnu.org/software/bash/) specification (passes all of the Bash braces tests) +* **[fast and performant](#benchmarks)** - Starts fast, runs fast and [scales well](#performance) as patterns increase in complexity. +* **Organized code base** - The parser and compiler are easy to maintain and update when edge cases crop up. +* **Well-tested** - Thousands of test assertions, and passes all of the Bash, minimatch, and [brace-expansion](https://github.com/juliangruber/brace-expansion) unit tests (as of the date this was written). +* **Safer** - You shouldn't have to worry about users defining aggressive or malicious brace patterns that can break your application. Braces takes measures to prevent malicious regex that can be used for DDoS attacks (see [catastrophic backtracking](https://www.regular-expressions.info/catastrophic.html)). +* [Supports lists](#lists) - (aka "sets") `a/{b,c}/d` => `['a/b/d', 'a/c/d']` +* [Supports sequences](#sequences) - (aka "ranges") `{01..03}` => `['01', '02', '03']` +* [Supports steps](#steps) - (aka "increments") `{2..10..2}` => `['2', '4', '6', '8', '10']` +* [Supports escaping](#escaping) - To prevent evaluation of special characters. + +## Usage + +The main export is a function that takes one or more brace `patterns` and `options`. + +```js +const braces = require('braces'); +// braces(patterns[, options]); + +console.log(braces(['{01..05}', '{a..e}'])); +//=> ['(0[1-5])', '([a-e])'] + +console.log(braces(['{01..05}', '{a..e}'], { expand: true })); +//=> ['01', '02', '03', '04', '05', 'a', 'b', 'c', 'd', 'e'] +``` + +### Brace Expansion vs. Compilation + +By default, brace patterns are compiled into strings that are optimized for creating regular expressions and matching. + +**Compiled** + +```js +console.log(braces('a/{x,y,z}/b')); +//=> ['a/(x|y|z)/b'] +console.log(braces(['a/{01..20}/b', 'a/{1..5}/b'])); +//=> [ 'a/(0[1-9]|1[0-9]|20)/b', 'a/([1-5])/b' ] +``` + +**Expanded** + +Enable brace expansion by setting the `expand` option to true, or by using [braces.expand()](#expand) (returns an array similar to what you'd expect from Bash, or `echo {1..5}`, or [minimatch](https://github.com/isaacs/minimatch)): + +```js +console.log(braces('a/{x,y,z}/b', { expand: true })); +//=> ['a/x/b', 'a/y/b', 'a/z/b'] + +console.log(braces.expand('{01..10}')); +//=> ['01','02','03','04','05','06','07','08','09','10'] +``` + +### Lists + +Expand lists (like Bash "sets"): + +```js +console.log(braces('a/{foo,bar,baz}/*.js')); +//=> ['a/(foo|bar|baz)/*.js'] + +console.log(braces.expand('a/{foo,bar,baz}/*.js')); +//=> ['a/foo/*.js', 'a/bar/*.js', 'a/baz/*.js'] +``` + +### Sequences + +Expand ranges of characters (like Bash "sequences"): + +```js +console.log(braces.expand('{1..3}')); // ['1', '2', '3'] +console.log(braces.expand('a/{1..3}/b')); // ['a/1/b', 'a/2/b', 'a/3/b'] +console.log(braces('{a..c}', { expand: true })); // ['a', 'b', 'c'] +console.log(braces('foo/{a..c}', { expand: true })); // ['foo/a', 'foo/b', 'foo/c'] + +// supports zero-padded ranges +console.log(braces('a/{01..03}/b')); //=> ['a/(0[1-3])/b'] +console.log(braces('a/{001..300}/b')); //=> ['a/(0{2}[1-9]|0[1-9][0-9]|[12][0-9]{2}|300)/b'] +``` + +See [fill-range](https://github.com/jonschlinkert/fill-range) for all available range-expansion options. + +### Steppped ranges + +Steps, or increments, may be used with ranges: + +```js +console.log(braces.expand('{2..10..2}')); +//=> ['2', '4', '6', '8', '10'] + +console.log(braces('{2..10..2}')); +//=> ['(2|4|6|8|10)'] +``` + +When the [.optimize](#optimize) method is used, or [options.optimize](#optionsoptimize) is set to true, sequences are passed to [to-regex-range](https://github.com/jonschlinkert/to-regex-range) for expansion. + +### Nesting + +Brace patterns may be nested. The results of each expanded string are not sorted, and left to right order is preserved. + +**"Expanded" braces** + +```js +console.log(braces.expand('a{b,c,/{x,y}}/e')); +//=> ['ab/e', 'ac/e', 'a/x/e', 'a/y/e'] + +console.log(braces.expand('a/{x,{1..5},y}/c')); +//=> ['a/x/c', 'a/1/c', 'a/2/c', 'a/3/c', 'a/4/c', 'a/5/c', 'a/y/c'] +``` + +**"Optimized" braces** + +```js +console.log(braces('a{b,c,/{x,y}}/e')); +//=> ['a(b|c|/(x|y))/e'] + +console.log(braces('a/{x,{1..5},y}/c')); +//=> ['a/(x|([1-5])|y)/c'] +``` + +### Escaping + +**Escaping braces** + +A brace pattern will not be expanded or evaluted if _either the opening or closing brace is escaped_: + +```js +console.log(braces.expand('a\\{d,c,b}e')); +//=> ['a{d,c,b}e'] + +console.log(braces.expand('a{d,c,b\\}e')); +//=> ['a{d,c,b}e'] +``` + +**Escaping commas** + +Commas inside braces may also be escaped: + +```js +console.log(braces.expand('a{b\\,c}d')); +//=> ['a{b,c}d'] + +console.log(braces.expand('a{d\\,c,b}e')); +//=> ['ad,ce', 'abe'] +``` + +**Single items** + +Following bash conventions, a brace pattern is also not expanded when it contains a single character: + +```js +console.log(braces.expand('a{b}c')); +//=> ['a{b}c'] +``` + +## Options + +### options.maxLength + +**Type**: `Number` + +**Default**: `65,536` + +**Description**: Limit the length of the input string. Useful when the input string is generated or your application allows users to pass a string, et cetera. + +```js +console.log(braces('a/{b,c}/d', { maxLength: 3 })); //=> throws an error +``` + +### options.expand + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: Generate an "expanded" brace pattern (alternatively you can use the `braces.expand()` method, which does the same thing). + +```js +console.log(braces('a/{b,c}/d', { expand: true })); +//=> [ 'a/b/d', 'a/c/d' ] +``` + +### options.nodupes + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: Remove duplicates from the returned array. + +### options.rangeLimit + +**Type**: `Number` + +**Default**: `1000` + +**Description**: To prevent malicious patterns from being passed by users, an error is thrown when `braces.expand()` is used or `options.expand` is true and the generated range will exceed the `rangeLimit`. + +You can customize `options.rangeLimit` or set it to `Inifinity` to disable this altogether. + +**Examples** + +```js +// pattern exceeds the "rangeLimit", so it's optimized automatically +console.log(braces.expand('{1..1000}')); +//=> ['([1-9]|[1-9][0-9]{1,2}|1000)'] + +// pattern does not exceed "rangeLimit", so it's NOT optimized +console.log(braces.expand('{1..100}')); +//=> ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', '100'] +``` + +### options.transform + +**Type**: `Function` + +**Default**: `undefined` + +**Description**: Customize range expansion. + +**Example: Transforming non-numeric values** + +```js +const alpha = braces.expand('x/{a..e}/y', { + transform(value, index) { + // When non-numeric values are passed, "value" is a character code. + return 'foo/' + String.fromCharCode(value) + '-' + index; + } +}); +console.log(alpha); +//=> [ 'x/foo/a-0/y', 'x/foo/b-1/y', 'x/foo/c-2/y', 'x/foo/d-3/y', 'x/foo/e-4/y' ] +``` + +**Example: Transforming numeric values** + +```js +const numeric = braces.expand('{1..5}', { + transform(value) { + // when numeric values are passed, "value" is a number + return 'foo/' + value * 2; + } +}); +console.log(numeric); +//=> [ 'foo/2', 'foo/4', 'foo/6', 'foo/8', 'foo/10' ] +``` + +### options.quantifiers + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: In regular expressions, quanitifiers can be used to specify how many times a token can be repeated. For example, `a{1,3}` will match the letter `a` one to three times. + +Unfortunately, regex quantifiers happen to share the same syntax as [Bash lists](#lists) + +The `quantifiers` option tells braces to detect when [regex quantifiers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#quantifiers) are defined in the given pattern, and not to try to expand them as lists. + +**Examples** + +```js +const braces = require('braces'); +console.log(braces('a/b{1,3}/{x,y,z}')); +//=> [ 'a/b(1|3)/(x|y|z)' ] +console.log(braces('a/b{1,3}/{x,y,z}', {quantifiers: true})); +//=> [ 'a/b{1,3}/(x|y|z)' ] +console.log(braces('a/b{1,3}/{x,y,z}', {quantifiers: true, expand: true})); +//=> [ 'a/b{1,3}/x', 'a/b{1,3}/y', 'a/b{1,3}/z' ] +``` + +### options.unescape + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: Strip backslashes that were used for escaping from the result. + +## What is "brace expansion"? + +Brace expansion is a type of parameter expansion that was made popular by unix shells for generating lists of strings, as well as regex-like matching when used alongside wildcards (globs). + +In addition to "expansion", braces are also used for matching. In other words: + +* [brace expansion](#brace-expansion) is for generating new lists +* [brace matching](#brace-matching) is for filtering existing lists + +
+More about brace expansion (click to expand) + +There are two main types of brace expansion: + +1. **lists**: which are defined using comma-separated values inside curly braces: `{a,b,c}` +2. **sequences**: which are defined using a starting value and an ending value, separated by two dots: `a{1..3}b`. Optionally, a third argument may be passed to define a "step" or increment to use: `a{1..100..10}b`. These are also sometimes referred to as "ranges". + +Here are some example brace patterns to illustrate how they work: + +**Sets** + +``` +{a,b,c} => a b c +{a,b,c}{1,2} => a1 a2 b1 b2 c1 c2 +``` + +**Sequences** + +``` +{1..9} => 1 2 3 4 5 6 7 8 9 +{4..-4} => 4 3 2 1 0 -1 -2 -3 -4 +{1..20..3} => 1 4 7 10 13 16 19 +{a..j} => a b c d e f g h i j +{j..a} => j i h g f e d c b a +{a..z..3} => a d g j m p s v y +``` + +**Combination** + +Sets and sequences can be mixed together or used along with any other strings. + +``` +{a,b,c}{1..3} => a1 a2 a3 b1 b2 b3 c1 c2 c3 +foo/{a,b,c}/bar => foo/a/bar foo/b/bar foo/c/bar +``` + +The fact that braces can be "expanded" from relatively simple patterns makes them ideal for quickly generating test fixtures, file paths, and similar use cases. + +## Brace matching + +In addition to _expansion_, brace patterns are also useful for performing regular-expression-like matching. + +For example, the pattern `foo/{1..3}/bar` would match any of following strings: + +``` +foo/1/bar +foo/2/bar +foo/3/bar +``` + +But not: + +``` +baz/1/qux +baz/2/qux +baz/3/qux +``` + +Braces can also be combined with [glob patterns](https://github.com/jonschlinkert/micromatch) to perform more advanced wildcard matching. For example, the pattern `*/{1..3}/*` would match any of following strings: + +``` +foo/1/bar +foo/2/bar +foo/3/bar +baz/1/qux +baz/2/qux +baz/3/qux +``` + +## Brace matching pitfalls + +Although brace patterns offer a user-friendly way of matching ranges or sets of strings, there are also some major disadvantages and potential risks you should be aware of. + +### tldr + +**"brace bombs"** + +* brace expansion can eat up a huge amount of processing resources +* as brace patterns increase _linearly in size_, the system resources required to expand the pattern increase exponentially +* users can accidentally (or intentially) exhaust your system's resources resulting in the equivalent of a DoS attack (bonus: no programming knowledge is required!) + +For a more detailed explanation with examples, see the [geometric complexity](#geometric-complexity) section. + +### The solution + +Jump to the [performance section](#performance) to see how Braces solves this problem in comparison to other libraries. + +### Geometric complexity + +At minimum, brace patterns with sets limited to two elements have quadradic or `O(n^2)` complexity. But the complexity of the algorithm increases exponentially as the number of sets, _and elements per set_, increases, which is `O(n^c)`. + +For example, the following sets demonstrate quadratic (`O(n^2)`) complexity: + +``` +{1,2}{3,4} => (2X2) => 13 14 23 24 +{1,2}{3,4}{5,6} => (2X2X2) => 135 136 145 146 235 236 245 246 +``` + +But add an element to a set, and we get a n-fold Cartesian product with `O(n^c)` complexity: + +``` +{1,2,3}{4,5,6}{7,8,9} => (3X3X3) => 147 148 149 157 158 159 167 168 169 247 248 + 249 257 258 259 267 268 269 347 348 349 357 + 358 359 367 368 369 +``` + +Now, imagine how this complexity grows given that each element is a n-tuple: + +``` +{1..100}{1..100} => (100X100) => 10,000 elements (38.4 kB) +{1..100}{1..100}{1..100} => (100X100X100) => 1,000,000 elements (5.76 MB) +``` + +Although these examples are clearly contrived, they demonstrate how brace patterns can quickly grow out of control. + +**More information** + +Interested in learning more about brace expansion? + +* [linuxjournal/bash-brace-expansion](http://www.linuxjournal.com/content/bash-brace-expansion) +* [rosettacode/Brace_expansion](https://rosettacode.org/wiki/Brace_expansion) +* [cartesian product](https://en.wikipedia.org/wiki/Cartesian_product) + +
+ +## Performance + +Braces is not only screaming fast, it's also more accurate the other brace expansion libraries. + +### Better algorithms + +Fortunately there is a solution to the ["brace bomb" problem](#brace-matching-pitfalls): _don't expand brace patterns into an array when they're used for matching_. + +Instead, convert the pattern into an optimized regular expression. This is easier said than done, and braces is the only library that does this currently. + +**The proof is in the numbers** + +Minimatch gets exponentially slower as patterns increase in complexity, braces does not. The following results were generated using `braces()` and `minimatch.braceExpand()`, respectively. + +| **Pattern** | **braces** | **[minimatch][]** | +| --- | --- | --- | +| `{1..9007199254740991}`[^1] | `298 B` (5ms 459μs)| N/A (freezes) | +| `{1..1000000000000000}` | `41 B` (1ms 15μs) | N/A (freezes) | +| `{1..100000000000000}` | `40 B` (890μs) | N/A (freezes) | +| `{1..10000000000000}` | `39 B` (2ms 49μs) | N/A (freezes) | +| `{1..1000000000000}` | `38 B` (608μs) | N/A (freezes) | +| `{1..100000000000}` | `37 B` (397μs) | N/A (freezes) | +| `{1..10000000000}` | `35 B` (983μs) | N/A (freezes) | +| `{1..1000000000}` | `34 B` (798μs) | N/A (freezes) | +| `{1..100000000}` | `33 B` (733μs) | N/A (freezes) | +| `{1..10000000}` | `32 B` (5ms 632μs) | `78.89 MB` (16s 388ms 569μs) | +| `{1..1000000}` | `31 B` (1ms 381μs) | `6.89 MB` (1s 496ms 887μs) | +| `{1..100000}` | `30 B` (950μs) | `588.89 kB` (146ms 921μs) | +| `{1..10000}` | `29 B` (1ms 114μs) | `48.89 kB` (14ms 187μs) | +| `{1..1000}` | `28 B` (760μs) | `3.89 kB` (1ms 453μs) | +| `{1..100}` | `22 B` (345μs) | `291 B` (196μs) | +| `{1..10}` | `10 B` (533μs) | `20 B` (37μs) | +| `{1..3}` | `7 B` (190μs) | `5 B` (27μs) | + +### Faster algorithms + +When you need expansion, braces is still much faster. + +_(the following results were generated using `braces.expand()` and `minimatch.braceExpand()`, respectively)_ + +| **Pattern** | **braces** | **[minimatch][]** | +| --- | --- | --- | +| `{1..10000000}` | `78.89 MB` (2s 698ms 642μs) | `78.89 MB` (18s 601ms 974μs) | +| `{1..1000000}` | `6.89 MB` (458ms 576μs) | `6.89 MB` (1s 491ms 621μs) | +| `{1..100000}` | `588.89 kB` (20ms 728μs) | `588.89 kB` (156ms 919μs) | +| `{1..10000}` | `48.89 kB` (2ms 202μs) | `48.89 kB` (13ms 641μs) | +| `{1..1000}` | `3.89 kB` (1ms 796μs) | `3.89 kB` (1ms 958μs) | +| `{1..100}` | `291 B` (424μs) | `291 B` (211μs) | +| `{1..10}` | `20 B` (487μs) | `20 B` (72μs) | +| `{1..3}` | `5 B` (166μs) | `5 B` (27μs) | + +If you'd like to run these comparisons yourself, see [test/support/generate.js](test/support/generate.js). + +## Benchmarks + +### Running benchmarks + +Install dev dependencies: + +```bash +npm i -d && npm benchmark +``` + +### Latest results + +Braces is more accurate, without sacrificing performance. + +```bash +# range (expanded) + braces x 29,040 ops/sec ±3.69% (91 runs sampled)) + minimatch x 4,735 ops/sec ±1.28% (90 runs sampled) + +# range (optimized for regex) + braces x 382,878 ops/sec ±0.56% (94 runs sampled) + minimatch x 1,040 ops/sec ±0.44% (93 runs sampled) + +# nested ranges (expanded) + braces x 19,744 ops/sec ±2.27% (92 runs sampled)) + minimatch x 4,579 ops/sec ±0.50% (93 runs sampled) + +# nested ranges (optimized for regex) + braces x 246,019 ops/sec ±2.02% (93 runs sampled) + minimatch x 1,028 ops/sec ±0.39% (94 runs sampled) + +# set (expanded) + braces x 138,641 ops/sec ±0.53% (95 runs sampled) + minimatch x 219,582 ops/sec ±0.98% (94 runs sampled) + +# set (optimized for regex) + braces x 388,408 ops/sec ±0.41% (95 runs sampled) + minimatch x 44,724 ops/sec ±0.91% (89 runs sampled) + +# nested sets (expanded) + braces x 84,966 ops/sec ±0.48% (94 runs sampled) + minimatch x 140,720 ops/sec ±0.37% (95 runs sampled) + +# nested sets (optimized for regex) + braces x 263,340 ops/sec ±2.06% (92 runs sampled) + minimatch x 28,714 ops/sec ±0.40% (90 runs sampled) +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 197 | [jonschlinkert](https://github.com/jonschlinkert) | +| 4 | [doowb](https://github.com/doowb) | +| 1 | [es128](https://github.com/es128) | +| 1 | [eush77](https://github.com/eush77) | +| 1 | [hemanth](https://github.com/hemanth) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 08, 2019._ \ No newline at end of file diff --git a/frontend/node_modules/braces/index.js b/frontend/node_modules/braces/index.js new file mode 100644 index 0000000000000000000000000000000000000000..0eee0f567049b8773a065a2a8d344722f2e9b789 --- /dev/null +++ b/frontend/node_modules/braces/index.js @@ -0,0 +1,170 @@ +'use strict'; + +const stringify = require('./lib/stringify'); +const compile = require('./lib/compile'); +const expand = require('./lib/expand'); +const parse = require('./lib/parse'); + +/** + * Expand the given pattern or create a regex-compatible string. + * + * ```js + * const braces = require('braces'); + * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)'] + * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c'] + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {String} + * @api public + */ + +const braces = (input, options = {}) => { + let output = []; + + if (Array.isArray(input)) { + for (let pattern of input) { + let result = braces.create(pattern, options); + if (Array.isArray(result)) { + output.push(...result); + } else { + output.push(result); + } + } + } else { + output = [].concat(braces.create(input, options)); + } + + if (options && options.expand === true && options.nodupes === true) { + output = [...new Set(output)]; + } + return output; +}; + +/** + * Parse the given `str` with the given `options`. + * + * ```js + * // braces.parse(pattern, [, options]); + * const ast = braces.parse('a/{b,c}/d'); + * console.log(ast); + * ``` + * @param {String} pattern Brace pattern to parse + * @param {Object} options + * @return {Object} Returns an AST + * @api public + */ + +braces.parse = (input, options = {}) => parse(input, options); + +/** + * Creates a braces string from an AST, or an AST node. + * + * ```js + * const braces = require('braces'); + * let ast = braces.parse('foo/{a,b}/bar'); + * console.log(stringify(ast.nodes[2])); //=> '{a,b}' + * ``` + * @param {String} `input` Brace pattern or AST. + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.stringify = (input, options = {}) => { + if (typeof input === 'string') { + return stringify(braces.parse(input, options), options); + } + return stringify(input, options); +}; + +/** + * Compiles a brace pattern into a regex-compatible, optimized string. + * This method is called by the main [braces](#braces) function by default. + * + * ```js + * const braces = require('braces'); + * console.log(braces.compile('a/{b,c}/d')); + * //=> ['a/(b|c)/d'] + * ``` + * @param {String} `input` Brace pattern or AST. + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.compile = (input, options = {}) => { + if (typeof input === 'string') { + input = braces.parse(input, options); + } + return compile(input, options); +}; + +/** + * Expands a brace pattern into an array. This method is called by the + * main [braces](#braces) function when `options.expand` is true. Before + * using this method it's recommended that you read the [performance notes](#performance)) + * and advantages of using [.compile](#compile) instead. + * + * ```js + * const braces = require('braces'); + * console.log(braces.expand('a/{b,c}/d')); + * //=> ['a/b/d', 'a/c/d']; + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.expand = (input, options = {}) => { + if (typeof input === 'string') { + input = braces.parse(input, options); + } + + let result = expand(input, options); + + // filter out empty strings if specified + if (options.noempty === true) { + result = result.filter(Boolean); + } + + // filter out duplicates if specified + if (options.nodupes === true) { + result = [...new Set(result)]; + } + + return result; +}; + +/** + * Processes a brace pattern and returns either an expanded array + * (if `options.expand` is true), a highly optimized regex-compatible string. + * This method is called by the main [braces](#braces) function. + * + * ```js + * const braces = require('braces'); + * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}')) + * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)' + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.create = (input, options = {}) => { + if (input === '' || input.length < 3) { + return [input]; + } + + return options.expand !== true + ? braces.compile(input, options) + : braces.expand(input, options); +}; + +/** + * Expose "braces" + */ + +module.exports = braces; diff --git a/frontend/node_modules/braces/lib/compile.js b/frontend/node_modules/braces/lib/compile.js new file mode 100644 index 0000000000000000000000000000000000000000..3e984a4bbc29983535c0be07700941373d817d94 --- /dev/null +++ b/frontend/node_modules/braces/lib/compile.js @@ -0,0 +1,57 @@ +'use strict'; + +const fill = require('fill-range'); +const utils = require('./utils'); + +const compile = (ast, options = {}) => { + let walk = (node, parent = {}) => { + let invalidBlock = utils.isInvalidBrace(parent); + let invalidNode = node.invalid === true && options.escapeInvalid === true; + let invalid = invalidBlock === true || invalidNode === true; + let prefix = options.escapeInvalid === true ? '\\' : ''; + let output = ''; + + if (node.isOpen === true) { + return prefix + node.value; + } + if (node.isClose === true) { + return prefix + node.value; + } + + if (node.type === 'open') { + return invalid ? (prefix + node.value) : '('; + } + + if (node.type === 'close') { + return invalid ? (prefix + node.value) : ')'; + } + + if (node.type === 'comma') { + return node.prev.type === 'comma' ? '' : (invalid ? node.value : '|'); + } + + if (node.value) { + return node.value; + } + + if (node.nodes && node.ranges > 0) { + let args = utils.reduce(node.nodes); + let range = fill(...args, { ...options, wrap: false, toRegex: true }); + + if (range.length !== 0) { + return args.length > 1 && range.length > 1 ? `(${range})` : range; + } + } + + if (node.nodes) { + for (let child of node.nodes) { + output += walk(child, node); + } + } + return output; + }; + + return walk(ast); +}; + +module.exports = compile; diff --git a/frontend/node_modules/braces/lib/constants.js b/frontend/node_modules/braces/lib/constants.js new file mode 100644 index 0000000000000000000000000000000000000000..a93794366522a4351684c2204533d549f3f2136e --- /dev/null +++ b/frontend/node_modules/braces/lib/constants.js @@ -0,0 +1,57 @@ +'use strict'; + +module.exports = { + MAX_LENGTH: 1024 * 64, + + // Digits + CHAR_0: '0', /* 0 */ + CHAR_9: '9', /* 9 */ + + // Alphabet chars. + CHAR_UPPERCASE_A: 'A', /* A */ + CHAR_LOWERCASE_A: 'a', /* a */ + CHAR_UPPERCASE_Z: 'Z', /* Z */ + CHAR_LOWERCASE_Z: 'z', /* z */ + + CHAR_LEFT_PARENTHESES: '(', /* ( */ + CHAR_RIGHT_PARENTHESES: ')', /* ) */ + + CHAR_ASTERISK: '*', /* * */ + + // Non-alphabetic chars. + CHAR_AMPERSAND: '&', /* & */ + CHAR_AT: '@', /* @ */ + CHAR_BACKSLASH: '\\', /* \ */ + CHAR_BACKTICK: '`', /* ` */ + CHAR_CARRIAGE_RETURN: '\r', /* \r */ + CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */ + CHAR_COLON: ':', /* : */ + CHAR_COMMA: ',', /* , */ + CHAR_DOLLAR: '$', /* . */ + CHAR_DOT: '.', /* . */ + CHAR_DOUBLE_QUOTE: '"', /* " */ + CHAR_EQUAL: '=', /* = */ + CHAR_EXCLAMATION_MARK: '!', /* ! */ + CHAR_FORM_FEED: '\f', /* \f */ + CHAR_FORWARD_SLASH: '/', /* / */ + CHAR_HASH: '#', /* # */ + CHAR_HYPHEN_MINUS: '-', /* - */ + CHAR_LEFT_ANGLE_BRACKET: '<', /* < */ + CHAR_LEFT_CURLY_BRACE: '{', /* { */ + CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */ + CHAR_LINE_FEED: '\n', /* \n */ + CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */ + CHAR_PERCENT: '%', /* % */ + CHAR_PLUS: '+', /* + */ + CHAR_QUESTION_MARK: '?', /* ? */ + CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */ + CHAR_RIGHT_CURLY_BRACE: '}', /* } */ + CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */ + CHAR_SEMICOLON: ';', /* ; */ + CHAR_SINGLE_QUOTE: '\'', /* ' */ + CHAR_SPACE: ' ', /* */ + CHAR_TAB: '\t', /* \t */ + CHAR_UNDERSCORE: '_', /* _ */ + CHAR_VERTICAL_LINE: '|', /* | */ + CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */ +}; diff --git a/frontend/node_modules/braces/lib/expand.js b/frontend/node_modules/braces/lib/expand.js new file mode 100644 index 0000000000000000000000000000000000000000..376c748af2385682d69311568cd134db3693f6d0 --- /dev/null +++ b/frontend/node_modules/braces/lib/expand.js @@ -0,0 +1,113 @@ +'use strict'; + +const fill = require('fill-range'); +const stringify = require('./stringify'); +const utils = require('./utils'); + +const append = (queue = '', stash = '', enclose = false) => { + let result = []; + + queue = [].concat(queue); + stash = [].concat(stash); + + if (!stash.length) return queue; + if (!queue.length) { + return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash; + } + + for (let item of queue) { + if (Array.isArray(item)) { + for (let value of item) { + result.push(append(value, stash, enclose)); + } + } else { + for (let ele of stash) { + if (enclose === true && typeof ele === 'string') ele = `{${ele}}`; + result.push(Array.isArray(ele) ? append(item, ele, enclose) : (item + ele)); + } + } + } + return utils.flatten(result); +}; + +const expand = (ast, options = {}) => { + let rangeLimit = options.rangeLimit === void 0 ? 1000 : options.rangeLimit; + + let walk = (node, parent = {}) => { + node.queue = []; + + let p = parent; + let q = parent.queue; + + while (p.type !== 'brace' && p.type !== 'root' && p.parent) { + p = p.parent; + q = p.queue; + } + + if (node.invalid || node.dollar) { + q.push(append(q.pop(), stringify(node, options))); + return; + } + + if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) { + q.push(append(q.pop(), ['{}'])); + return; + } + + if (node.nodes && node.ranges > 0) { + let args = utils.reduce(node.nodes); + + if (utils.exceedsLimit(...args, options.step, rangeLimit)) { + throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.'); + } + + let range = fill(...args, options); + if (range.length === 0) { + range = stringify(node, options); + } + + q.push(append(q.pop(), range)); + node.nodes = []; + return; + } + + let enclose = utils.encloseBrace(node); + let queue = node.queue; + let block = node; + + while (block.type !== 'brace' && block.type !== 'root' && block.parent) { + block = block.parent; + queue = block.queue; + } + + for (let i = 0; i < node.nodes.length; i++) { + let child = node.nodes[i]; + + if (child.type === 'comma' && node.type === 'brace') { + if (i === 1) queue.push(''); + queue.push(''); + continue; + } + + if (child.type === 'close') { + q.push(append(q.pop(), queue, enclose)); + continue; + } + + if (child.value && child.type !== 'open') { + queue.push(append(queue.pop(), child.value)); + continue; + } + + if (child.nodes) { + walk(child, node); + } + } + + return queue; + }; + + return utils.flatten(walk(ast)); +}; + +module.exports = expand; diff --git a/frontend/node_modules/braces/lib/parse.js b/frontend/node_modules/braces/lib/parse.js new file mode 100644 index 0000000000000000000000000000000000000000..145ea264806943bfb174d0cd3887f2843d0d6a5d --- /dev/null +++ b/frontend/node_modules/braces/lib/parse.js @@ -0,0 +1,333 @@ +'use strict'; + +const stringify = require('./stringify'); + +/** + * Constants + */ + +const { + MAX_LENGTH, + CHAR_BACKSLASH, /* \ */ + CHAR_BACKTICK, /* ` */ + CHAR_COMMA, /* , */ + CHAR_DOT, /* . */ + CHAR_LEFT_PARENTHESES, /* ( */ + CHAR_RIGHT_PARENTHESES, /* ) */ + CHAR_LEFT_CURLY_BRACE, /* { */ + CHAR_RIGHT_CURLY_BRACE, /* } */ + CHAR_LEFT_SQUARE_BRACKET, /* [ */ + CHAR_RIGHT_SQUARE_BRACKET, /* ] */ + CHAR_DOUBLE_QUOTE, /* " */ + CHAR_SINGLE_QUOTE, /* ' */ + CHAR_NO_BREAK_SPACE, + CHAR_ZERO_WIDTH_NOBREAK_SPACE +} = require('./constants'); + +/** + * parse + */ + +const parse = (input, options = {}) => { + if (typeof input !== 'string') { + throw new TypeError('Expected a string'); + } + + let opts = options || {}; + let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + if (input.length > max) { + throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); + } + + let ast = { type: 'root', input, nodes: [] }; + let stack = [ast]; + let block = ast; + let prev = ast; + let brackets = 0; + let length = input.length; + let index = 0; + let depth = 0; + let value; + let memo = {}; + + /** + * Helpers + */ + + const advance = () => input[index++]; + const push = node => { + if (node.type === 'text' && prev.type === 'dot') { + prev.type = 'text'; + } + + if (prev && prev.type === 'text' && node.type === 'text') { + prev.value += node.value; + return; + } + + block.nodes.push(node); + node.parent = block; + node.prev = prev; + prev = node; + return node; + }; + + push({ type: 'bos' }); + + while (index < length) { + block = stack[stack.length - 1]; + value = advance(); + + /** + * Invalid chars + */ + + if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) { + continue; + } + + /** + * Escaped chars + */ + + if (value === CHAR_BACKSLASH) { + push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() }); + continue; + } + + /** + * Right square bracket (literal): ']' + */ + + if (value === CHAR_RIGHT_SQUARE_BRACKET) { + push({ type: 'text', value: '\\' + value }); + continue; + } + + /** + * Left square bracket: '[' + */ + + if (value === CHAR_LEFT_SQUARE_BRACKET) { + brackets++; + + let closed = true; + let next; + + while (index < length && (next = advance())) { + value += next; + + if (next === CHAR_LEFT_SQUARE_BRACKET) { + brackets++; + continue; + } + + if (next === CHAR_BACKSLASH) { + value += advance(); + continue; + } + + if (next === CHAR_RIGHT_SQUARE_BRACKET) { + brackets--; + + if (brackets === 0) { + break; + } + } + } + + push({ type: 'text', value }); + continue; + } + + /** + * Parentheses + */ + + if (value === CHAR_LEFT_PARENTHESES) { + block = push({ type: 'paren', nodes: [] }); + stack.push(block); + push({ type: 'text', value }); + continue; + } + + if (value === CHAR_RIGHT_PARENTHESES) { + if (block.type !== 'paren') { + push({ type: 'text', value }); + continue; + } + block = stack.pop(); + push({ type: 'text', value }); + block = stack[stack.length - 1]; + continue; + } + + /** + * Quotes: '|"|` + */ + + if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) { + let open = value; + let next; + + if (options.keepQuotes !== true) { + value = ''; + } + + while (index < length && (next = advance())) { + if (next === CHAR_BACKSLASH) { + value += next + advance(); + continue; + } + + if (next === open) { + if (options.keepQuotes === true) value += next; + break; + } + + value += next; + } + + push({ type: 'text', value }); + continue; + } + + /** + * Left curly brace: '{' + */ + + if (value === CHAR_LEFT_CURLY_BRACE) { + depth++; + + let dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true; + let brace = { + type: 'brace', + open: true, + close: false, + dollar, + depth, + commas: 0, + ranges: 0, + nodes: [] + }; + + block = push(brace); + stack.push(block); + push({ type: 'open', value }); + continue; + } + + /** + * Right curly brace: '}' + */ + + if (value === CHAR_RIGHT_CURLY_BRACE) { + if (block.type !== 'brace') { + push({ type: 'text', value }); + continue; + } + + let type = 'close'; + block = stack.pop(); + block.close = true; + + push({ type, value }); + depth--; + + block = stack[stack.length - 1]; + continue; + } + + /** + * Comma: ',' + */ + + if (value === CHAR_COMMA && depth > 0) { + if (block.ranges > 0) { + block.ranges = 0; + let open = block.nodes.shift(); + block.nodes = [open, { type: 'text', value: stringify(block) }]; + } + + push({ type: 'comma', value }); + block.commas++; + continue; + } + + /** + * Dot: '.' + */ + + if (value === CHAR_DOT && depth > 0 && block.commas === 0) { + let siblings = block.nodes; + + if (depth === 0 || siblings.length === 0) { + push({ type: 'text', value }); + continue; + } + + if (prev.type === 'dot') { + block.range = []; + prev.value += value; + prev.type = 'range'; + + if (block.nodes.length !== 3 && block.nodes.length !== 5) { + block.invalid = true; + block.ranges = 0; + prev.type = 'text'; + continue; + } + + block.ranges++; + block.args = []; + continue; + } + + if (prev.type === 'range') { + siblings.pop(); + + let before = siblings[siblings.length - 1]; + before.value += prev.value + value; + prev = before; + block.ranges--; + continue; + } + + push({ type: 'dot', value }); + continue; + } + + /** + * Text + */ + + push({ type: 'text', value }); + } + + // Mark imbalanced braces and brackets as invalid + do { + block = stack.pop(); + + if (block.type !== 'root') { + block.nodes.forEach(node => { + if (!node.nodes) { + if (node.type === 'open') node.isOpen = true; + if (node.type === 'close') node.isClose = true; + if (!node.nodes) node.type = 'text'; + node.invalid = true; + } + }); + + // get the location of the block on parent.nodes (block's siblings) + let parent = stack[stack.length - 1]; + let index = parent.nodes.indexOf(block); + // replace the (invalid) block with it's nodes + parent.nodes.splice(index, 1, ...block.nodes); + } + } while (stack.length > 0); + + push({ type: 'eos' }); + return ast; +}; + +module.exports = parse; diff --git a/frontend/node_modules/braces/lib/stringify.js b/frontend/node_modules/braces/lib/stringify.js new file mode 100644 index 0000000000000000000000000000000000000000..414b7bcc6b38c5c4831488bf20194c895064edcb --- /dev/null +++ b/frontend/node_modules/braces/lib/stringify.js @@ -0,0 +1,32 @@ +'use strict'; + +const utils = require('./utils'); + +module.exports = (ast, options = {}) => { + let stringify = (node, parent = {}) => { + let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); + let invalidNode = node.invalid === true && options.escapeInvalid === true; + let output = ''; + + if (node.value) { + if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) { + return '\\' + node.value; + } + return node.value; + } + + if (node.value) { + return node.value; + } + + if (node.nodes) { + for (let child of node.nodes) { + output += stringify(child); + } + } + return output; + }; + + return stringify(ast); +}; + diff --git a/frontend/node_modules/braces/lib/utils.js b/frontend/node_modules/braces/lib/utils.js new file mode 100644 index 0000000000000000000000000000000000000000..e3551a6749166fbe1a13ac2814ba0afde9d1b104 --- /dev/null +++ b/frontend/node_modules/braces/lib/utils.js @@ -0,0 +1,112 @@ +'use strict'; + +exports.isInteger = num => { + if (typeof num === 'number') { + return Number.isInteger(num); + } + if (typeof num === 'string' && num.trim() !== '') { + return Number.isInteger(Number(num)); + } + return false; +}; + +/** + * Find a node of the given type + */ + +exports.find = (node, type) => node.nodes.find(node => node.type === type); + +/** + * Find a node of the given type + */ + +exports.exceedsLimit = (min, max, step = 1, limit) => { + if (limit === false) return false; + if (!exports.isInteger(min) || !exports.isInteger(max)) return false; + return ((Number(max) - Number(min)) / Number(step)) >= limit; +}; + +/** + * Escape the given node with '\\' before node.value + */ + +exports.escapeNode = (block, n = 0, type) => { + let node = block.nodes[n]; + if (!node) return; + + if ((type && node.type === type) || node.type === 'open' || node.type === 'close') { + if (node.escaped !== true) { + node.value = '\\' + node.value; + node.escaped = true; + } + } +}; + +/** + * Returns true if the given brace node should be enclosed in literal braces + */ + +exports.encloseBrace = node => { + if (node.type !== 'brace') return false; + if ((node.commas >> 0 + node.ranges >> 0) === 0) { + node.invalid = true; + return true; + } + return false; +}; + +/** + * Returns true if a brace node is invalid. + */ + +exports.isInvalidBrace = block => { + if (block.type !== 'brace') return false; + if (block.invalid === true || block.dollar) return true; + if ((block.commas >> 0 + block.ranges >> 0) === 0) { + block.invalid = true; + return true; + } + if (block.open !== true || block.close !== true) { + block.invalid = true; + return true; + } + return false; +}; + +/** + * Returns true if a node is an open or close node + */ + +exports.isOpenOrClose = node => { + if (node.type === 'open' || node.type === 'close') { + return true; + } + return node.open === true || node.close === true; +}; + +/** + * Reduce an array of text nodes. + */ + +exports.reduce = nodes => nodes.reduce((acc, node) => { + if (node.type === 'text') acc.push(node.value); + if (node.type === 'range') node.type = 'text'; + return acc; +}, []); + +/** + * Flatten an array + */ + +exports.flatten = (...args) => { + const result = []; + const flat = arr => { + for (let i = 0; i < arr.length; i++) { + let ele = arr[i]; + Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele); + } + return result; + }; + flat(args); + return result; +}; diff --git a/frontend/node_modules/braces/package.json b/frontend/node_modules/braces/package.json new file mode 100644 index 0000000000000000000000000000000000000000..3f52e346f618f8916ec49a15ffbfbd206b7e93fa --- /dev/null +++ b/frontend/node_modules/braces/package.json @@ -0,0 +1,77 @@ +{ + "name": "braces", + "description": "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.", + "version": "3.0.2", + "homepage": "https://github.com/micromatch/braces", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Elan Shanker (https://github.com/es128)", + "Eugene Sharygin (https://github.com/eush77)", + "hemanth.hm (http://h3manth.com)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "micromatch/braces", + "bugs": { + "url": "https://github.com/micromatch/braces/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "lib" + ], + "main": "index.js", + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "mocha", + "benchmark": "node benchmark" + }, + "dependencies": { + "fill-range": "^7.0.1" + }, + "devDependencies": { + "ansi-colors": "^3.2.4", + "bash-path": "^2.0.1", + "gulp-format-md": "^2.0.0", + "mocha": "^6.1.1" + }, + "keywords": [ + "alpha", + "alphabetical", + "bash", + "brace", + "braces", + "expand", + "expansion", + "filepath", + "fill", + "fs", + "glob", + "globbing", + "letter", + "match", + "matches", + "matching", + "number", + "numerical", + "path", + "range", + "ranges", + "sh" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "lint": { + "reflinks": true + }, + "plugins": [ + "gulp-format-md" + ] + } +} diff --git a/frontend/node_modules/buffer-crc32/LICENSE b/frontend/node_modules/buffer-crc32/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..4cef10eb7b161e48e39d2cc4def3fd81db6cf884 --- /dev/null +++ b/frontend/node_modules/buffer-crc32/LICENSE @@ -0,0 +1,19 @@ +The MIT License + +Copyright (c) 2013 Brian J. Brennan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the +Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/frontend/node_modules/buffer-crc32/README.md b/frontend/node_modules/buffer-crc32/README.md new file mode 100644 index 0000000000000000000000000000000000000000..0d9d8b83595b57dd04076fd2372ac47b4e526750 --- /dev/null +++ b/frontend/node_modules/buffer-crc32/README.md @@ -0,0 +1,47 @@ +# buffer-crc32 + +[![Build Status](https://secure.travis-ci.org/brianloveswords/buffer-crc32.png?branch=master)](http://travis-ci.org/brianloveswords/buffer-crc32) + +crc32 that works with binary data and fancy character sets, outputs +buffer, signed or unsigned data and has tests. + +Derived from the sample CRC implementation in the PNG specification: http://www.w3.org/TR/PNG/#D-CRCAppendix + +# install +``` +npm install buffer-crc32 +``` + +# example +```js +var crc32 = require('buffer-crc32'); +// works with buffers +var buf = Buffer([0x00, 0x73, 0x75, 0x70, 0x20, 0x62, 0x72, 0x6f, 0x00]) +crc32(buf) // -> + +// has convenience methods for getting signed or unsigned ints +crc32.signed(buf) // -> -1805997238 +crc32.unsigned(buf) // -> 2488970058 + +// will cast to buffer if given a string, so you can +// directly use foreign characters safely +crc32('自動販売機') // -> + +// and works in append mode too +var partialCrc = crc32('hey'); +var partialCrc = crc32(' ', partialCrc); +var partialCrc = crc32('sup', partialCrc); +var partialCrc = crc32(' ', partialCrc); +var finalCrc = crc32('bros', partialCrc); // -> +``` + +# tests +This was tested against the output of zlib's crc32 method. You can run +the tests with`npm test` (requires tap) + +# see also +https://github.com/alexgorbatchev/node-crc, `crc.buffer.crc32` also +supports buffer inputs and return unsigned ints (thanks @tjholowaychuk). + +# license +MIT/X11 diff --git a/frontend/node_modules/buffer-crc32/index.js b/frontend/node_modules/buffer-crc32/index.js new file mode 100644 index 0000000000000000000000000000000000000000..6727dd39bb09ada1f02f48e11cacb435b86771c7 --- /dev/null +++ b/frontend/node_modules/buffer-crc32/index.js @@ -0,0 +1,111 @@ +var Buffer = require('buffer').Buffer; + +var CRC_TABLE = [ + 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, + 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, + 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, + 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, + 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, + 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, + 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, + 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, + 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, + 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, + 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, + 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, + 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, + 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, + 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, + 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, + 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, + 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, + 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, + 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, + 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, + 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, + 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, + 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, + 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, + 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, + 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, + 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, + 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, + 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, + 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, + 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, + 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, + 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, + 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, + 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, + 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, + 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, + 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, + 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, + 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, + 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, + 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, + 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, + 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, + 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, + 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, + 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, + 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, + 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, + 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, + 0x2d02ef8d +]; + +if (typeof Int32Array !== 'undefined') { + CRC_TABLE = new Int32Array(CRC_TABLE); +} + +function ensureBuffer(input) { + if (Buffer.isBuffer(input)) { + return input; + } + + var hasNewBufferAPI = + typeof Buffer.alloc === "function" && + typeof Buffer.from === "function"; + + if (typeof input === "number") { + return hasNewBufferAPI ? Buffer.alloc(input) : new Buffer(input); + } + else if (typeof input === "string") { + return hasNewBufferAPI ? Buffer.from(input) : new Buffer(input); + } + else { + throw new Error("input must be buffer, number, or string, received " + + typeof input); + } +} + +function bufferizeInt(num) { + var tmp = ensureBuffer(4); + tmp.writeInt32BE(num, 0); + return tmp; +} + +function _crc32(buf, previous) { + buf = ensureBuffer(buf); + if (Buffer.isBuffer(previous)) { + previous = previous.readUInt32BE(0); + } + var crc = ~~previous ^ -1; + for (var n = 0; n < buf.length; n++) { + crc = CRC_TABLE[(crc ^ buf[n]) & 0xff] ^ (crc >>> 8); + } + return (crc ^ -1); +} + +function crc32() { + return bufferizeInt(_crc32.apply(null, arguments)); +} +crc32.signed = function () { + return _crc32.apply(null, arguments); +}; +crc32.unsigned = function () { + return _crc32.apply(null, arguments) >>> 0; +}; + +module.exports = crc32; diff --git a/frontend/node_modules/buffer-crc32/package.json b/frontend/node_modules/buffer-crc32/package.json new file mode 100644 index 0000000000000000000000000000000000000000..e896bec584f960a953beb3b1f2291f5e33439a86 --- /dev/null +++ b/frontend/node_modules/buffer-crc32/package.json @@ -0,0 +1,39 @@ +{ + "author": "Brian J. Brennan ", + "name": "buffer-crc32", + "description": "A pure javascript CRC32 algorithm that plays nice with binary data", + "version": "0.2.13", + "licenses": [ + { + "type": "MIT", + "url": "https://github.com/brianloveswords/buffer-crc32/raw/master/LICENSE" + } + ], + "contributors": [ + { + "name": "Vladimir Kuznetsov", + "github": "mistakster" + } + ], + "homepage": "https://github.com/brianloveswords/buffer-crc32", + "repository": { + "type": "git", + "url": "git://github.com/brianloveswords/buffer-crc32.git" + }, + "main": "index.js", + "scripts": { + "test": "./node_modules/.bin/tap tests/*.test.js" + }, + "dependencies": {}, + "devDependencies": { + "tap": "~0.2.5" + }, + "optionalDependencies": {}, + "engines": { + "node": "*" + }, + "license": "MIT", + "files": [ + "index.js" + ] +} diff --git a/frontend/node_modules/buffer-from/LICENSE b/frontend/node_modules/buffer-from/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..e4bf1d69b1bb0df5acf1278e583264acdc1eefc5 --- /dev/null +++ b/frontend/node_modules/buffer-from/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016, 2018 Linus Unnebäck + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/frontend/node_modules/buffer-from/index.js b/frontend/node_modules/buffer-from/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e1a58b5e8a06fd24ce5321aa6b08255dc9d0716d --- /dev/null +++ b/frontend/node_modules/buffer-from/index.js @@ -0,0 +1,72 @@ +/* eslint-disable node/no-deprecated-api */ + +var toString = Object.prototype.toString + +var isModern = ( + typeof Buffer !== 'undefined' && + typeof Buffer.alloc === 'function' && + typeof Buffer.allocUnsafe === 'function' && + typeof Buffer.from === 'function' +) + +function isArrayBuffer (input) { + return toString.call(input).slice(8, -1) === 'ArrayBuffer' +} + +function fromArrayBuffer (obj, byteOffset, length) { + byteOffset >>>= 0 + + var maxLength = obj.byteLength - byteOffset + + if (maxLength < 0) { + throw new RangeError("'offset' is out of bounds") + } + + if (length === undefined) { + length = maxLength + } else { + length >>>= 0 + + if (length > maxLength) { + throw new RangeError("'length' is out of bounds") + } + } + + return isModern + ? Buffer.from(obj.slice(byteOffset, byteOffset + length)) + : new Buffer(new Uint8Array(obj.slice(byteOffset, byteOffset + length))) +} + +function fromString (string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('"encoding" must be a valid string encoding') + } + + return isModern + ? Buffer.from(string, encoding) + : new Buffer(string, encoding) +} + +function bufferFrom (value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('"value" argument must not be a number') + } + + if (isArrayBuffer(value)) { + return fromArrayBuffer(value, encodingOrOffset, length) + } + + if (typeof value === 'string') { + return fromString(value, encodingOrOffset) + } + + return isModern + ? Buffer.from(value) + : new Buffer(value) +} + +module.exports = bufferFrom diff --git a/frontend/node_modules/buffer-from/package.json b/frontend/node_modules/buffer-from/package.json new file mode 100644 index 0000000000000000000000000000000000000000..6ac5327bf8621ef03a3df8039518a98ba3d1648a --- /dev/null +++ b/frontend/node_modules/buffer-from/package.json @@ -0,0 +1,19 @@ +{ + "name": "buffer-from", + "version": "1.1.2", + "license": "MIT", + "repository": "LinusU/buffer-from", + "files": [ + "index.js" + ], + "scripts": { + "test": "standard && node test" + }, + "devDependencies": { + "standard": "^12.0.1" + }, + "keywords": [ + "buffer", + "buffer from" + ] +} diff --git a/frontend/node_modules/buffer-from/readme.md b/frontend/node_modules/buffer-from/readme.md new file mode 100644 index 0000000000000000000000000000000000000000..9880a558a7c91fefb0e6908318fbd991b6b93dcf --- /dev/null +++ b/frontend/node_modules/buffer-from/readme.md @@ -0,0 +1,69 @@ +# Buffer From + +A [ponyfill](https://ponyfill.com) for `Buffer.from`, uses native implementation if available. + +## Installation + +```sh +npm install --save buffer-from +``` + +## Usage + +```js +const bufferFrom = require('buffer-from') + +console.log(bufferFrom([1, 2, 3, 4])) +//=> + +const arr = new Uint8Array([1, 2, 3, 4]) +console.log(bufferFrom(arr.buffer, 1, 2)) +//=> + +console.log(bufferFrom('test', 'utf8')) +//=> + +const buf = bufferFrom('test') +console.log(bufferFrom(buf)) +//=> +``` + +## API + +### bufferFrom(array) + +- `array` <Array> + +Allocates a new `Buffer` using an `array` of octets. + +### bufferFrom(arrayBuffer[, byteOffset[, length]]) + +- `arrayBuffer` <ArrayBuffer> The `.buffer` property of a TypedArray or ArrayBuffer +- `byteOffset` <Integer> Where to start copying from `arrayBuffer`. **Default:** `0` +- `length` <Integer> How many bytes to copy from `arrayBuffer`. **Default:** `arrayBuffer.length - byteOffset` + +When passed a reference to the `.buffer` property of a TypedArray instance, the +newly created `Buffer` will share the same allocated memory as the TypedArray. + +The optional `byteOffset` and `length` arguments specify a memory range within +the `arrayBuffer` that will be shared by the `Buffer`. + +### bufferFrom(buffer) + +- `buffer` <Buffer> An existing `Buffer` to copy data from + +Copies the passed `buffer` data onto a new `Buffer` instance. + +### bufferFrom(string[, encoding]) + +- `string` <String> A string to encode. +- `encoding` <String> The encoding of `string`. **Default:** `'utf8'` + +Creates a new `Buffer` containing the given JavaScript string `string`. If +provided, the `encoding` parameter identifies the character encoding of +`string`. + +## See also + +- [buffer-alloc](https://github.com/LinusU/buffer-alloc) A ponyfill for `Buffer.alloc` +- [buffer-alloc-unsafe](https://github.com/LinusU/buffer-alloc-unsafe) A ponyfill for `Buffer.allocUnsafe` diff --git a/frontend/node_modules/builtin-modules/builtin-modules.json b/frontend/node_modules/builtin-modules/builtin-modules.json new file mode 100644 index 0000000000000000000000000000000000000000..e3f958e572c57fcce67eeb769f9f6ab4c8f6e0c4 --- /dev/null +++ b/frontend/node_modules/builtin-modules/builtin-modules.json @@ -0,0 +1,42 @@ +[ + "assert", + "async_hooks", + "buffer", + "child_process", + "cluster", + "console", + "constants", + "crypto", + "dgram", + "dns", + "domain", + "events", + "fs", + "http", + "http2", + "https", + "inspector", + "module", + "net", + "os", + "path", + "perf_hooks", + "process", + "punycode", + "querystring", + "readline", + "repl", + "stream", + "string_decoder", + "timers", + "tls", + "trace_events", + "tty", + "url", + "util", + "v8", + "vm", + "wasi", + "worker_threads", + "zlib" +] diff --git a/frontend/node_modules/builtin-modules/index.d.ts b/frontend/node_modules/builtin-modules/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..765dcfecfb9a3c2b36bd10ce19dd8b64bd6d3f10 --- /dev/null +++ b/frontend/node_modules/builtin-modules/index.d.ts @@ -0,0 +1,14 @@ +/** +List of the Node.js builtin modules. + +@example +``` +import builtinModules = require('builtin-modules'); + +console.log(builtinModules); +//=> ['assert', 'buffer', …] +``` +*/ +declare const builtinModules: readonly string[]; + +export = builtinModules; diff --git a/frontend/node_modules/builtin-modules/index.js b/frontend/node_modules/builtin-modules/index.js new file mode 100644 index 0000000000000000000000000000000000000000..3fd957f323f27afd2678626918278e6203c534b2 --- /dev/null +++ b/frontend/node_modules/builtin-modules/index.js @@ -0,0 +1,11 @@ +'use strict'; +const {builtinModules} = require('module'); + +const ignoreList = [ + 'sys' +]; + +// eslint-disable-next-line node/no-deprecated-api +module.exports = (builtinModules || Object.keys(process.binding('natives'))) + .filter(x => !/^_|^(internal|v8|node-inspect)\/|\//.test(x) && !ignoreList.includes(x)) + .sort(); diff --git a/frontend/node_modules/builtin-modules/license b/frontend/node_modules/builtin-modules/license new file mode 100644 index 0000000000000000000000000000000000000000..fa7ceba3eb4a9657a9db7f3ffca4e4e97a9019de --- /dev/null +++ b/frontend/node_modules/builtin-modules/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/frontend/node_modules/builtin-modules/package.json b/frontend/node_modules/builtin-modules/package.json new file mode 100644 index 0000000000000000000000000000000000000000..4df72b72b5e93e8fe05cbfcdd3ef35f3be0f0423 --- /dev/null +++ b/frontend/node_modules/builtin-modules/package.json @@ -0,0 +1,44 @@ +{ + "name": "builtin-modules", + "version": "3.2.0", + "description": "List of the Node.js builtin modules", + "license": "MIT", + "repository": "sindresorhus/builtin-modules", + "funding": "https://github.com/sponsors/sindresorhus", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava && tsd", + "make": "node make.js" + }, + "files": [ + "index.js", + "index.d.ts", + "static.js", + "static.d.ts", + "builtin-modules.json" + ], + "keywords": [ + "builtin", + "built-in", + "builtins", + "node", + "modules", + "core", + "bundled", + "list", + "array", + "names" + ], + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + } +} diff --git a/frontend/node_modules/builtin-modules/readme.md b/frontend/node_modules/builtin-modules/readme.md new file mode 100644 index 0000000000000000000000000000000000000000..9126b64dc1c89f08777729087a024c3832b68ef7 --- /dev/null +++ b/frontend/node_modules/builtin-modules/readme.md @@ -0,0 +1,44 @@ +# builtin-modules + +> List of the Node.js builtin modules + +The list is just a [JSON file](builtin-modules.json) and can be used anywhere. + +## Install + +``` +$ npm install builtin-modules +``` + +## Usage + +```js +const builtinModules = require('builtin-modules'); + +console.log(builtinModules); +//=> ['assert', 'buffer', ...] +``` + +## API + +Returns an array of builtin modules fetched from the running Node.js version. + +### Static list + +This module also comes bundled with a static array of builtin modules generated from the latest Node.js version. You can get it with `require('builtin-modules/static');` + +## Related + +- [is-builtin-module](https://github.com/sindresorhus/is-builtin-module) - Check if a string matches the name of a Node.js builtin module + +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/frontend/node_modules/builtin-modules/static.d.ts b/frontend/node_modules/builtin-modules/static.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..cfbd565341114ade25a9a6023293604e78892ec8 --- /dev/null +++ b/frontend/node_modules/builtin-modules/static.d.ts @@ -0,0 +1,14 @@ +/** +Static list of the Node.js builtin modules. + +@example +``` +import builtinModulesStatic = require('builtin-modules/static'); + +console.log(builtinModulesStatic); +//=> ['assert', 'buffer', …] +``` +*/ +declare const builtinModulesStatic: readonly string[]; + +export = builtinModulesStatic; diff --git a/frontend/node_modules/builtin-modules/static.js b/frontend/node_modules/builtin-modules/static.js new file mode 100644 index 0000000000000000000000000000000000000000..396628033d23f4dc4dc086b99456b2a02c58087f --- /dev/null +++ b/frontend/node_modules/builtin-modules/static.js @@ -0,0 +1,2 @@ +'use strict'; +module.exports = require('./builtin-modules'); diff --git a/frontend/node_modules/callsites/index.d.ts b/frontend/node_modules/callsites/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..61f597cf5beeb066b6ee4d084f9097223e417460 --- /dev/null +++ b/frontend/node_modules/callsites/index.d.ts @@ -0,0 +1,96 @@ +declare namespace callsites { + interface CallSite { + /** + Returns the value of `this`. + */ + getThis(): unknown | undefined; + + /** + Returns the type of `this` as a string. This is the name of the function stored in the constructor field of `this`, if available, otherwise the object's `[[Class]]` internal property. + */ + getTypeName(): string | null; + + /** + Returns the current function. + */ + getFunction(): Function | undefined; + + /** + Returns the name of the current function, typically its `name` property. If a name property is not available an attempt will be made to try to infer a name from the function's context. + */ + getFunctionName(): string | null; + + /** + Returns the name of the property of `this` or one of its prototypes that holds the current function. + */ + getMethodName(): string | undefined; + + /** + Returns the name of the script if this function was defined in a script. + */ + getFileName(): string | null; + + /** + Returns the current line number if this function was defined in a script. + */ + getLineNumber(): number | null; + + /** + Returns the current column number if this function was defined in a script. + */ + getColumnNumber(): number | null; + + /** + Returns a string representing the location where `eval` was called if this function was created using a call to `eval`. + */ + getEvalOrigin(): string | undefined; + + /** + Returns `true` if this is a top-level invocation, that is, if it's a global object. + */ + isToplevel(): boolean; + + /** + Returns `true` if this call takes place in code defined by a call to `eval`. + */ + isEval(): boolean; + + /** + Returns `true` if this call is in native V8 code. + */ + isNative(): boolean; + + /** + Returns `true` if this is a constructor call. + */ + isConstructor(): boolean; + } +} + +declare const callsites: { + /** + Get callsites from the V8 stack trace API. + + @returns An array of `CallSite` objects. + + @example + ``` + import callsites = require('callsites'); + + function unicorn() { + console.log(callsites()[0].getFileName()); + //=> '/Users/sindresorhus/dev/callsites/test.js' + } + + unicorn(); + ``` + */ + (): callsites.CallSite[]; + + // TODO: Remove this for the next major release, refactor the whole definition to: + // declare function callsites(): callsites.CallSite[]; + // export = callsites; + default: typeof callsites; +}; + +export = callsites; diff --git a/frontend/node_modules/callsites/index.js b/frontend/node_modules/callsites/index.js new file mode 100644 index 0000000000000000000000000000000000000000..486c2410479cde342624eceaa1e0b1deca9317eb --- /dev/null +++ b/frontend/node_modules/callsites/index.js @@ -0,0 +1,13 @@ +'use strict'; + +const callsites = () => { + const _prepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = (_, stack) => stack; + const stack = new Error().stack.slice(1); + Error.prepareStackTrace = _prepareStackTrace; + return stack; +}; + +module.exports = callsites; +// TODO: Remove this for the next major release +module.exports.default = callsites; diff --git a/frontend/node_modules/callsites/license b/frontend/node_modules/callsites/license new file mode 100644 index 0000000000000000000000000000000000000000..e7af2f77107d73046421ef56c4684cbfdd3c1e89 --- /dev/null +++ b/frontend/node_modules/callsites/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/frontend/node_modules/callsites/package.json b/frontend/node_modules/callsites/package.json new file mode 100644 index 0000000000000000000000000000000000000000..93463c34b25dab3a11fcb6522825789395fb624c --- /dev/null +++ b/frontend/node_modules/callsites/package.json @@ -0,0 +1,39 @@ +{ + "name": "callsites", + "version": "3.1.0", + "description": "Get callsites from the V8 stack trace API", + "license": "MIT", + "repository": "sindresorhus/callsites", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "stacktrace", + "v8", + "callsite", + "callsites", + "stack", + "trace", + "function", + "file", + "line", + "debug" + ], + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + } +} diff --git a/frontend/node_modules/callsites/readme.md b/frontend/node_modules/callsites/readme.md new file mode 100644 index 0000000000000000000000000000000000000000..fc846138f4a80d237fbe14a49bd7beef6510a711 --- /dev/null +++ b/frontend/node_modules/callsites/readme.md @@ -0,0 +1,48 @@ +# callsites [![Build Status](https://travis-ci.org/sindresorhus/callsites.svg?branch=master)](https://travis-ci.org/sindresorhus/callsites) + +> Get callsites from the [V8 stack trace API](https://v8.dev/docs/stack-trace-api) + + +## Install + +``` +$ npm install callsites +``` + + +## Usage + +```js +const callsites = require('callsites'); + +function unicorn() { + console.log(callsites()[0].getFileName()); + //=> '/Users/sindresorhus/dev/callsites/test.js' +} + +unicorn(); +``` + + +## API + +Returns an array of callsite objects with the following methods: + +- `getThis`: returns the value of `this`. +- `getTypeName`: returns the type of `this` as a string. This is the name of the function stored in the constructor field of `this`, if available, otherwise the object's `[[Class]]` internal property. +- `getFunction`: returns the current function. +- `getFunctionName`: returns the name of the current function, typically its `name` property. If a name property is not available an attempt will be made to try to infer a name from the function's context. +- `getMethodName`: returns the name of the property of `this` or one of its prototypes that holds the current function. +- `getFileName`: if this function was defined in a script returns the name of the script. +- `getLineNumber`: if this function was defined in a script returns the current line number. +- `getColumnNumber`: if this function was defined in a script returns the current column number +- `getEvalOrigin`: if this function was created using a call to `eval` returns a string representing the location where `eval` was called. +- `isToplevel`: is this a top-level invocation, that is, is this the global object? +- `isEval`: does this call take place in code defined by a call to `eval`? +- `isNative`: is this call in native V8 code? +- `isConstructor`: is this a constructor call? + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/frontend/node_modules/chalk/index.js b/frontend/node_modules/chalk/index.js new file mode 100644 index 0000000000000000000000000000000000000000..1cc5fa89a951596647e711d84cf88b1410e4d3ea --- /dev/null +++ b/frontend/node_modules/chalk/index.js @@ -0,0 +1,228 @@ +'use strict'; +const escapeStringRegexp = require('escape-string-regexp'); +const ansiStyles = require('ansi-styles'); +const stdoutColor = require('supports-color').stdout; + +const template = require('./templates.js'); + +const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); + +// `supportsColor.level` → `ansiStyles.color[name]` mapping +const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; + +// `color-convert` models to exclude from the Chalk API due to conflicts and such +const skipModels = new Set(['gray']); + +const styles = Object.create(null); + +function applyOptions(obj, options) { + options = options || {}; + + // Detect level if not set manually + const scLevel = stdoutColor ? stdoutColor.level : 0; + obj.level = options.level === undefined ? scLevel : options.level; + obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0; +} + +function Chalk(options) { + // We check for this.template here since calling `chalk.constructor()` + // by itself will have a `this` of a previously constructed chalk object + if (!this || !(this instanceof Chalk) || this.template) { + const chalk = {}; + applyOptions(chalk, options); + + chalk.template = function () { + const args = [].slice.call(arguments); + return chalkTag.apply(null, [chalk.template].concat(args)); + }; + + Object.setPrototypeOf(chalk, Chalk.prototype); + Object.setPrototypeOf(chalk.template, chalk); + + chalk.template.constructor = Chalk; + + return chalk.template; + } + + applyOptions(this, options); +} + +// Use bright blue on Windows as the normal blue color is illegible +if (isSimpleWindowsTerm) { + ansiStyles.blue.open = '\u001B[94m'; +} + +for (const key of Object.keys(ansiStyles)) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + + styles[key] = { + get() { + const codes = ansiStyles[key]; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); + } + }; +} + +styles.visible = { + get() { + return build.call(this, this._styles || [], true, 'visible'); + } +}; + +ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); +for (const model of Object.keys(ansiStyles.color.ansi)) { + if (skipModels.has(model)) { + continue; + } + + styles[model] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.color.close, + closeRe: ansiStyles.color.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; +} + +ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); +for (const model of Object.keys(ansiStyles.bgColor.ansi)) { + if (skipModels.has(model)) { + continue; + } + + const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); + styles[bgModel] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.bgColor.close, + closeRe: ansiStyles.bgColor.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; +} + +const proto = Object.defineProperties(() => {}, styles); + +function build(_styles, _empty, key) { + const builder = function () { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + builder._empty = _empty; + + const self = this; + + Object.defineProperty(builder, 'level', { + enumerable: true, + get() { + return self.level; + }, + set(level) { + self.level = level; + } + }); + + Object.defineProperty(builder, 'enabled', { + enumerable: true, + get() { + return self.enabled; + }, + set(enabled) { + self.enabled = enabled; + } + }); + + // See below for fix regarding invisible grey/dim combination on Windows + builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; + + // `__proto__` is used because we must return a function, but there is + // no way to create a function with a different prototype + builder.__proto__ = proto; // eslint-disable-line no-proto + + return builder; +} + +function applyStyle() { + // Support varags, but simply cast to string in case there's only one arg + const args = arguments; + const argsLen = args.length; + let str = String(arguments[0]); + + if (argsLen === 0) { + return ''; + } + + if (argsLen > 1) { + // Don't slice `arguments`, it prevents V8 optimizations + for (let a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || this.level <= 0 || !str) { + return this._empty ? '' : str; + } + + // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + const originalDim = ansiStyles.dim.open; + if (isSimpleWindowsTerm && this.hasGrey) { + ansiStyles.dim.open = ''; + } + + for (const code of this._styles.slice().reverse()) { + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; + + // Close the styling before a linebreak and reopen + // after next line to fix a bleed issue on macOS + // https://github.com/chalk/chalk/pull/92 + str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); + } + + // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue + ansiStyles.dim.open = originalDim; + + return str; +} + +function chalkTag(chalk, strings) { + if (!Array.isArray(strings)) { + // If chalk() was called by itself or with a string, + // return the string itself as a string. + return [].slice.call(arguments, 1).join(' '); + } + + const args = [].slice.call(arguments, 2); + const parts = [strings.raw[0]]; + + for (let i = 1; i < strings.length; i++) { + parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); + parts.push(String(strings.raw[i])); + } + + return template(chalk, parts.join('')); +} + +Object.defineProperties(Chalk.prototype, styles); + +module.exports = Chalk(); // eslint-disable-line new-cap +module.exports.supportsColor = stdoutColor; +module.exports.default = module.exports; // For TypeScript diff --git a/frontend/node_modules/chalk/index.js.flow b/frontend/node_modules/chalk/index.js.flow new file mode 100644 index 0000000000000000000000000000000000000000..622caaa2e803f3b451f617a391b61383925e05d3 --- /dev/null +++ b/frontend/node_modules/chalk/index.js.flow @@ -0,0 +1,93 @@ +// @flow strict + +type TemplateStringsArray = $ReadOnlyArray; + +export type Level = $Values<{ + None: 0, + Basic: 1, + Ansi256: 2, + TrueColor: 3 +}>; + +export type ChalkOptions = {| + enabled?: boolean, + level?: Level +|}; + +export type ColorSupport = {| + level: Level, + hasBasic: boolean, + has256: boolean, + has16m: boolean +|}; + +export interface Chalk { + (...text: string[]): string, + (text: TemplateStringsArray, ...placeholders: string[]): string, + constructor(options?: ChalkOptions): Chalk, + enabled: boolean, + level: Level, + rgb(r: number, g: number, b: number): Chalk, + hsl(h: number, s: number, l: number): Chalk, + hsv(h: number, s: number, v: number): Chalk, + hwb(h: number, w: number, b: number): Chalk, + bgHex(color: string): Chalk, + bgKeyword(color: string): Chalk, + bgRgb(r: number, g: number, b: number): Chalk, + bgHsl(h: number, s: number, l: number): Chalk, + bgHsv(h: number, s: number, v: number): Chalk, + bgHwb(h: number, w: number, b: number): Chalk, + hex(color: string): Chalk, + keyword(color: string): Chalk, + + +reset: Chalk, + +bold: Chalk, + +dim: Chalk, + +italic: Chalk, + +underline: Chalk, + +inverse: Chalk, + +hidden: Chalk, + +strikethrough: Chalk, + + +visible: Chalk, + + +black: Chalk, + +red: Chalk, + +green: Chalk, + +yellow: Chalk, + +blue: Chalk, + +magenta: Chalk, + +cyan: Chalk, + +white: Chalk, + +gray: Chalk, + +grey: Chalk, + +blackBright: Chalk, + +redBright: Chalk, + +greenBright: Chalk, + +yellowBright: Chalk, + +blueBright: Chalk, + +magentaBright: Chalk, + +cyanBright: Chalk, + +whiteBright: Chalk, + + +bgBlack: Chalk, + +bgRed: Chalk, + +bgGreen: Chalk, + +bgYellow: Chalk, + +bgBlue: Chalk, + +bgMagenta: Chalk, + +bgCyan: Chalk, + +bgWhite: Chalk, + +bgBlackBright: Chalk, + +bgRedBright: Chalk, + +bgGreenBright: Chalk, + +bgYellowBright: Chalk, + +bgBlueBright: Chalk, + +bgMagentaBright: Chalk, + +bgCyanBright: Chalk, + +bgWhiteBrigh: Chalk, + + supportsColor: ColorSupport +}; + +declare module.exports: Chalk; diff --git a/frontend/node_modules/chalk/license b/frontend/node_modules/chalk/license new file mode 100644 index 0000000000000000000000000000000000000000..e7af2f77107d73046421ef56c4684cbfdd3c1e89 --- /dev/null +++ b/frontend/node_modules/chalk/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/frontend/node_modules/chalk/package.json b/frontend/node_modules/chalk/package.json new file mode 100644 index 0000000000000000000000000000000000000000..bc324685a7625f038c2e960e3aae9580dece77b9 --- /dev/null +++ b/frontend/node_modules/chalk/package.json @@ -0,0 +1,71 @@ +{ + "name": "chalk", + "version": "2.4.2", + "description": "Terminal string styling done right", + "license": "MIT", + "repository": "chalk/chalk", + "engines": { + "node": ">=4" + }, + "scripts": { + "test": "xo && tsc --project types && flow --max-warnings=0 && nyc ava", + "bench": "matcha benchmark.js", + "coveralls": "nyc report --reporter=text-lcov | coveralls" + }, + "files": [ + "index.js", + "templates.js", + "types/index.d.ts", + "index.js.flow" + ], + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "str", + "ansi", + "style", + "styles", + "tty", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "devDependencies": { + "ava": "*", + "coveralls": "^3.0.0", + "execa": "^0.9.0", + "flow-bin": "^0.68.0", + "import-fresh": "^2.0.0", + "matcha": "^0.7.0", + "nyc": "^11.0.2", + "resolve-from": "^4.0.0", + "typescript": "^2.5.3", + "xo": "*" + }, + "types": "types/index.d.ts", + "xo": { + "envs": [ + "node", + "mocha" + ], + "ignores": [ + "test/_flow.js" + ] + } +} diff --git a/frontend/node_modules/chalk/readme.md b/frontend/node_modules/chalk/readme.md new file mode 100644 index 0000000000000000000000000000000000000000..d298e2c48d64a0ce10744fbae5129782f00d6908 --- /dev/null +++ b/frontend/node_modules/chalk/readme.md @@ -0,0 +1,314 @@ +

+
+
+ Chalk +
+
+
+

+ +> Terminal string styling done right + +[![Build Status](https://travis-ci.org/chalk/chalk.svg?branch=master)](https://travis-ci.org/chalk/chalk) [![Coverage Status](https://coveralls.io/repos/github/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/github/chalk/chalk?branch=master) [![](https://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo) [![Mentioned in Awesome Node.js](https://awesome.re/mentioned-badge.svg)](https://github.com/sindresorhus/awesome-nodejs) + +### [See what's new in Chalk 2](https://github.com/chalk/chalk/releases/tag/v2.0.0) + + + + +## Highlights + +- Expressive API +- Highly performant +- Ability to nest styles +- [256/Truecolor color support](#256-and-truecolor-color-support) +- Auto-detects color support +- Doesn't extend `String.prototype` +- Clean and focused +- Actively maintained +- [Used by ~23,000 packages](https://www.npmjs.com/browse/depended/chalk) as of December 31, 2017 + + +## Install + +```console +$ npm install chalk +``` + + + + + + +## Usage + +```js +const chalk = require('chalk'); + +console.log(chalk.blue('Hello world!')); +``` + +Chalk comes with an easy to use composable API where you just chain and nest the styles you want. + +```js +const chalk = require('chalk'); +const log = console.log; + +// Combine styled and normal strings +log(chalk.blue('Hello') + ' World' + chalk.red('!')); + +// Compose multiple styles using the chainable API +log(chalk.blue.bgRed.bold('Hello world!')); + +// Pass in multiple arguments +log(chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz')); + +// Nest styles +log(chalk.red('Hello', chalk.underline.bgBlue('world') + '!')); + +// Nest styles of the same type even (color, underline, background) +log(chalk.green( + 'I am a green line ' + + chalk.blue.underline.bold('with a blue substring') + + ' that becomes green again!' +)); + +// ES2015 template literal +log(` +CPU: ${chalk.red('90%')} +RAM: ${chalk.green('40%')} +DISK: ${chalk.yellow('70%')} +`); + +// ES2015 tagged template literal +log(chalk` +CPU: {red ${cpu.totalPercent}%} +RAM: {green ${ram.used / ram.total * 100}%} +DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%} +`); + +// Use RGB colors in terminal emulators that support it. +log(chalk.keyword('orange')('Yay for orange colored text!')); +log(chalk.rgb(123, 45, 67).underline('Underlined reddish color')); +log(chalk.hex('#DEADED').bold('Bold gray!')); +``` + +Easily define your own themes: + +```js +const chalk = require('chalk'); + +const error = chalk.bold.red; +const warning = chalk.keyword('orange'); + +console.log(error('Error!')); +console.log(warning('Warning!')); +``` + +Take advantage of console.log [string substitution](https://nodejs.org/docs/latest/api/console.html#console_console_log_data_args): + +```js +const name = 'Sindre'; +console.log(chalk.green('Hello %s'), name); +//=> 'Hello Sindre' +``` + + +## API + +### chalk.`\n\n\n\n\n\n\n","import { WithStreamlitConnection } from \"./streamlit\";\r\nimport ImageGallery from \"./ImageGallery.svelte\";\r\n// \"WithStreamlitConnection\" is a wrapper component. It bootstraps the\r\n// connection between your component and the Streamlit app, and handles\r\n// passing arguments from Python -> Component.\r\n//\r\n// You don't need to edit withStreamlitConnection (but you're welcome to!).\r\nconst imageGallery = new WithStreamlitConnection({\r\n target: document.body,\r\n props: {\r\n /**\r\n * Custom Streamlit component\r\n */\r\n component: ImageGallery,\r\n /**\r\n * Set to false if you want `args` (the named dictionary of arguments passed\r\n * from Python) to be passed as a dictionary to your component.\r\n *\r\n * Default is `true`.\r\n */\r\n spreadArgs: true,\r\n },\r\n});\r\nexport default ImageGallery;\r\n"],"names":["noop","assign","tar","src","k","run","fn","blank_object","Object","create","run_all","fns","forEach","is_function","thing","safe_not_equal","a","b","src_url_equal_anchor","current_component","src_url_equal","element_src","url","document","createElement","href","append_styles","target","style_sheet_id","styles","append_styles_to","node","root","getRootNode","ownerDocument","host","get_root_for_style","getElementById","style","element","id","textContent","appendChild","append","head","append_stylesheet","insert","anchor","insertBefore","detach","parentNode","removeChild","name","empty","data","createTextNode","listen","event","handler","options","addEventListener","removeEventListener","attr","attribute","value","removeAttribute","getAttribute","setAttribute","set_style","key","important","setProperty","set_current_component","component","get_current_component","Error","onMount","$$","on_mount","push","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","Promise","resolve","update_scheduled","add_render_callback","flushing","seen_callbacks","Set","flush","i","length","update","pop","callback","has","add","clear","fragment","before_update","dirty","p","ctx","after_update","outroing","outros","group_outros","r","c","check_outros","transition_in","block","local","delete","transition_out","o","d","create_component","mount_component","customElement","on_destroy","m","new_on_destroy","map","filter","destroy_component","detaching","make_dirty","then","fill","init","instance","create_fragment","not_equal","props","parent_component","bound","on_disconnect","context","Map","callbacks","skip_bound","ready","ret","rest","hydrate","nodes","Array","from","childNodes","children","l","intro","SvelteComponent","[object Object]","this","$destroy","type","index","indexOf","splice","$$props","obj","$$set","keys","privateData","WeakMap","wrappers","pd","retv","get","console","assert","setCancelFlag","passiveListener","cancelable","canceled","preventDefault","error","Event","eventTarget","set","eventPhase","currentTarget","stopped","immediateStopped","timeStamp","Date","now","defineProperty","enumerable","defineRedirectDescriptor","configurable","defineCallDescriptor","apply","arguments","getWrapper","proto","prototype","wrapper","BaseEvent","CustomEvent","call","constructor","writable","isFunc","getOwnPropertyDescriptor","defineWrapper","getPrototypeOf","isStopped","setPassiveListener","NONE","CAPTURING_PHASE","AT_TARGET","BUBBLING_PHASE","stopPropagation","stopImmediatePropagation","bubbles","Boolean","defaultPrevented","composed","srcElement","cancelBubble","returnValue","window","setPrototypeOf","listenersMap","isObject","x","getListeners","listeners","TypeError","defineEventAttribute","eventTargetPrototype","eventName","listenerType","listener","next","prev","newNode","passive","once","defineEventAttributeDescriptor","defineCustomEventTarget","eventNames","CustomEventTarget","EventTarget","isArray","types","optionsIsObj","capture","undefined","wrappedEvent","wrapEvent","err","handleEvent","setEventPhase","setCurrentTarget","flatbuffers","inRange","min","max","ToDictionary","SIZEOF_SHORT","SIZEOF_INT","FILE_IDENTIFIER_LENGTH","Encoding","UTF8_BYTES","UTF16_STRING","int32","Int32Array","float32","Float32Array","buffer","float64","Float64Array","isLittleEndian","Uint16Array","Uint8Array","Long","low","high","ZERO","toFloat64","equals","other","Builder","opt_initial_size","initial_size","bb","ByteBuffer","allocate","space","minalign","vtable","vtable_in_use","isNested","object_start","vtables","vector_num_elems","force_defaults","capacity","forceDefaults","dataBuffer","asUint8Array","bytes","subarray","position","offset","prep","size","additional_bytes","align_size","old_buf_size","growByteBuffer","pad","byte_size","writeInt8","writeInt16","writeInt32","writeInt64","writeFloat32","writeFloat64","addInt8","addInt16","addInt32","addInt64","addFloat32","addFloat64","addFieldInt8","voffset","defaultValue","slot","addFieldInt16","addFieldInt32","addFieldInt64","addFieldFloat32","addFieldFloat64","addFieldOffset","addOffset","addFieldStruct","nested","notNested","new_buf_size","nbb","setPosition","startObject","numfields","endObject","vtableloc","trimmed_size","len","existing_vtable","vt1","outer_loop","vt2","readInt16","j","finish","root_table","opt_file_identifier","file_identifier","charCodeAt","requiredField","table","field","table_start","vtable_start","readInt32","startVector","elem_size","num_elems","alignment","endVector","createString","s","utf8","codePoint","createLong","bytes_","position_","readInt8","readUint8","readUint16","readUint32","readInt64","readUint64","readFloat32","readFloat64","writeUint8","writeUint16","writeUint32","writeUint64","getBufferIdentifier","result","String","fromCharCode","__offset","bb_pos","vtable_offset","__union","t","__string","opt_encoding","__indirect","__vector","__vector_len","__has_identifier","ident","Stream","tokens","slice","endOfStream","read","shift","prepend","token","unshift","decoderError","fatal","opt_code_point","TextDecoder","encoding","toLowerCase","_streaming","_BOMseen","_decoder","_fatal","_ignoreBOM","TextEncoder","_encoder","_options","UTF8Decoder","utf8_code_point","utf8_bytes_seen","utf8_bytes_needed","utf8_lower_boundary","utf8_upper_boundary","stream","bite","code_point","UTF8Encoder","count","temp","decode","input","ArrayBuffer","byteOffset","byteLength","input_stream","code_points","cp","codePointsToString","encode","opt_string","string","n","u","stringToCodePoints","_Buffer","Buffer","useNativeEncoders","decodeUtf8","decoder","toUint8Array","toString","TextDecoderPolyfill","encodeUtf8","encoder","TextEncoderPolyfill","ITERATOR_DONE","freeze","done","ArrowJSON","_json","schema","batches","dictionaries","ReadableInterop","_getDOMStream","tee","_getNodeStream","pipe","pipeTo","duplex","pipeThrough","_DOMStream","toDOMStream","_nodeStream","toNodeStream","AsyncQueue","super","_values","resolvers","_closedPromise","_closedPromiseResolve","closed","reason","return","_ensureOpen","_error","reject","Symbol","asyncIterator","streamAdapters","_","abort","close","_args","BigIntCtor","BigIntAvailable","BigIntUnavailableError","BigIntUnavailable","asIntN","asUintN","BigInt","BigInt64ArrayCtor","BigInt64ArrayAvailable","BigInt64ArrayUnavailableError","BigInt64Array","BYTES_PER_ELEMENT","BigUint64ArrayCtor","BigUint64ArrayAvailable","BigUint64ArrayUnavailableError","BigUint64Array","isBoolean","isFunction","isPromise","isIterable","iterator","isAsyncIterable","isArrowJSON","isIteratorResult","isFileHandle","isNumber","isFetchResponse","isReadableDOMStream","isReadableNodeStream","SharedArrayBuf","SharedArrayBuffer","memcpy","source","targetByteOffset","sourceByteLength","targetByteLength","dst","Math","joinUint8Arrays","chunks","sliced","xOffset","yOffset","xLen","yLen","y","collapseContiguousByteRanges","reduce","Infinity","toArrayBufferView","ArrayBufferViewCtor","isView","toInt32Array","toBigInt64Array","toBigUint64Array","pump","toArrayBufferViewIterator","ArrayCtor","wrap","buffers","it","toUint8ArrayIterator","async","toArrayBufferViewAsyncIterator","emit","toUint8ArrayAsyncIterator","rebaseValueOffsets","valueOffsets","compareArrayLike","fromIterable","cmd","threw","bufferLength","isNaN","e","throw","fromAsyncIterable","fromDOMStream","AdaptiveByteReader","releaseLock","fromNodeStream","events","onEvent","race","isFinite","evt","destroy","cleanup","byobReader","defaultReader","supportsBYOB","reader","getBYOBReader","getDefaultReader","catch","readFromBYOBReader","mode","readInto","AbstractVector","org","apache","arrow","flatbuf","MetadataVersion","UnionMode","Precision","DateUnit","TimeUnit","IntervalUnit","Type","Endianness","Null","__init","builder","startNull","endNull","Struct_","startStruct_","endStruct_","List","startList","endList","LargeList","startLargeList","endLargeList","FixedSizeList","listSize","startFixedSizeList","addListSize","endFixedSizeList","keysSorted","startMap","addKeysSorted","endMap","Union","Sparse","typeIdsOffset","numElems","startUnion","addMode","addTypeIds","endUnion","Int","bitWidth","isSigned","startInt","addBitWidth","addIsSigned","endInt","FloatingPoint","HALF","precision","startFloatingPoint","addPrecision","endFloatingPoint","Utf8","startUtf8","endUtf8","Binary","startBinary","endBinary","LargeUtf8","startLargeUtf8","endLargeUtf8","LargeBinary","startLargeBinary","endLargeBinary","FixedSizeBinary","byteWidth","startFixedSizeBinary","addByteWidth","endFixedSizeBinary","Bool","startBool","endBool","Decimal","scale","startDecimal","addScale","endDecimal","MILLISECOND","unit","startDate","addUnit","endDate","Time","startTime","endTime","Timestamp","SECOND","optionalEncoding","timezoneOffset","startTimestamp","addTimezone","endTimestamp","Interval","YEAR_MONTH","startInterval","endInterval","Duration","startDuration","endDuration","KeyValue","keyOffset","valueOffset","startKeyValue","addKey","addValue","endKeyValue","DictionaryEncoding","indexTypeOffset","isOrdered","startDictionaryEncoding","addId","addIndexType","addIsOrdered","endDictionaryEncoding","Field","nameOffset","nullable","typeType","typeOffset","dictionaryOffset","childrenOffset","customMetadataOffset","startField","addName","addNullable","addTypeType","addType","addDictionary","addChildren","addCustomMetadata","endField","Schema","Little","endianness","fieldsOffset","startSchema","addEndianness","addFields","endSchema","NS7624605610262437867.org","MessageHeader","FieldNode","null_count","RecordBatch","nodesOffset","buffersOffset","startRecordBatch","addLength","addNodes","addBuffers","endRecordBatch","DictionaryBatch","dataOffset","isDelta","startDictionaryBatch","addData","addIsDelta","endDictionaryBatch","Message","V1","version","headerType","headerOffset","bodyLength","startMessage","addVersion","addHeaderType","addHeader","addBodyLength","endMessage","BufferType","Schema_.org","Message_.org","getBool","_data","_index","byte","bit","getBit","setBool","truncateBitmap","bitmap","alignedSize","packBools","iterateBits","values","xs","begin","byteIndex","remaining","popcnt_bit_range","lhs","rhs","sum","rhsInside","lhsInside","popcnt_array","arr","cnt","pos","view","DataView","popcnt_uint32","getUint32","getUint16","getUint8","uint32","Visitor","args","visit","getVisitFn","throwIfNotFound","visitor","dtype","Data","Vector","inferDType","DataType","visitNull","visitBool","visitInt","Int8","visitInt8","Int16","visitInt16","Int32","visitInt32","Int64","visitInt64","Uint8","visitUint8","Uint16","visitUint16","Uint32","visitUint32","Uint64","visitUint64","Float","visitFloat","Float16","visitFloat16","Float32","visitFloat32","Float64","visitFloat64","visitUtf8","visitBinary","visitFixedSizeBinary","visitDate","DateDay","visitDateDay","DateMillisecond","visitDateMillisecond","visitTimestamp","TimestampSecond","visitTimestampSecond","TimestampMillisecond","visitTimestampMillisecond","TimestampMicrosecond","visitTimestampMicrosecond","TimestampNanosecond","visitTimestampNanosecond","visitTime","TimeSecond","visitTimeSecond","TimeMillisecond","visitTimeMillisecond","TimeMicrosecond","visitTimeMicrosecond","TimeNanosecond","visitTimeNanosecond","visitDecimal","visitList","Struct","visitStruct","visitUnion","DenseUnion","visitDenseUnion","SparseUnion","visitSparseUnion","Dictionary","visitDictionary","visitInterval","IntervalDayTime","visitIntervalDayTime","IntervalYearMonth","visitIntervalYearMonth","visitFixedSizeList","visitMap","_node","typeId","SINGLE","DOUBLE","MICROSECOND","NANOSECOND","DAY","DAY_TIME","Dense","TypeComparator","compareFields","fields","others","every","f","compareField","compareConstructor","compareAny","compareInt","compareFloat","compareDate","compareTimestamp","timezone","compareTime","compareUnion","typeIds","compareInterval","indices","dictionary","comparer","toStringTag","ArrayType","Int_","Int8Array","Int16Array","Uint32Array","Date_","Time_","Timestamp_","Interval_","child","valueType","valueField","join","Union_","typeIdToChildIndex","idx","Map_","keyType","getId","atomicDictionaryId","strideForType","nullCount","childData","floor","_nullCount","stride","nullBitmap","childStride","_sliceBuffers","clone","_sliceChildren","newLength","VALIDITY","TYPE","OFFSET","DATA","valueOffsetsOrChildren","valueToString","toPrimitive","JSON","stringify","createIsValidFunction","nullValues","fnBody","noNaNs","valueToCase","Function","roundLengthUpToNearest64Bytes","BPE","BufferBuilder","_resize","reservedLength","reservedByteLength","extra","reserved","array","sliceOrExtendArray","DataBufferBuilder","reserve","BitmapBufferBuilder","numValid","numInvalid","val","cur","OffsetsBufferBuilder","WideBufferBuilder","ArrayType64","_ArrayType64","buffer64","nulls","finished","_nulls","_isValid","queueingStrategy","highWaterMark","sizeProperty","numChunks","new","toVector","throughIterable","throughAsyncIterable","numChildren","_offsets","_typeIds","setValid","isValid","setValue","_setValue","valid","offsets","last","FixedWidthBuilder","opts","VariableWidthBuilder","_pendingLength","pending","_pending","current","_flush","pendingLength","_flushPending","BoolBuilder","NullBuilder","DateBuilder","DateDayBuilder","DateMillisecondBuilder","DecimalBuilder","DictionaryBuilder","dictionaryHashFunction","hashFn","_dictionaryOffset","_keysToIndices","valueToKey","keysToIndices","_dictionary","curr","concat","FixedSizeBinaryBuilder","f64","u32","uint16ToFloat64","h","expo","sigf","sign","NaN","float64ToUint16","FloatBuilder","Float16Builder","Float32Builder","Float64Builder","isArrowBigNumSymbol","for","BigNum","SignedBigNum","UnsignedBigNum","DecimalBigNum","bignumToNumber","bn","hi","lo","signed","words","number","bignumToString","bignumToBigInt","decimalToString","digits","base64","base32","checks","reverse","toJSON","valueOf","hint","TypedArray","BigIntArray","BN","num","IntBuilder","Int8Builder","Int16Builder","Int32Builder","Int64Builder","toBigInt","values64","Uint8Builder","Uint16Builder","Uint32Builder","Uint64Builder","memo","TimeBuilder","TimeSecondBuilder","TimeMillisecondBuilder","TimeMicrosecondBuilder","TimeNanosecondBuilder","TimestampBuilder","TimestampSecondBuilder","TimestampMillisecondBuilder","TimestampMicrosecondBuilder","TimestampNanosecondBuilder","IntervalBuilder","IntervalDayTimeBuilder","IntervalYearMonthBuilder","BinaryBuilder","Utf8Builder","Run","kParent","kRowIndex","kKeyToIdx","kIdxToVal","kCustomInspect","Row","parent","numKeys","ktoi","itov","getValue","getIndex","ki","vi","v","kr","vr","callbackfn","thisArg","str","defineProperties","MapRow","createRowProxy","getChildAt","StructRow","defineRowProxyProperties","findIndex","desc","row","getter","setter","hasOwnProperty","Proxy","getKey","RowProxyHandler","isExtensible","deleteProperty","preventExtensions","ownKeys","receiver","Reflect","tmp","clampRange","end","big0","isNaNFast","createElementComparator","search","typeofSearch","valueOfSearch","comparators","createSubElementsComparator","creatMapComparator","createArrayLikeComparator","createVectorComparator","createObjectComparator","compareArray","compareObject","vec","compareVector","lKeyItr","rKeyItr","rValItr","rVal","lKey","rKey","Chunked","vectors","calculateOffsets","_type","_chunks","_chunkOffsets","_length","_numChildren","selectChunkArgs","flatten","VectorName","chunk","isDictionary","_indices","_sliceInternal","columns","_children","vector","mid","isValidInternal","getInternal","self","indexOfInternal","toArray","arraySet","typedSet","chunkIndex","fromIndex","start","found","slices","chunkOffsets","chunkLength","chunkOffset","to","Column","_field","SingleChunkColumn","some","metadata","column","_chunk","selectArgs","Ctor","vals","_selectArgs","selectFieldArgs","_selectFieldArgs","_selectChunkArgs","res","selectVectorChildrenArgs","_selectVectorChildrenArgs","toKeysAndValues","entries","fieldIndex","valueIndex","generateDictionaryMap","compareSchemas","columnNames","names","columnIndices","curFields","mergeMaps","newFields","f2","newDictionaries","m1","m2","ListBuilder","_run","bind","FixedSizeListBuilder","childIndex","MapBuilder","StructBuilder","UnionBuilder","_valueToChildTypeId","childTypeId","SparseUnionBuilder","DenseUnionBuilder","SetVisitor","setEpochMsToMillisecondsLong","epochMs","setVariableWidthBytes","setDateDay","setEpochMsToDays","setDateMillisecond","setNumeric","setFloat16","setNumericX2","long","setTimestampSecond","setTimestampMillisecond","setTimestampMicrosecond","setEpochMsToMicrosecondsLong","setTimestampNanosecond","setEpochMsToNanosecondsLong","setTimeSecond","setTimeMillisecond","setTimeMicrosecond","setTimeNanosecond","setDenseUnion","setSparseUnion","setIntervalDayTime","setIntervalYearMonth","itr","_setStructVectorValue","_setStructArrayValue","_setStructObjectValue","newBuilder","getBuilderConstructor","defaultOptions","getChildOptions","T","setVisitor","Footer","Block","schemaOffset","dictionariesOffset","recordBatchesOffset","startFooter","addSchema","addDictionaries","addRecordBatches","endFooter","metaDataLength","_Block","File_.org","_Footer","Footer_","V4","recordBatches","dictionaryBatches","_recordBatches","_dictionaryBatches","buf","footer","getRootAsFooter","OffHeapFooter","startRecordBatchesVector","numRecordBatches","rb","FileBlock","startDictionariesVector","numDictionaries","db","dictionaryBatchesOffset","finishFooterBuffer","getRecordBatch","getDictionaryBatch","_footer","recordBatchesLength","dictionariesLength","fileBlock","createBlock","AsyncByteQueue","write","sync","ByteStream","ByteStreamSource","peek","AsyncByteStream","AsyncByteStreamSource","body","cancel","RandomAccessFile","readAt","getInt32","nBytes","AsyncRandomAccessFile","file","_handle","stat","bytesRead","intAsHex","kPowersOfTen","BaseInt64","L","R","product","lessThan","_times","_plus","out_buffer","fromString","out","posn","group","parseInt","substr","multiple","times","plus","left","right","this_high","other_high","negate","startsWith","Int128","L0","L1","L2","L3","R0","R1","R2","R3","multiply","sums","VectorLoader","nodesIndex","buffersIndex","nextFieldNode","readNullBitmap","readData","readOffsets","visitMany","readTypeIds","readDictionary","nextBufferRange","JSONVectorLoader","sources","isTimestamp","isInt","isTime","isDate","convertArray","isDecimal","isBinary","isFixedSizeBinary","joined","binaryDataFromJSON","isBool","isUtf8","startTypeIdsVector","createTypeIdsVector","indexType","recordBatchFromJSON","fieldNodesFromJSON","fieldNodes","validity","buffersFromJSON","BufferRegion","fieldChildrenFromJSON","fromJSON","customMetadataFromJSON","_metadata","indexTypeFromJSON","typeFromJSON","_Field","_Schema","_Message","_KeyValue","_FieldNode","_Endianness","_RecordBatch","_DictionaryBatch","header","_version","_headerType","_createHeader","_bodyLength","msg","message","messageHeaderFromJSON","_message","getRootAsMessage","decodeMessageHeader","isSchema","isRecordBatch","isDictionaryBatch","finishMessageBuffer","_nodes","_buffers","_id","_isDelta","decodeFieldChildren","childrenLength","decodeCustomMetadata","entry","customMetadataLength","customMetadata","decodeIndexType","decodeFieldType","typeIdsArray","typeAssembler","childOffsets","childrenVectorOffset","createChildrenVector","metadataOffset","createCustomMetadataVector","dictType","dictMeta","fieldOffsets","startFieldsVector","fieldsVectorOffset","createFieldsVector","platformIsLittleEndian","Big","_schema","fieldsLength","decodeSchemaFields","schemaFieldsFromJSON","recordBatch","startNodesVector","nodesVectorOffset","startBuffersVector","b_","buffersVectorOffset","batch","nodesLength","decodeFieldNodes","bufferRegions","buffersLength","decodeBuffers","dictionaryBatch","createFieldNode","createBuffer","setInt16","invalidMessageType","nullMessage","invalidMessageMetadata","expected","actual","invalidMessageBodyLength","MessageReader","readMetadataLength","readMetadata","throwIfNull","readMessage","PADDING","metadataLength","AsyncMessageReader","JSONMessageReader","_body","_batchIndex","_dictionaryIndex","flattenDataSources","MAGIC","checkForMagicArrowString","magicLength","magicAndPadding","magicX2AndPadding","VectorAssembler","_byteLength","_bufferRegions","assembler","vectorChildren","assembleResult","RangeError","isNull","addBuffer","_nullV","assembleFlatVector","assembleFlatListVector","firstOffset","lastOffset","assembleListVector","assembleNestedVector","maxChildTypeId","childLengths","shiftedOffsets","unshiftedOffsets","childLength","RecordBatchWriter","_position","_started","_sink","_dictionaryBlocks","_recordBatchBlocks","_dictionaryDeltaOffsets","autoDestroy","writeLegacyIpcFormat","_autoDestroy","_writeLegacyIpcFormat","writableStrategy","readableStrategy","writeAll","writeAllAsync","reset","sink","isWritableNodeStream","objectMode","_writeFooter","compareTo","_writeSchema","payload","Table","_InternalEmptyPlaceholderRecordBatch","_writeRecordBatch","flatbufferSize","prefixSize","nPaddingBytes","_write","of","_writePadding","_writeMessage","assemble","metadata.RecordBatch","_writeDictionaries","_writeBodyBuffers","metadata.DictionaryBatch","padding","_writeDictionaryBatch","RecordBatchStreamWriter","writer","RecordBatchFileWriter","_writeMagic","noopBuf","nullBufs","bitmapLength","distributeVectorsIntoRecordBatches","vecs","batchArgs","numBatches","batchLength","numColumns","Number","POSITIVE_INFINITY","distributeChildData","uniformlyDistributeChunksAcrossRecordBatches","_changeLengthAndBackfillNullBitmap","BaseVector","_bindDataAccessors","isConcatSpreadable","BinaryVector","BoolVector","vectorFromValuesWithType","DateVector","DateDayVector","DateMillisecondVector","DecimalVector","DictionaryVector","FixedSizeBinaryVector","FixedSizeListVector","FloatVector","ArrowType","vectorTypeToDataType","InputType","arrayTypeToDataType","convertTo16Bit","Float16Vector","Float32Vector","Float64Vector","typeCtor","dataCtor","ctor","IntervalVector","IntervalDayTimeVector","IntervalYearMonthVector","IntVector","is64bit","convert32To64Bit","Int8Vector","Int16Vector","Int32Vector","Int64Vector","_values64","Uint8Vector","Uint16Vector","Uint32Vector","Uint64Vector","ListVector","MapVector","NullVector","StructVector","_row","TimestampVector","TimestampSecondVector","TimestampMillisecondVector","TimestampMicrosecondVector","TimestampNanosecondVector","TimeVector","TimeSecondVector","TimeMillisecondVector","TimeMicrosecondVector","TimeNanosecondVector","UnionVector","DenseUnionVector","SparseUnionVector","Utf8Vector","partial0","partial2","GetVisitor","epochMillisecondsLongToMs","epochMillisecondsToDate","getVariableWidthBytes","getDateDay","epochDaysToMs","epochDaysToDate","getDateMillisecond","epochMillisecondsLongToDate","getNumeric","getFloat16","getBigInts","getTimestampSecond","getTimestampMillisecond","getTimestampMicrosecond","epochMicrosecondsLongToMs","getTimestampNanosecond","epochNanosecondsLongToMs","getTimeSecond","getTimeMillisecond","getTimeMicrosecond","getTimeNanosecond","getDenseUnion","getSparseUnion","getIntervalDayTime","getIntervalYearMonth","interval","int32s","_vector","decimal","IndexOfVisitor","indexOfValue","searchElement","indexOfNull","compare","indexOfUnion","IteratorVisitor","vectorIterator","getFn","getVisitor","nullByte","nullBit","nullableIterator","ToArrayVisitor","arrayOfVector","iteratorVisitor","variableWidthColumnErrorMessage","____","visitFields","newDataType","getVectorConstructor","transform","indexOfVisitor","toArrayVisitor","getByteWidth","byteWidthVisitor","wrapNullableSet","VectorCtor","fn.partial2","fn.partial0","partialType0","fromStruct","tableFromIterable","tableFromAsyncIterable","RecordBatchReader","isSync","open","opening","cols","selectColumnArgs","numCols","getColumnAt","getColumnIndex","nameToIndex","selectAt","columnName","oldToNew","newIdx","_f","_fs","fs","vs","batchData","ensureSameLengthData","_dictionaries","DictionaryCollector","collect","impl","_impl","isFile","isAsync","isStream","readRecordBatch","RecordBatchStreamReader","RecordBatchJSONReaderImpl","fromArrowJSON","AsyncRecordBatchFileReader","AsyncRecordBatchFileReaderImpl","AsyncRecordBatchStreamReader","AsyncRecordBatchStreamReaderImpl","fromFileHandle","RecordBatchFileReader","RecordBatchFileReaderImpl","fromAsyncByteStream","RecordBatchStreamReaderImpl","fromByteStream","readAllSync","readAllAsync","RecordBatchReaderImpl","_recordBatchIndex","_loadVectors","_reader","shouldAutoDestroy","readSchema","_readNextMessageAndValidate","readMessageBody","_loadRecordBatch","_loadDictionaryBatch","_readFooter","_readDictionaryBatch","seek","BuilderTransform","_numChunks","_finished","_bufferedSize","builderOptions","_controller","_builder","_getSize","chunkByteLength","readableHighWaterMark","writableHighWaterMark","ReadableStream","pull","_maybeFlush","WritableStream","_writeValueAndReturnChunkSize","bufferedSize","controller","desiredSize","_enqueue","enqueue","Value","Literal","Equals","LTeq","GTeq","Not","ge","le","eq","Col","colidx","Predicate","expr","And","Or","ComparisonPredicate","_bindLitLit","_bindLitCol","_bindColLit","_bindColCol","CombinationPredicate","accum","_batch","rtrn","left_func","right_func","col","lit","col_func","lastDictionary","reverseLookup","lastKey","func","countBy","DataFrame","scan","scanReverse","predicate","FilteredDataFrame","batchIndex","numRows","count_by","countByteLength","ceil","log","counts","CountByResult","_predicate","isBound","and","bm","hwm","asyncIterableAsReadableDOMStream","iterableAsReadableDOMStream","queue","readable","ArrowTable","indexBuffer","columnsBuffer","styler","getCell","rowIndex","columnIndex","isBlankCell","headerRows","headerColumns","isIndexCell","isColumnsCell","classNames","content","dataColumnIndex","getContent","columnsTable","dataRowIndex","uuid","indexTable","displayValuesTable","dataTable","getColumnTypeId","nanosToDate","caption","rows","dataRows","dataColumns","columnTable","nanos","ComponentMessageType","Streamlit","levels","updates","to_null_out","accounted_for","$$scope","spread_props","renderData","width","disabled","spreadArgs","onRenderEvent","detail","RENDER_EVENT","setComponentReady","API_VERSION","registeredMessageListener","onMessageEvent","sendBackMsg","COMPONENT_READY","apiVersion","setFrameHeight","height","scrollHeight","lastFrameHeight","SET_FRAME_HEIGHT","setComponentValue","SET_COMPONENT_VALUE","onRenderMessage","dataframeArgs","argsDataframeToObject","eventData","dispatchEvent","argsDataframe","argsDataframeArrow","toArrowTable","fromEntries","df","postMessage","isStreamlitMessage","setStreamlitLifecycle","iterations","selectedImageUrl","imageUrls","currentSrc","ImageGallery"],"mappings":"gCAAA,SAASA,KAET,SAASC,EAAOC,EAAKC,GAEjB,IA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5BoxD,SAGIE,aAFOC,aACArB,yGAEY10D,GACnB81D,EAAmB91D,EAAMuK,WAAWyrD,WACpC5C,GAAU0B,kBAAkBgB,mGCAX,0FAA4B,CAC7C53D,OAAQJ,SAASgzC,KACjB9rC,MAAO,CAIHhE,UAAWi1D,GAOXnC,YAAY"} \ No newline at end of file diff --git a/frontend/public/index.html b/frontend/public/index.html new file mode 100644 index 0000000000000000000000000000000000000000..33ad368512a22f715dbd75f74f170f743fd6eb37 --- /dev/null +++ b/frontend/public/index.html @@ -0,0 +1,16 @@ + + + + Streamlit Component + + + + + + + + + + + + diff --git a/frontend/rollup.config.js b/frontend/rollup.config.js new file mode 100644 index 0000000000000000000000000000000000000000..8cdd3018911b4374dd2a5aea761f899a22c56511 --- /dev/null +++ b/frontend/rollup.config.js @@ -0,0 +1,79 @@ +import svelte from 'rollup-plugin-svelte'; +import resolve from '@rollup/plugin-node-resolve'; +import commonjs from '@rollup/plugin-commonjs'; +import livereload from 'rollup-plugin-livereload'; +import { terser } from 'rollup-plugin-terser'; +import sveltePreprocess from 'svelte-preprocess'; +import typescript from '@rollup/plugin-typescript'; + +const production = !process.env.ROLLUP_WATCH; + +function serve() { + let server; + + function toExit() { + if (server) server.kill(0); + } + + return { + writeBundle() { + if (server) return; + server = require('child_process').spawn('npm', ['run', 'start', '--', '--dev'], { + stdio: ['ignore', 'inherit', 'inherit'], + shell: true + }); + + process.on('SIGTERM', toExit); + process.on('exit', toExit); + } + }; +} + +export default { + input: 'src/main.ts', + output: { + sourcemap: true, + format: 'iife', + name: 'app', + file: 'public/build/bundle.js' + }, + plugins: [ + svelte({ + // enable run-time checks when not in production + dev: !production, + // we'll extract any component CSS out into + // a separate file - better for performance + css: css => { + css.write("frontend/public/build/bundle.css"); + }, + preprocess: sveltePreprocess(), + }), + + // If you have external dependencies installed from + // npm, you'll most likely need these plugins. In + // some cases you'll need additional configuration - + // consult the documentation for details: + // https://github.com/rollup/plugins/tree/master/packages/commonjs + resolve({ + browser: true, + dedupe: ['svelte'] + }), + commonjs(), + typescript({ sourceMap: !production }), + + // In dev mode, call `npm run start` once + // the bundle has been generated + !production && serve(), + + // Watch the `public` directory and refresh the + // browser on changes when not in production + !production && livereload('public'), + + // If we're building for production (npm run build + // instead of npm run dev), minify + production && terser() + ], + watch: { + clearScreen: false + } +}; diff --git a/frontend/src/ImageGallery.svelte b/frontend/src/ImageGallery.svelte new file mode 100644 index 0000000000000000000000000000000000000000..e56213d6b5f4f1d376978e49c6ca0d71c6864b99 --- /dev/null +++ b/frontend/src/ImageGallery.svelte @@ -0,0 +1,50 @@ + + + +
+ {#each imageUrls as imageUrl} + + {/each} +
+ + + + + + + + + diff --git a/frontend/src/main.ts b/frontend/src/main.ts new file mode 100644 index 0000000000000000000000000000000000000000..2eebb9866faad00b3e0f02b94b87a5157826e24f --- /dev/null +++ b/frontend/src/main.ts @@ -0,0 +1,27 @@ +import { WithStreamlitConnection } from "./streamlit"; +import ImageGallery from "./ImageGallery.svelte"; + +// "WithStreamlitConnection" is a wrapper component. It bootstraps the +// connection between your component and the Streamlit app, and handles +// passing arguments from Python -> Component. +// +// You don't need to edit withStreamlitConnection (but you're welcome to!). +const imageGallery = new WithStreamlitConnection({ + target: document.body, + props: { + /** + * Custom Streamlit component + */ + component: ImageGallery, + + /** + * Set to false if you want `args` (the named dictionary of arguments passed + * from Python) to be passed as a dictionary to your component. + * + * Default is `true`. + */ + spreadArgs: true, + }, +}); + +export default ImageGallery; diff --git a/frontend/src/streamlit/ArrowTable.ts b/frontend/src/streamlit/ArrowTable.ts new file mode 100644 index 0000000000000000000000000000000000000000..9d0428746e042fb5a8faf3d7321fa91b277ad7b3 --- /dev/null +++ b/frontend/src/streamlit/ArrowTable.ts @@ -0,0 +1,224 @@ +/** + * @license + * Copyright 2018-2019 Streamlit Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Table, Type } from "apache-arrow" + +type CellType = "blank" | "index" | "columns" | "data" + +export interface ArrowDataframeProto { + data: ArrowTableProto + height: string + width: string +} + +export interface ArrowTableProto { + data: Uint8Array + index: Uint8Array + columns: Uint8Array + styler: Styler +} + +interface Cell { + classNames: string + content: string + id?: string + type: CellType +} + +interface Styler { + caption?: string + displayValuesTable: Table + styles?: string + uuid: string +} + +export class ArrowTable { + private readonly dataTable: Table + private readonly indexTable: Table + private readonly columnsTable: Table + private readonly styler?: Styler + + constructor( + dataBuffer: Uint8Array, + indexBuffer: Uint8Array, + columnsBuffer: Uint8Array, + styler?: any + ) { + this.dataTable = Table.from(dataBuffer) + this.indexTable = Table.from(indexBuffer) + this.columnsTable = Table.from(columnsBuffer) + this.styler = styler + ? { + caption: styler.get("caption"), + displayValuesTable: Table.from(styler.get("displayValues")), + styles: styler.get("styles"), + uuid: styler.get("uuid"), + } + : undefined + } + + get rows(): number { + return this.indexTable.length + this.columnsTable.numCols + } + + get columns(): number { + return this.indexTable.numCols + this.columnsTable.length + } + + get headerRows(): number { + return this.rows - this.dataRows + } + + get headerColumns(): number { + return this.columns - this.dataColumns + } + + get dataRows(): number { + return this.dataTable.length + } + + get dataColumns(): number { + return this.dataTable.numCols + } + + get uuid(): string | undefined { + return this.styler && this.styler.uuid + } + + get caption(): string | undefined { + return this.styler && this.styler.caption + } + + get styles(): string | undefined { + return this.styler && this.styler.styles + } + + get table(): Table { + return this.dataTable + } + + get index(): Table { + return this.indexTable + } + + get columnTable(): Table { + return this.columnsTable + } + + public getCell = (rowIndex: number, columnIndex: number): Cell => { + const isBlankCell = + rowIndex < this.headerRows && columnIndex < this.headerColumns + const isIndexCell = + rowIndex >= this.headerRows && columnIndex < this.headerColumns + const isColumnsCell = + rowIndex < this.headerRows && columnIndex >= this.headerColumns + + if (isBlankCell) { + const classNames = ["blank"] + if (columnIndex > 0) { + classNames.push("level" + rowIndex) + } + + return { + type: "blank", + classNames: classNames.join(" "), + content: "", + } + } else if (isColumnsCell) { + const dataColumnIndex = columnIndex - this.headerColumns + const classNames = [ + "col_heading", + "level" + rowIndex, + "col" + dataColumnIndex, + ] + + return { + type: "columns", + classNames: classNames.join(" "), + content: this.getContent(this.columnsTable, dataColumnIndex, rowIndex), + } + } else if (isIndexCell) { + const dataRowIndex = rowIndex - this.headerRows + const classNames = [ + "row_heading", + "level" + columnIndex, + "row" + dataRowIndex, + ] + + return { + type: "index", + id: `T_${this.uuid}level${columnIndex}_row${dataRowIndex}`, + classNames: classNames.join(" "), + content: this.getContent(this.indexTable, dataRowIndex, columnIndex), + } + } else { + const dataRowIndex = rowIndex - this.headerRows + const dataColumnIndex = columnIndex - this.headerColumns + const classNames = [ + "data", + "row" + dataRowIndex, + "col" + dataColumnIndex, + ] + const content = this.styler + ? this.getContent( + this.styler.displayValuesTable, + dataRowIndex, + dataColumnIndex + ) + : this.getContent(this.dataTable, dataRowIndex, dataColumnIndex) + + return { + type: "data", + id: `T_${this.uuid}row${dataRowIndex}_col${dataColumnIndex}`, + classNames: classNames.join(" "), + content, + } + } + } + + public getContent = ( + table: Table, + rowIndex: number, + columnIndex: number + ): any => { + const column = table.getColumnAt(columnIndex) + if (column === null) { + return "" + } + + const columnTypeId = this.getColumnTypeId(table, columnIndex) + switch (columnTypeId) { + case Type.Timestamp: { + return this.nanosToDate(column.get(rowIndex)) + } + default: { + return column.get(rowIndex) + } + } + } + + /** + * Returns apache-arrow specific typeId of column. + */ + private getColumnTypeId(table: Table, columnIndex: number): Type { + return table.schema.fields[columnIndex].type.typeId + } + + private nanosToDate(nanos: number): Date { + return new Date(nanos / 1e6) + } +} diff --git a/frontend/src/streamlit/WithStreamlitConnection.svelte b/frontend/src/streamlit/WithStreamlitConnection.svelte new file mode 100644 index 0000000000000000000000000000000000000000..c49210f42eeb55510d0e429a1e22c5f2f4a81a4b --- /dev/null +++ b/frontend/src/streamlit/WithStreamlitConnection.svelte @@ -0,0 +1,71 @@ + + + + +{#if renderData} + {#if spreadArgs} + + {:else} + + {/if} +{/if} diff --git a/frontend/src/streamlit/index.ts b/frontend/src/streamlit/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..801e27ce3422a8d12fd2053068aa25db07021026 --- /dev/null +++ b/frontend/src/streamlit/index.ts @@ -0,0 +1,10 @@ +import type { RenderData as RenderData_ } from "./streamlit"; +import WithStreamlitConnection from "./WithStreamlitConnection.svelte"; + +export { ArrowTable } from "./ArrowTable"; +export { Streamlit } from "./streamlit"; + +export { setStreamlitLifecycle } from "./setStreamlitLifecycle"; +export { WithStreamlitConnection }; + +export type RenderData = RenderData_; diff --git a/frontend/src/streamlit/setStreamlitLifecycle.ts b/frontend/src/streamlit/setStreamlitLifecycle.ts new file mode 100644 index 0000000000000000000000000000000000000000..afe91582596dade7634b3a8e5123868b20e8e111 --- /dev/null +++ b/frontend/src/streamlit/setStreamlitLifecycle.ts @@ -0,0 +1,26 @@ +import { onMount, afterUpdate } from "svelte"; +import { Streamlit } from "./streamlit"; + +/** + * [Optional] Set Streamlit Svelte Lifecycle functions + * + * You are not required call this function on your Streamlit + * component. If you decide not to call it, you should implement the + * `onMount` and `afterUpdate` functions in your own component, + * so that your plugin properly resizes. + */ +export const setStreamlitLifecycle = (): void => { + onMount((): void => { + // Finally, tell Streamlit to update our initial height. We omit the + // `height` parameter here to have it default to our scrollHeight. + Streamlit.setFrameHeight(); + }); + + afterUpdate((): void => { + // We tell Streamlit to update our frameHeight after each update, in + // case it has changed. (This isn't strictly necessary for the example + // because our height stays fixed, but this is a low-cost function, so + // there's no harm in doing it redundantly.) + Streamlit.setFrameHeight(); + }); +}; diff --git a/frontend/src/streamlit/streamlit.ts b/frontend/src/streamlit/streamlit.ts new file mode 100644 index 0000000000000000000000000000000000000000..8cf51607ef65abbfdf4b08a4b1952bd96d8ad644 --- /dev/null +++ b/frontend/src/streamlit/streamlit.ts @@ -0,0 +1,198 @@ +/** + * @license + * Copyright 2018-2020 Streamlit Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Safari doesn't support the EventTarget class, so we use a shim. +import { EventTarget } from "event-target-shim" +import { ArrowDataframeProto, ArrowTable } from "./ArrowTable" + +/** Data sent in the custom Streamlit render event. */ +export interface RenderData { + args: any + disabled: boolean +} + +/** Messages from Component -> Streamlit */ +enum ComponentMessageType { + // A component sends this message when it's ready to receive messages + // from Streamlit. Streamlit won't send any messages until it gets this. + // Data: { apiVersion: number } + COMPONENT_READY = "streamlit:componentReady", + + // The component has a new widget value. Send it back to Streamlit, which + // will then re-run the app. + // Data: { value: any } + SET_COMPONENT_VALUE = "streamlit:setComponentValue", + + // The component has a new height for its iframe. + // Data: { height: number } + SET_FRAME_HEIGHT = "streamlit:setFrameHeight", +} + +/** + * Streamlit communication API. + * + * Components can send data to Streamlit via the functions defined here, + * and receive data from Streamlit via the `events` property. + */ +export class Streamlit { + /** + * The Streamlit component API version we're targetting. + * There's currently only 1! + */ + public static readonly API_VERSION = 1 + + public static readonly RENDER_EVENT = "streamlit:render" + + /** Dispatches events received from Streamlit. */ + public static readonly events = new EventTarget() + + private static registeredMessageListener = false + private static lastFrameHeight?: number + + /** + * Tell Streamlit that the component is ready to start receiving data. + * Streamlit will defer emitting RENDER events until it receives the + * COMPONENT_READY message. + */ + public static setComponentReady = (): void => { + if (!Streamlit.registeredMessageListener) { + // Register for message events if we haven't already + window.addEventListener("message", Streamlit.onMessageEvent) + Streamlit.registeredMessageListener = true + } + + Streamlit.sendBackMsg(ComponentMessageType.COMPONENT_READY, { + apiVersion: Streamlit.API_VERSION, + }) + } + + /** + * Report the component's height to Streamlit. + * This should be called every time the component changes its DOM - that is, + * when it's first loaded, and any time it updates. + */ + public static setFrameHeight = (height?: number): void => { + if (height === undefined) { + // `height` is optional. If undefined, it defaults to scrollHeight, + // which is the entire height of the element minus its border, + // scrollbar, and margin. + height = document.body.scrollHeight + } + + if (height === Streamlit.lastFrameHeight) { + // Don't bother updating if our height hasn't changed. + return + } + + Streamlit.lastFrameHeight = height + Streamlit.sendBackMsg(ComponentMessageType.SET_FRAME_HEIGHT, { height }) + } + + /** + * Set the component's value. This value will be returned to the Python + * script, and the script will be re-run. + * + * For example: + * + * JavaScript: + * Streamlit.setComponentValue("ahoy!") + * + * Python: + * value = st.my_component(...) + * st.write(value) # -> "ahoy!" + * + * The value must be serializable into JSON. + */ + public static setComponentValue = (value: any): void => { + Streamlit.sendBackMsg(ComponentMessageType.SET_COMPONENT_VALUE, { value }) + } + + /** Receive a ForwardMsg from the Streamlit app */ + private static onMessageEvent = (event: MessageEvent): void => { + const type = event.data["type"] + switch (type) { + case Streamlit.RENDER_EVENT: + Streamlit.onRenderMessage(event.data) + break + } + } + + /** + * Handle an untyped Streamlit render event and redispatch it as a + * StreamlitRenderEvent. + */ + private static onRenderMessage = (data: any): void => { + let args = data["args"] + if (args == null) { + console.error( + `Got null args in onRenderMessage. This should never happen` + ) + args = {} + } + + // Parse our dataframe arguments with arrow, and merge them into our args dict + const dataframeArgs = + data["dfs"] && data["dfs"].length > 0 + ? Streamlit.argsDataframeToObject(data["dfs"]) + : {} + + args = { + ...args, + ...dataframeArgs, + } + + const disabled = Boolean(data["disabled"]) + + // Dispatch a render event! + const eventData = { disabled, args } + const event = new CustomEvent(Streamlit.RENDER_EVENT, { + detail: eventData, + }) + Streamlit.events.dispatchEvent(event) + } + + private static argsDataframeToObject = ( + argsDataframe: ArgsDataframe[] + ): object => { + const argsDataframeArrow = argsDataframe.map( + ({ key, value }: ArgsDataframe) => [key, Streamlit.toArrowTable(value)] + ) + return Object.fromEntries(argsDataframeArrow) + } + + private static toArrowTable = (df: ArrowDataframeProto): ArrowTable => { + const { data, index, columns } = df.data + return new ArrowTable(data, index, columns) + } + + /** Post a message to the Streamlit app. */ + private static sendBackMsg = (type: string, data?: any): void => { + window.parent.postMessage( + { + isStreamlitMessage: true, + type: type, + ...data, + }, + "*" + ) + } +} + +interface ArgsDataframe { + key: string + value: ArrowDataframeProto +} diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..51f98411b8785d6ae8f9ec67634a65c7181b1774 --- /dev/null +++ b/frontend/tsconfig.json @@ -0,0 +1,26 @@ +{ + "extends": "@tsconfig/svelte/tsconfig.json", + "compilerOptions": { + "target": "esnext", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + + // Add this line to enable verbatimModuleSyntax + "verbatimModuleSyntax": true, + + // Optionally, add this line to silence the deprecation warning + "ignoreDeprecations": "5.0" + }, + "include": ["src/**/*"], + "exclude": ["node_modules/*", "__sapper__/*", "public/*"] +}